diff --git a/.luacheckrc b/.luacheckrc index a507374..5f1be00 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -27,7 +27,3 @@ stds.minetest = { }, } } - -read_globals = { - "intllib", -} diff --git a/init.lua b/init.lua index 7e053ec..4552db0 100644 --- a/init.lua +++ b/init.lua @@ -12,9 +12,8 @@ maptools = {} local modpath = minetest.get_modpath("maptools") -local S, NS = dofile(modpath .. "/intllib.lua") +local S = minetest.get_translator("maptools") maptools.S = S -maptools.NS = NS maptools.drop_msg = function(itemstack, player) local name = player:get_player_name() diff --git a/intllib.lua b/intllib.lua deleted file mode 100644 index c7af2c2..0000000 --- a/intllib.lua +++ /dev/null @@ -1,44 +0,0 @@ --- Fallback functions for when `intllib` is not installed. --- Code released under Unlicense . - --- 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 diff --git a/locale/es.txt b/locale/es.txt deleted file mode 100644 index 1bc96f2..0000000 --- a/locale/es.txt +++ /dev/null @@ -1,39 +0,0 @@ -# Translation by kaeza - -[maptools] loaded. = [maptools] cargado. - -Cloud = Nube -Infinite Fuel = Combustible Infinito -Admin Pickaxe = Pico de Administrador -Copper Coin = Moneda de Cobre -Silver Coin = Moneda de Plata -Gold Coin = Moneda de Oro -Super Apple = Super Manzana -Fake Ladder = Escalera Falsa -Smoke Block = Bloque de Humo -Damaging Block: %s = Bloque Dañino: %s -Kill Block = Bloque Mortal -Build Prevention = Bloqueador de Construcción -Interact Prevention = Bloqueador de Interacción -Climb Block = Bloque Escalable -Light Block = Bloqueador de Luz -Light Bulb = Lamparilla -Player Clip = Bloqueo de Jugador -Full Clip = Bloqueo Total - -Unbreakable Stone = Piedra Irrompible -Unbreakable Sand = Arena Irrompible -Unbreakable Desert Stone = Piedra Desértica Irrompible -Unbreakable Desert Sand = Arena Desértica Irrompible -Unbreakable Gravel = Gravilla Irrompible -Unbreakable Dirt = Tierra Irrompible -Unbreakable Dirt with Grass = Hierba Irrompible -Unbreakable Full Grass= Bloque de Hierba Irrompible -Unbreakable Brick = Ladrillos Irrompibles -Unbreakable Wooden Planks = Planchas de Madera Irrompibles -Unbreakable Tree = Tronco de Árbol Irrompible -Unbreakable Glass = Cristal Irrompible -Unbreakable Sandstone = Arenisca Irrompible -Unbreakable Leaves = Foliaje Irrompible -Unbreakable Cobblestone = Guijarros Irrompibles -Unbreakable Mossy Cobblestone = Guijarros Enmohecidos Irrompibles diff --git a/locale/fr.txt b/locale/fr.txt deleted file mode 100644 index d137871..0000000 --- a/locale/fr.txt +++ /dev/null @@ -1,47 +0,0 @@ -# Translation by Calinou - -[maptools] loaded. = [maptools] a été chargé. - -Cloud = Nuage -Infinite Fuel = Carburant infini -Admin Pickaxe = Pioche d'administrateur -Admin Pickaxe With Drops = Pioche d'administrateur qui donne des objets -Copper Coin = Pièce de cuivre -Silver Coin = Pièce d'argent -Gold Coin = Pièce d'or -Super Apple = Super pomme -Fake Ladder = Fausse échelle -Smoke Block = Bloc de fumée -Damaging Block: %s = Bloc de dégâts : %s -Kill Block = Bloc qui tue -Build Prevention = Prévention de construction -Interact Prevention = Prévention d'interaction -Climb Block = Bloc à grimper -Light Block = Bloqueur de lumière -Light Bulb = Bloc lumineux -Player Clip = Bloque-joueurs -Player Clip Bottom Face = Face inférieure de bloque-joueurs -Player Clip Top Face = Face supérieure de bloque-joueurs -Full Clip = Bloque-tout -Full Clip Face = Face de bloque-tout -Permanent Fire = Feu permanent -Fake Fire = Faux feu -Igniter = Incendieur -Pusher: %s = Pousseur : %s - -Unbreakable Stone = Pierre incassable -Unbreakable Sand = Sable incassable -Unbreakable Desert Stone = Pierre de désert incassable -Unbreakable Desert Sand = Sable de désert incassable -Unbreakable Gravel = Gravier incassable -Unbreakable Dirt = Terre incassable -Unbreakable Dirt with Grass = Herbe incassable -Unbreakable Full Grass= Bloc d'herbe incassable -Unbreakable Brick = Briques incassables -Unbreakable Wooden Planks = Planches de bois incassables -Unbreakable Tree = Tronc d'arbre incassable -Unbreakable Glass = Verre incassable -Unbreakable Sandstone = Grès incassable -Unbreakable Leaves = Feuillage incassable -Unbreakable Cobblestone = Pierre taillée incassable -Unbreakable Mossy Cobblestone = Pierre taillée mousseusse incassable diff --git a/locale/it.txt b/locale/it.txt deleted file mode 100644 index a1837fb..0000000 --- a/locale/it.txt +++ /dev/null @@ -1,47 +0,0 @@ -# Translation by Emon - -[maptools] loaded. = [maptools] caricato. - -Cloud = Nuvola -Infinite Fuel = Combustibile infinito -Admin Pickaxe = Piccone della amministrazione -Admin Pickaxe With Drops = Piccone della amministrazione che lascia cadere a terra -Copper Coin = Moneta di rame -Silver Coin = Moneta di argento -Gold Coin = Moneta di oro -Super Apple = Super mela -Fake Ladder = Finta scala a pioli -Smoke Block = Blocco di fumo -Damaging Block: %s = Blocco che danneggia : %s -Kill Block = Blocco che uccide -Build Prevention = Impedimento alla costruzione -Interact Prevention = Impedimento alla interazione -Climb Block = Blocco su cui ci si può arrampicare -Light Block = Blocco di luce -Light Bulb = Lampadina -Player Clip = Blocca giocatori -Player Clip Bottom Face = Blocca giocatori - faccia inferiore -Player Clip Top Face = Glocca giocatori - faccia superiore -Full Clip = Blocca tutti -Full Clip Face = Faccia del blocca tutti -Permanent Fire = Fuoco eterno -Fake Fire = Fuoco finto -Igniter = Accendino -Pusher: %s = Che ha spinto : %s - -Unbreakable Stone = Pietra infrangibile -Unbreakable Sand = Sabbia infrangibile -Unbreakable Desert Stone = Pietra del deserto infrangibile -Unbreakable Desert Sand = Sabbia del deserto infrangibile -Unbreakable Gravel = Ghiaia infrangibile -Unbreakable Dirt = Terra infrangibile -Unbreakable Dirt with Grass = Erba infrangibile -Unbreakable Full Grass= Blocco d'erba infrangibile -Unbreakable Brick = Mattoni infrangibile -Unbreakable Wooden Planks = Assi in legno infrangibili -Unbreakable Tree = Albero infrangibile -Unbreakable Glass = Vetro infrangibile -Unbreakable Sandstone = Arenaria infrangibile -Unbreakable Leaves = Foglie infrangibili -Unbreakable Cobblestone = Ciottolo infrangibile -Unbreakable Mossy Cobblestone = Ciottolo muschioso infrangibile diff --git a/locale/maptools.es.tr b/locale/maptools.es.tr new file mode 100644 index 0000000..030f146 --- /dev/null +++ b/locale/maptools.es.tr @@ -0,0 +1,38 @@ +# textdomain: maptools +[maptools] loaded.=[maptools] cargado. + +Cloud=Nube +Infinite Fuel=Combustible Infinito +Admin Pickaxe=Pico de Administrador +Copper Coin=Moneda de Cobre +Silver Coin=Moneda de Plata +Gold Coin=Moneda de Oro +Super Apple=Super Manzana +Fake Ladder=Escalera Falsa +Smoke Block=Bloque de Humo +Damaging Block: %s=Bloque Dañino: %s +Kill Block=Bloque Mortal +Build Prevention=Bloqueador de Construcción +Interact Prevention=Bloqueador de Interacción +Climb Block=Bloque Escalable +Light Block=Bloqueador de Luz +Light Bulb=Lamparilla +Player Clip=Bloqueo de Jugador +Full Clip=Bloqueo Total + +Unbreakable Stone=Piedra Irrompible +Unbreakable Sand=Arena Irrompible +Unbreakable Desert Stone=Piedra Desértica Irrompible +Unbreakable Desert Sand=Arena Desértica Irrompible +Unbreakable Gravel=Gravilla Irrompible +Unbreakable Dirt=Tierra Irrompible +Unbreakable Dirt with Grass=Hierba Irrompible +Unbreakable Full Grass=Bloque de Hierba Irrompible +Unbreakable Brick=Ladrillos Irrompibles +Unbreakable Wooden Planks=Planchas de Madera Irrompibles +Unbreakable Tree=Tronco de Árbol Irrompible +Unbreakable Glass=Cristal Irrompible +Unbreakable Sandstone=Arenisca Irrompible +Unbreakable Leaves=Foliaje Irrompible +Unbreakable Cobblestone=Guijarros Irrompibles +Unbreakable Mossy Cobblestone=Guijarros Enmohecidos Irrompibles diff --git a/locale/maptools.fr.tr b/locale/maptools.fr.tr new file mode 100644 index 0000000..818b5f5 --- /dev/null +++ b/locale/maptools.fr.tr @@ -0,0 +1,46 @@ +# textdomain: maptools +[maptools] loaded.=[maptools] a été chargé. + +Cloud=Nuage +Infinite Fuel=Carburant infini +Admin Pickaxe=Pioche d'administrateur +Admin Pickaxe With Drops=Pioche d'administrateur qui donne des objets +Copper Coin=Pièce de cuivre +Silver Coin=Pièce d'argent +Gold Coin=Pièce d'or +Super Apple=Super pomme +Fake Ladder=Fausse échelle +Smoke Block=Bloc de fumée +Damaging Block: %s=Bloc de dégâts : %s +Kill Block=Bloc qui tue +Build Prevention=Prévention de construction +Interact Prevention=Prévention d'interaction +Climb Block=Bloc à grimper +Light Block=Bloqueur de lumière +Light Bulb=Bloc lumineux +Player Clip=Bloque-joueurs +Player Clip Bottom Face=Face inférieure de bloque-joueurs +Player Clip Top Face=Face supérieure de bloque-joueurs +Full Clip=Bloque-tout +Full Clip Face=Face de bloque-tout +Permanent Fire=Feu permanent +Fake Fire=Faux feu +Igniter=Incendieur +Pusher: %s=Pousseur : %s + +Unbreakable Stone=Pierre incassable +Unbreakable Sand=Sable incassable +Unbreakable Desert Stone=Pierre de désert incassable +Unbreakable Desert Sand=Sable de désert incassable +Unbreakable Gravel=Gravier incassable +Unbreakable Dirt=Terre incassable +Unbreakable Dirt with Grass=Herbe incassable +Unbreakable Full Grass=Bloc d'herbe incassable +Unbreakable Brick=Briques incassables +Unbreakable Wooden Planks=Planches de bois incassables +Unbreakable Tree=Tronc d'arbre incassable +Unbreakable Glass=Verre incassable +Unbreakable Sandstone=Grès incassable +Unbreakable Leaves=Feuillage incassable +Unbreakable Cobblestone=Pierre taillée incassable +Unbreakable Mossy Cobblestone=Pierre taillée mousseusse incassable diff --git a/locale/maptools.it.tr b/locale/maptools.it.tr new file mode 100644 index 0000000..b8fbd0e --- /dev/null +++ b/locale/maptools.it.tr @@ -0,0 +1,46 @@ +# textdomain: maptools +[maptools] loaded.=[maptools] caricato. + +Cloud=Nuvola +Infinite Fuel=Combustibile infinito +Admin Pickaxe=Piccone della amministrazione +Admin Pickaxe With Drops=Piccone della amministrazione che lascia cadere a terra +Copper Coin=Moneta di rame +Silver Coin=Moneta di argento +Gold Coin=Moneta di oro +Super Apple=Super mela +Fake Ladder=Finta scala a pioli +Smoke Block=Blocco di fumo +Damaging Block: %s=Blocco che danneggia : %s +Kill Block=Blocco che uccide +Build Prevention=Impedimento alla costruzione +Interact Prevention=Impedimento alla interazione +Climb Block=Blocco su cui ci si può arrampicare +Light Block=Blocco di luce +Light Bulb=Lampadina +Player Clip=Blocca giocatori +Player Clip Bottom Face=Blocca giocatori - faccia inferiore +Player Clip Top Face=Glocca giocatori - faccia superiore +Full Clip=Blocca tutti +Full Clip Face=Faccia del blocca tutti +Permanent Fire=Fuoco eterno +Fake Fire=Fuoco finto +Igniter=Accendino +Pusher: %s=Che ha spinto : %s + +Unbreakable Stone=Pietra infrangibile +Unbreakable Sand=Sabbia infrangibile +Unbreakable Desert Stone=Pietra del deserto infrangibile +Unbreakable Desert Sand=Sabbia del deserto infrangibile +Unbreakable Gravel=Ghiaia infrangibile +Unbreakable Dirt=Terra infrangibile +Unbreakable Dirt with Grass=Erba infrangibile +Unbreakable Full Grass=Blocco d'erba infrangibile +Unbreakable Brick=Mattoni infrangibile +Unbreakable Wooden Planks=Assi in legno infrangibili +Unbreakable Tree=Albero infrangibile +Unbreakable Glass=Vetro infrangibile +Unbreakable Sandstone=Arenaria infrangibile +Unbreakable Leaves=Foglie infrangibili +Unbreakable Cobblestone=Ciottolo infrangibile +Unbreakable Mossy Cobblestone=Ciottolo muschioso infrangibile diff --git a/locale/maptools.template.tr b/locale/maptools.template.tr new file mode 100644 index 0000000..7280ca4 --- /dev/null +++ b/locale/maptools.template.tr @@ -0,0 +1,46 @@ +# textdomain: maptools +[maptools] loaded.= + +Cloud=Nuage +Infinite Fuel= +Admin Pickaxe= +Admin Pickaxe With Drops= +Copper Coin= +Silver Coin= +Gold Coin= +Super Apple= +Fake Ladder= +Smoke Block= +Damaging Block: %s= +Kill Block= +Build Prevention= +Interact Prevention= +Climb Block= +Light Block= +Light Bulb= +Player Clip= +Player Clip Bottom Face= +Player Clip Top Face= +Full Clip= +Full Clip Face= +Permanent Fire= +Fake Fire= +Igniter= +Pusher: %s= + +Unbreakable Stone= +Unbreakable Sand= +Unbreakable Desert Stone= +Unbreakable Desert Sand= +Unbreakable Gravel= +Unbreakable Dirt= +Unbreakable Dirt with Grass= +Unbreakable Full Grass= +Unbreakable Brick= +Unbreakable Wooden Planks= +Unbreakable Tree= +Unbreakable Glass= +Unbreakable Sandstone= +Unbreakable Leaves= +Unbreakable Cobblestone= +Unbreakable Mossy Cobblestone= diff --git a/mod.conf b/mod.conf index 558ad1b..329484d 100644 --- a/mod.conf +++ b/mod.conf @@ -1,5 +1,5 @@ name = maptools description = Adds various special versions of normal blocks, tools, and other map maintainer tools. depends = default -optional_depends = intllib, moreores +optional_depends = moreores min_minetest_version = 5.0.0