Use MT5 client side translation

Using [update_translations tool](https://github.com/minetest-tools/update_translations).
master^2
Louis Royer 2020-07-11 14:49:26 +02:00
parent e92916b8af
commit 3291703c60
11 changed files with 52 additions and 167 deletions

View File

@ -56,6 +56,3 @@ stairs:slab_cobble default:stick stairs:slab_cobble
- Bitbucket:
- <https://bitbucket.org/g00g01/new_campfire>
- Intllib:
- https://github.com/minetest-mods/intllib

View File

@ -1 +0,0 @@
You can craft and use better campfire.

View File

@ -1,3 +1,6 @@
-- Translation support
local S = minetest.get_translator("new_campfire")
-- VARIABLES
new_campfire = {}
@ -9,10 +12,6 @@ new_campfire.embers_ttl = 60 -- seconds until embers burn out completely leav
new_campfire.flare_up = 2 -- seconds from adding a stick to embers before it flares into a fire again
new_campfire.stick_time = new_campfire.flames_ttl/2; -- How long does the stick increase. In sec.
-- Load support for intllib.
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
-- FUNCTIONS
local function fire_particles_on(pos) -- 3 layers of fire
local meta = minetest.get_meta(pos)

View File

@ -1,45 +0,0 @@
-- Fallback functions for when `intllib` is not installed.
-- Code released under Unlicense <http://unlicense.org>.
-- Get the latest version of this file at:
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
local function format(str, ...)
local args = { ... }
local function repl(escape, open, num, close)
if escape == "" then
local replacement = tostring(args[tonumber(num)])
if open == "" then
replacement = replacement..close
end
return replacement
else
return "@"..open..num..close
end
end
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
end
local gettext, ngettext
if minetest.get_modpath("intllib") then
if intllib.make_gettext_pair then
-- New method using gettext.
gettext, ngettext = intllib.make_gettext_pair()
else
-- Old method using text files.
gettext = intllib.Getter()
end
end
-- Fill in missing functions.
gettext = gettext or function(msgid, ...)
return format(msgid, ...)
end
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
return format(n==1 and msgid or msgid_plural, ...)
end
return gettext, ngettext

16
locale/new_campfire.ru.tr Normal file
View File

@ -0,0 +1,16 @@
# textdomain: new_campfire
### init.lua ###
Active campfire=Горящий костер
Active campfire with grille=
Ash=Пепел
Campfire=Костер
Campfire with grille=
Cooking=Приготовление
Fireplace=Кострище
Fireplace with embers=
Fireplace with embers and grille=
Fireplace with grille=
Metal Grille=

16
locale/new_campfire.ua.tr Normal file
View File

@ -0,0 +1,16 @@
# textdomain: new_campfire
### init.lua ###
Active campfire=Палаюче багаття
Active campfire with grille=
Ash=Попіл
Campfire=Багаття
Campfire with grille=
Cooking=Готування
Fireplace=Місце від багаття
Fireplace with embers=
Fireplace with embers and grille=
Fireplace with grille=
Metal Grille=

View File

@ -1,38 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-22 20:24+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: init.lua:119 init.lua:260
msgid "Active campfire"
msgstr "Горящий костер"
#: init.lua:129
msgid "Cooking"
msgstr "Приготовление"
#: init.lua:193 init.lua:211
msgid "Fireplace"
msgstr "Кострище"
#: init.lua:216 init.lua:236
msgid "Campfire"
msgstr "Костер"
#: init.lua:382
msgid "Ash"
msgstr "Пепел"

View File

@ -1,38 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-22 20:24+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: init.lua:119 init.lua:260
msgid "Active campfire"
msgstr ""
#: init.lua:129
msgid "Cooking"
msgstr ""
#: init.lua:193 init.lua:211
msgid "Fireplace"
msgstr ""
#: init.lua:216 init.lua:236
msgid "Campfire"
msgstr ""
#: init.lua:382
msgid "Ash"
msgstr ""

16
locale/template.txt Normal file
View File

@ -0,0 +1,16 @@
# textdomain: new_campfire
### init.lua ###
Active campfire=
Active campfire with grille=
Ash=
Campfire=
Campfire with grille=
Cooking=
Fireplace=
Fireplace with embers=
Fireplace with embers and grille=
Fireplace with grille=
Metal Grille=

View File

@ -1,38 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-22 20:24+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: init.lua:119 init.lua:260
msgid "Active campfire"
msgstr "Палаюче багаття"
#: init.lua:129
msgid "Cooking"
msgstr "Готування"
#: init.lua:193 init.lua:211
msgid "Fireplace"
msgstr "Місце від багаття"
#: init.lua:216 init.lua:236
msgid "Campfire"
msgstr "Багаття"
#: init.lua:382
msgid "Ash"
msgstr "Попіл"

View File

@ -1,4 +1,5 @@
name = new_campfire
description = You can craft and use better campfire.
depends = default, fire, basic_materials
optional_depends = campfire
min_minetest_version = 5.2.0