Use MT5 client side translation
Using [update_translations tool](https://github.com/minetest-tools/update_translations).master^2
parent
e92916b8af
commit
3291703c60
|
@ -56,6 +56,3 @@ stairs:slab_cobble default:stick stairs:slab_cobble
|
||||||
|
|
||||||
- Bitbucket:
|
- Bitbucket:
|
||||||
- <https://bitbucket.org/g00g01/new_campfire>
|
- <https://bitbucket.org/g00g01/new_campfire>
|
||||||
|
|
||||||
- Intllib:
|
|
||||||
- https://github.com/minetest-mods/intllib
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
You can craft and use better campfire.
|
|
7
init.lua
7
init.lua
|
@ -1,3 +1,6 @@
|
||||||
|
-- Translation support
|
||||||
|
local S = minetest.get_translator("new_campfire")
|
||||||
|
|
||||||
-- VARIABLES
|
-- VARIABLES
|
||||||
|
|
||||||
new_campfire = {}
|
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.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.
|
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
|
-- FUNCTIONS
|
||||||
local function fire_particles_on(pos) -- 3 layers of fire
|
local function fire_particles_on(pos) -- 3 layers of fire
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
|
|
45
intllib.lua
45
intllib.lua
|
@ -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
|
|
|
@ -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=
|
|
@ -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=
|
38
locale/ru.po
38
locale/ru.po
|
@ -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 "Пепел"
|
|
|
@ -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 ""
|
|
|
@ -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=
|
38
locale/ua.po
38
locale/ua.po
|
@ -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 "Попіл"
|
|
1
mod.conf
1
mod.conf
|
@ -1,4 +1,5 @@
|
||||||
name = new_campfire
|
name = new_campfire
|
||||||
|
description = You can craft and use better campfire.
|
||||||
depends = default, fire, basic_materials
|
depends = default, fire, basic_materials
|
||||||
optional_depends = campfire
|
optional_depends = campfire
|
||||||
min_minetest_version = 5.2.0
|
min_minetest_version = 5.2.0
|
||||||
|
|
Loading…
Reference in New Issue