Migrate translations to the Minetest localization format (#38)

* Translation using MT5 translation api

Fix #36

* Add hoe to french translation
This commit is contained in:
Louis Royer 2020-02-04 22:05:38 +01:00 committato da GitHub
parent 96ff162f51
commit d2933894e6
Non sono state trovate chiavi note per questa firma nel database
ID Chiave GPG: 4AEE18F83AFDEB23
20 ha cambiato i file con 213 aggiunte e 226 eliminazioni

Vedi File

@ -12,9 +12,8 @@ moreores = {}
local modpath = minetest.get_modpath("moreores")
local S, NS = dofile(modpath .. "/intllib.lua")
local S = minetest.get_translator("moreores")
moreores.S = S
moreores.NS = NS
dofile(modpath .. "/_config.txt")
@ -86,7 +85,7 @@ local function add_ore(modname, description, mineral_name, oredef)
if oredef.makes.ore then
minetest.register_node(modname .. ":mineral_" .. mineral_name, {
description = S("%s Ore"):format(S(description)),
description = S("@1 Ore", S(description)),
tiles = {"default_stone.png^" .. modname .. "_mineral_" .. mineral_name .. ".png"},
groups = {cracky = 2},
sounds = default_stone_sounds,
@ -101,7 +100,7 @@ local function add_ore(modname, description, mineral_name, oredef)
if oredef.makes.block then
local block_item = item_base .. "_block"
minetest.register_node(block_item, {
description = S("%s Block"):format(S(description)),
description = S("@1 Block", S(description)),
tiles = {img_base .. "_block.png"},
groups = {snappy = 1, bendy = 2, cracky = 1, melty = 2, level = 2},
sounds = default_metal_sounds,
@ -126,7 +125,7 @@ local function add_ore(modname, description, mineral_name, oredef)
if oredef.makes.lump then
minetest.register_craftitem(lump_item, {
description = S("%s Lump"):format(S(description)),
description = S("@1 Lump", S(description)),
inventory_image = img_base .. "_lump.png",
})
minetest.register_alias(mineral_name .. "_lump", lump_item)
@ -144,7 +143,7 @@ local function add_ore(modname, description, mineral_name, oredef)
if oredef.makes.ingot then
minetest.register_craftitem(ingot, {
description = S("%s Ingot"):format(S(description)),
description = S("@1 Ingot", S(description)),
inventory_image = img_base .. "_ingot.png",
})
minetest.register_alias(mineral_name .. "_ingot", ingot)
@ -187,25 +186,25 @@ local function add_ore(modname, description, mineral_name, oredef)
if tool_name == "sword" then
tdef.tool_capabilities.full_punch_interval = oredef.full_punch_interval
tdef.tool_capabilities.damage_groups = oredef.damage_groups
tdef.description = S("%s Sword"):format(S(description))
tdef.description = S("@1 Sword", S(description))
end
if tool_name == "pick" then
tdef.tool_capabilities.full_punch_interval = oredef.full_punch_interval
tdef.tool_capabilities.damage_groups = oredef.damage_groups
tdef.description = S("%s Pickaxe"):format(S(description))
tdef.description = S("@1 Pickaxe", S(description))
end
if tool_name == "axe" then
tdef.tool_capabilities.full_punch_interval = oredef.full_punch_interval
tdef.tool_capabilities.damage_groups = oredef.damage_groups
tdef.description = S("%s Axe"):format(S(description))
tdef.description = S("@1 Axe", S(description))
end
if tool_name == "shovel" then
tdef.full_punch_interval = oredef.full_punch_interval
tdef.tool_capabilities.damage_groups = oredef.damage_groups
tdef.description = S("%s Shovel"):format(S(description))
tdef.description = S("@1 Shovel", S(description))
tdef.wield_image = toolimg_base .. tool_name .. ".png^[transformR90"
end
@ -213,7 +212,7 @@ local function add_ore(modname, description, mineral_name, oredef)
if tool_name == "hoe" and minetest.get_modpath("farming") then
tdef.max_uses = tooldef.uses
tdef.description = S("%s Hoe"):format(S(description))
tdef.description = S("@1 Hoe", S(description))
farming.register_hoe(fulltool_name, tdef)
end

Vedi File

@ -1,44 +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

Vedi File

@ -1,21 +0,0 @@
# Translation by Xanthin
[moreores] loaded. = [moreores] geladen.
%s Ore = %serz
%s Lump = %sklumpen
%s Ingot = %sbarren
%s Block = %sblock
%s Pickaxe = %sspitzhacke
%s Shovel = %sschaufel
%s Axe = %saxt
%s Sword = %sschwert
Copper = Kupfer
Tin = Zinn
Bronze = Bronze
Silver = Silber
Gold = Gold
Mithril = Mithril
Copper Rail = Kupferschiene

Vedi File

@ -1,21 +0,0 @@
# Translation by kaeza
[moreores] loaded. = [moreores] cargado.
%s Ore = Mineral de %s
%s Lump = Pepita de %s
%s Ingot = Lingote de %s
%s Block = Bloque de %s
%s Pickaxe = Pico de %s
%s Shovel = Pala de %s
%s Axe = Hacha de %s
%s Sword = Espada de %s
Copper = cobre
Tin = estaño
Bronze = bronce
Silver = plata
Gold = oro
Mithril = mitrilo
Copper Rail = Riel de Cobre

Vedi File

@ -1,21 +0,0 @@
# Translation by Calinou
[moreores] loaded. = [moreores] a été chargé.
%s Ore = Minerai en %s
%s Lump = Roche en %s
%s Ingot = Lingot en %s
%s Block = Bloc en %s
%s Pickaxe = Pioche en %s
%s Shovel = Pelle en %s
%s Axe = Hache en %s
%s Sword = Épée en %s
Copper = cuivre
Tin = étain
Bronze = bronze
Silver = argent
Gold = or
Mithril = mithril
Copper Rail = Rail en cuivre

Vedi File

@ -1,21 +0,0 @@
# Translation by Pagliaccio
[moreores] loaded. = [moreores] caricato.
%s Ore = Minerale di %s
%s Lump = %s grezzo
%s Ingot = Lingotto di %s
%s Block = Blocco di %s
%s Pickaxe = Piccone di %s
%s Shovel = Badile di %s
%s Axe = Ascia di %s
%s Sword = Spada di %s
Copper = Rame
Tin = Stagno
Bronze = Bronzo
Silver = Argento
Gold = Oro
Mithril = Mithril
Copper Rail = Binario di rame

22
locale/moreores.de.tr Normal file
Vedi File

@ -0,0 +1,22 @@
# textdomain: moreores
# Translation by Xanthin
[moreores] loaded.=[moreores] geladen.
@1 Ore=@1erz
@1 Lump=@1klumpen
@1 Ingot=@1barren
@1 Block=@1block
@1 Pickaxe=@1spitzhacke
@1 Shovel=@1schaufel
@1 Axe=@1axt
@1 Sword=@1schwert
Copper=Kupfer
Tin=Zinn
Bronze=Bronze
Silver=Silber
Gold=Gold
Mithril=Mithril
Copper Rail=Kupferschiene

21
locale/moreores.en.tr Normal file
Vedi File

@ -0,0 +1,21 @@
# textdomain: moreores
[moreores] loaded.=[moreores] loaded.
@1 Ore=@1 Ore
@1 Lump=@1 Lump
@1 Ingot=@1 Ingot
@1 Block=@1 Block
@1 Pickaxe=@1 Pickaxe
@1 Shovel=@1 Shovel
@1 Axe=@1 Axe
@1 Sword=@1 Sword
@1 Hoe=@1 Hoe
Copper=Copper
Tin=Tin
Bronze=Bronze
Silver=Silver
Gold=Gold
Mithril=Mithril
Copper Rail=Copper Rail

22
locale/moreores.es.tr Normal file
Vedi File

@ -0,0 +1,22 @@
# textdomain: moreores
# Translation by kaeza
[moreores] loaded.=[moreores] cargado.
@1 Ore=Mineral de @1
@1 Lump=Pepita de @1
@1 Ingot=Lingote de @1
@1 Block=Bloque de @1
@1 Pickaxe=Pico de @1
@1 Shovel=Pala de @1
@1 Axe=Hacha de @1
@1 Sword=Espada de @1
Copper=cobre
Tin=estaño
Bronze=bronce
Silver=plata
Gold=oro
Mithril=mitrilo
Copper Rail=Riel de Cobre

23
locale/moreores.fr.tr Normal file
Vedi File

@ -0,0 +1,23 @@
# textdomain: moreores
# Translation by Calinou
[moreores] loaded.=[moreores] a été chargé.
@1 Ore=Minerai en @1
@1 Lump=Roche en @1
@1 Ingot=Lingot en @1
@1 Block=Bloc en @1
@1 Pickaxe=Pioche en @1
@1 Shovel=Pelle en @1
@1 Axe=Hache en @1
@1 Sword=Épée en @1
@1 Hoe=Houe en @1
Copper=cuivre
Tin=étain
Bronze=bronze
Silver=argent
Gold=or
Mithril=mithril
Copper Rail=Rail en cuivre

22
locale/moreores.it.tr Normal file
Vedi File

@ -0,0 +1,22 @@
# textdomain: moreores
# Translation by Pagliaccio
[moreores] loaded.=[moreores] caricato.
@1 Ore=Minerale di @1
@1 Lump=@1 grezzo
@1 Ingot=Lingotto di @1
@1 Block=Blocco di @1
@1 Pickaxe=Piccone di @1
@1 Shovel=Badile di @1
@1 Axe=Ascia di @1
@1 Sword=Spada di @1
Copper=Rame
Tin=Stagno
Bronze=Bronzo
Silver=Argento
Gold=Oro
Mithril=Mithril
Copper Rail=Binario di rame

19
locale/moreores.nl.tr Normal file
Vedi File

@ -0,0 +1,19 @@
# textdomain: moreores
[moreores] loaded.=[moreores] geladen.
@1 Ore=@1 Erts
@1 Lump=@1 Klomp
@1 Ingot=@1 Staaf
@1 Block=@1 Blok
@1 Pickaxe=@1 Pikhouweel
@1 Shovel=@1 Schep
@1 Axe=@1 Bijl
@1 Sword=@1 Zwaard
Copper=Koper
Tin=Tin
Bronze=Brons
Silver=Silver
Gold=Goud
Mithril=Mithril

22
locale/moreores.pl.tr Normal file
Vedi File

@ -0,0 +1,22 @@
# textdomain: moreores
# Translation by mat9117
[moreores] loaded.=[moreores] załadowano.
@1 Ore=@1 Ruda
@1 Lump=@1 Bryłka
@1 Ingot=@1 Sztabka
@1 Block=@1 Blok
@1 Pickaxe=@1 Kilof
@1 Shovel=@1 Łopatka
@1 Axe=@1 Siekiera
@1 Sword=@1 Miecz
Copper=Miedź
Tin=Cyna
Bronze=Brąz
Silver=Srebro
Gold=Złoto
Mithril=Mithril
Copper Rail=Miedziany tor

23
locale/moreores.pt_br.txt Normal file
Vedi File

@ -0,0 +1,23 @@
# textdomain: moreores
# Translation by github.com/caiorrs
[moreores] loaded.=[moreores] carregado.
@1 Ore=Minério de @1
@1 Lump=Pepita de @1
@1 Ingot=Lingote de @1
@1 Block=Bloco de @1
@1 Pickaxe=Picareta de @1
@1 Shovel=Pá de @1
@1 Axe=Machado de @1
@1 Sword=Espada de @1
Copper=Cobre
Tin=Estanho
Bronze=Bronze
Silver=Prata
Gold=Ouro
Mithril=Mitrilo
Copper Rail=Trilho de Cobre

28
locale/moreores.tr.tr Normal file
Vedi File

@ -0,0 +1,28 @@
# textdomain: moreores
# Translation by Mahmutelmas06
# mahmutelmas06@hotmail.com
# Türkçe Çeviri
# Turkish translation
# Language 2 letter iso code is "tr"
[moreores] loaded.=[moreores] yüklendi.
@1 Ore=@1 madeni
@1 Lump=@1 yığını
@1 Ingot=@1 külçesi
@1 Block=@1 blok
@1 Pickaxe=@1 kazma
@1 Shovel=@1 kürek
@1 Axe=@1 balta
@1 Sword=@1 kılıç
Copper=Bakır
Tin=Kalay
Bronze=Bronz
Silver=Gümüş
Gold=Altın
Mithril=Mithril
Copper Rail=Bakır ray

Vedi File

@ -1,19 +0,0 @@
[moreores] loaded. = [moreores] geladen.
%s Ore = %s Erts
%s Lump = %s Klomp
%s Ingot = %s Staaf
%s Block = %s Blok
%s Pickaxe = %s Pikhouweel
%s Shovel = %s Schep
%s Axe = %s Bijl
%s Sword = %s Zwaard
Copper = Koper
Tin = Tin
Bronze = Brons
Silver = Silver
Gold = Goud
Mithril = Mithril
Copper Rail = Koperen Spoor

Vedi File

@ -1,21 +0,0 @@
# Translation by mat9117
[moreores] loaded. = [moreores] załadowano.
%s Ore = %s Ruda
%s Lump = %s Bryłka
%s Ingot = %s Sztabka
%s Block = %s Blok
%s Pickaxe = %s Kilof
%s Shovel = %s Łopatka
%s Axe = %s Siekiera
%s Sword = %s Miecz
Copper = Miedź
Tin = Cyna
Bronze = Brąz
Silver = Srebro
Gold = Złoto
Mithril = Mithril
Copper Rail = Miedziany tor

Vedi File

@ -1,21 +0,0 @@
# Translation by github.com/caiorrs
[moreores] loaded. = [moreores] carregado.
%s Ore = Minério de %s
%s Lump = Pepita de %s
%s Ingot = Lingote de %s
%s Block = Bloco de %s
%s Pickaxe = Picareta de %s
%s Shovel = Pá de %s
%s Axe = Machado de %s
%s Sword = Espada de %s
Copper = Cobre
Tin = Estanho
Bronze = Bronze
Silver = Prata
Gold = Ouro
Mithril = Mitrilo
Copper Rail = Trilho de Cobre

Vedi File

@ -1,25 +0,0 @@
# Translation by Mahmutelmas06
# mahmutelmas06@hotmail.com
# Türkçe Çeviri
# Turkish translation
# Language 2 letter iso code is "tr"
[moreores] loaded. = [moreores] yüklendi.
%s Ore = %s madeni
%s Lump = %s yığını
%s Ingot = %s külçesi
%s Block = %s blok
%s Pickaxe = %s kazma
%s Shovel = %s kürek
%s Axe = %s balta
%s Sword = %s kılıç
Copper = Bakır
Tin = Kalay
Bronze = Bronz
Silver = Gümüş
Gold = Altın
Mithril = Mithril
Copper Rail = Bakır ray

Vedi File

@ -1,4 +1,4 @@
name = moreores
description = Adds new ore types.
depends = default
optional_depends = carts,farming,frame,intllib,mg,toolranks
optional_depends = carts,farming,frame,mg,toolranks