From 239442ed1c46a0ce49b816e8d931c549e827bc47 Mon Sep 17 00:00:00 2001 From: Niklp <89982526+Niklp09@users.noreply.github.com> Date: Thu, 16 Jun 2022 09:05:42 +0200 Subject: [PATCH] use MT5 translator --- init.lua | 3 +- intllib.lua | 45 ------------------- locale/basic_signs.de.tr | 14 ++++++ locale/basic_signs.es.tr | 14 ++++++ locale/basic_signs.fr.tr | 14 ++++++ locale/basic_signs.ms.tr | 14 ++++++ locale/basic_signs.ru.tr | 15 +++++++ locale/de.po | 97 ---------------------------------------- locale/es.po | 95 --------------------------------------- locale/fr.po | 91 ------------------------------------- locale/ms.po | 91 ------------------------------------- locale/ru.po | 94 -------------------------------------- locale/template.pot | 94 -------------------------------------- locale/template.txt | 14 ++++++ 14 files changed, 86 insertions(+), 609 deletions(-) delete mode 100644 intllib.lua create mode 100644 locale/basic_signs.de.tr create mode 100644 locale/basic_signs.es.tr create mode 100644 locale/basic_signs.fr.tr create mode 100644 locale/basic_signs.ms.tr create mode 100644 locale/basic_signs.ru.tr delete mode 100644 locale/de.po delete mode 100644 locale/es.po delete mode 100644 locale/fr.po delete mode 100644 locale/ms.po delete mode 100644 locale/ru.po delete mode 100644 locale/template.pot create mode 100644 locale/template.txt diff --git a/init.lua b/init.lua index c657fa3..a4a6cd6 100644 --- a/init.lua +++ b/init.lua @@ -6,8 +6,7 @@ basic_signs.path = minetest.get_modpath(minetest.get_current_modname()) dofile(basic_signs.path .. "/crafting.lua") -local S, NS = dofile(basic_signs.path .. "/intllib.lua") -basic_signs.gettext = S +local S = minetest.get_translator(minetest.get_current_modname()) signs_lib.register_sign("basic_signs:sign_wall_locked", { description = S("Locked Sign"), diff --git a/intllib.lua b/intllib.lua deleted file mode 100644 index 6669d72..0000000 --- a/intllib.lua +++ /dev/null @@ -1,45 +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/basic_signs.de.tr b/locale/basic_signs.de.tr new file mode 100644 index 0000000..10cdd43 --- /dev/null +++ b/locale/basic_signs.de.tr @@ -0,0 +1,14 @@ +# textdomain: basic_signs +Locked Sign=gesperrter Schild +Glass Sign=Glas Schild +Obsidian Glass Sign=Obsidian Glas Schild +Plastic Sign=Plastik Schild +green=grün +yellow=gelb +red=rot +white_red=weißrot +white_black=schwarzweiß +orange=orange +blue=blau +brown=braun +Sign (@1, steel)=Schild (@1, eisen) diff --git a/locale/basic_signs.es.tr b/locale/basic_signs.es.tr new file mode 100644 index 0000000..f0a0fed --- /dev/null +++ b/locale/basic_signs.es.tr @@ -0,0 +1,14 @@ +# textdomain: basic_signs +Locked Sign=Letrero bloqueada +Glass Sign= +Obsidian Glass Sign= +Plastic Sign= +green=verde +yellow=amarillo +red=rojo +white_red=rojo y blanco +white_black=negro y blanco +orange=naranja +blue=azul +brown=marrón +Sign (@1, steel)= diff --git a/locale/basic_signs.fr.tr b/locale/basic_signs.fr.tr new file mode 100644 index 0000000..7563f41 --- /dev/null +++ b/locale/basic_signs.fr.tr @@ -0,0 +1,14 @@ +# textdomain: basic_signs +Locked Sign=Panneau (verrouillé) +Glass Sign= +Obsidian Glass Sign= +Plastic Sign= +green=vert +yellow=jaune +red=rouge +white_red=rouge et blanc +white_black=noir et blanc +orange=orange +blue=bleu +brown=marron +Sign (@1, steel)= diff --git a/locale/basic_signs.ms.tr b/locale/basic_signs.ms.tr new file mode 100644 index 0000000..8bdf72d --- /dev/null +++ b/locale/basic_signs.ms.tr @@ -0,0 +1,14 @@ +# textdomain: basic_signs +Locked Sign=Papan Tanda Berkunci +Glass Sign= +Obsidian Glass Sign= +Plastic Sign= +green=hijau +yellow=kuning +red=merah +white_red=putih_merah +white_black=putih_hitam +orange=jingga +blue=biru +brown=perang +Sign (@1, steel)= diff --git a/locale/basic_signs.ru.tr b/locale/basic_signs.ru.tr new file mode 100644 index 0000000..addc014 --- /dev/null +++ b/locale/basic_signs.ru.tr @@ -0,0 +1,15 @@ +# textdomain: basic_signs +Locked Sign=защищенная табличка +Glass Sign= +Obsidian Glass Sign= +Plastic Sign= +green=зеленая +yellow=желтая +red=красная +white_red=краснобелая +white_black=чернобелая +orange=оранжевая +blue=синея +brown=коричневая +Sign (@1, steel)= + diff --git a/locale/de.po b/locale/de.po deleted file mode 100644 index a2f4150..0000000 --- a/locale/de.po +++ /dev/null @@ -1,97 +0,0 @@ -# German Translation for the signs_lib mod. -# Copyright (C) 2018 Vanessa Ezekowitz -# This file is distributed under the same license as the signs_lib package. -# Xanthin, 2017. -# CodeXP , 2018. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-31 18:31+0200\n" -"PO-Revision-Date: 2018-03-24 22:00+0100\n" -"Last-Translator: CodeXP \n" -"Language-Team: \n" -"Language: de\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.12\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: init.lua -msgid "Write" -msgstr "schreiben" - -#: init.lua -msgid "Locked sign, owned by @1\n" -msgstr "gesperrter Schild, gehört @1\n" - -#: init.lua -msgid "locked " -msgstr "gesperrt " - -#: init.lua -#, fuzzy -msgid "@1 wrote \"@2\" to @3sign at @4" -msgstr "@1 schrieb \"@2\" auf das @3Schild bei @4" - -#: init.lua -msgid "Sign" -msgstr "Schild" - -#: init.lua -msgid "Can edit all locked signs" -msgstr "Kann alle gesperrte Schilder bearbeiten" - -#: init.lua -msgid "Locked Sign" -msgstr "gesperrter Schild" - -#: init.lua -msgid "green" -msgstr "grün" - -#: init.lua -msgid "yellow" -msgstr "gelb" - -#: init.lua -msgid "red" -msgstr "rot" - -#: init.lua -msgid "white_red" -msgstr "weißrot" - -#: init.lua -msgid "white_black" -msgstr "schwarzweiß" - -#: init.lua -msgid "orange" -msgstr "orange" - -#: init.lua -msgid "blue" -msgstr "blau" - -#: init.lua -msgid "brown" -msgstr "braun" - -#: init.lua -msgid "Sign (@1, metal)" -msgstr "Schild (@1, Metall)" - -#: init.lua -msgid "Attempt to register unknown node as fence" -msgstr "Versuch ein unbekanntes Element als Zaun zu registrieren" - -#: init.lua -msgid "Registered @1 and @2" -msgstr "Registrierte @1 und @2" - -#: init.lua -msgid "[MOD] signs loaded" -msgstr "[MOD] Schilder-Mod geladen" diff --git a/locale/es.po b/locale/es.po deleted file mode 100644 index 8579937..0000000 --- a/locale/es.po +++ /dev/null @@ -1,95 +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 , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-31 18:22+0200\n" -"PO-Revision-Date: 2017-07-31 18:30+0200\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.12\n" -"Last-Translator: Carlos Barraza\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Language: es\n" - -#: init.lua -msgid "Locked sign, owned by @1\n" -msgstr "" - -#: init.lua -msgid "locked " -msgstr "bloqueada " - -#: init.lua -msgid "@1 wrote \"@2\" to @3sign at @4" -msgstr "@1 escribio \"@2\" en el cartel @3en @4" - -#: init.lua -msgid "Sign" -msgstr "Letrero" - -#: init.lua -msgid "Can edit all locked signs" -msgstr "" - -#: init.lua -#, fuzzy -msgid "Locked Sign" -msgstr "Letrero bloqueada" - -#: init.lua -msgid "green" -msgstr "verde" - -#: init.lua -msgid "yellow" -msgstr "amarillo" - -#: init.lua -msgid "red" -msgstr "rojo" - -#: init.lua -#, fuzzy -msgid "white_red" -msgstr "rojo y blanco" - -#: init.lua -#, fuzzy -msgid "white_black" -msgstr "negro y blanco" - -#: init.lua -msgid "orange" -msgstr "naranja" - -#: init.lua -msgid "blue" -msgstr "azul" - -#: init.lua -msgid "brown" -msgstr "marrón" - -#: init.lua -#, fuzzy -msgid "Sign (@1, metal)" -msgstr "Letrero (@1, metal)" - -#: init.lua -msgid "Attempt to register unknown node as fence" -msgstr "" - -#: init.lua -msgid "Registered @1 and @2" -msgstr "Registrado @1 y @2" - -#: init.lua -msgid "[MOD] signs loaded" -msgstr "[MOD] signs cargados" diff --git a/locale/fr.po b/locale/fr.po deleted file mode 100644 index a503574..0000000 --- a/locale/fr.po +++ /dev/null @@ -1,91 +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 , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-31 18:13+0200\n" -"PO-Revision-Date: 2017-07-31 18:22+0200\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.12\n" -"Last-Translator: fat115 \n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"Language: fr\n" - -#: init.lua -msgid "Locked sign, owned by @1\n" -msgstr "Panneau verrouillé, appartient à @1\n" - -#: init.lua -msgid "locked " -msgstr "verrouillé " - -#: init.lua -msgid "@1 wrote \"@2\" to @3sign at @4" -msgstr "@1 a écrit \"@2\" sur le panneau @3en @4" - -#: init.lua -msgid "Sign" -msgstr "Panneau" - -#: init.lua -msgid "Can edit all locked signs" -msgstr "Peut modifier les panneaux verrouillés" - -#: init.lua -msgid "Locked Sign" -msgstr "Panneau (verrouillé)" - -#: init.lua -msgid "green" -msgstr "vert" - -#: init.lua -msgid "yellow" -msgstr "jaune" - -#: init.lua -msgid "red" -msgstr "rouge" - -#: init.lua -msgid "white_red" -msgstr "rouge et blanc" - -#: init.lua -msgid "white_black" -msgstr "noir et blanc" - -#: init.lua -msgid "orange" -msgstr "orange" - -#: init.lua -msgid "blue" -msgstr "bleu" - -#: init.lua -msgid "brown" -msgstr "marron" - -#: init.lua -msgid "Sign (@1, metal)" -msgstr "Panneau (@1, métal)" - -#: init.lua -msgid "Attempt to register unknown node as fence" -msgstr "Tentative d'enregistrer un nœud inconnu comme barrière" - -#: init.lua -msgid "Registered @1 and @2" -msgstr "Enregistrement de @1 et @" - -#: init.lua -msgid "[MOD] signs loaded" -msgstr "[MOD] signs chargé" diff --git a/locale/ms.po b/locale/ms.po deleted file mode 100644 index da11512..0000000 --- a/locale/ms.po +++ /dev/null @@ -1,91 +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 , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-31 18:00+0200\n" -"PO-Revision-Date: 2017-11-17 02:38+0800\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.4\n" -"Last-Translator: \n" -"Plural-Forms: nplurals=1; plural=0;\n" -"Language: ms\n" - -#: init.lua -msgid "Locked sign, owned by @1\n" -msgstr "Papan tanda berkunci, milik @1\n" - -#: init.lua -msgid "locked " -msgstr "berkunci " - -#: init.lua -msgid "@1 wrote \"@2\" to @3sign at @4" -msgstr "@1 menulis \"@2\" atas papan tanda @3dekat @4" - -#: init.lua -msgid "Sign" -msgstr "Papan Tanda" - -#: init.lua -msgid "Can edit all locked signs" -msgstr "Boleh sunting semua papan tanda berkunci" - -#: init.lua -msgid "Locked Sign" -msgstr "Papan Tanda Berkunci" - -#: init.lua -msgid "green" -msgstr "hijau" - -#: init.lua -msgid "yellow" -msgstr "kuning" - -#: init.lua -msgid "red" -msgstr "merah" - -#: init.lua -msgid "white_red" -msgstr "putih_merah" - -#: init.lua -msgid "white_black" -msgstr "putih_hitam" - -#: init.lua -msgid "orange" -msgstr "jingga" - -#: init.lua -msgid "blue" -msgstr "biru" - -#: init.lua -msgid "brown" -msgstr "perang" - -#: init.lua -msgid "Sign (@1, metal)" -msgstr "Papan Tanda (@1, logam)" - -#: init.lua -msgid "Attempt to register unknown node as fence" -msgstr "Cuba untuk mendaftar nod tidak diketahui sebagai pagar" - -#: init.lua -msgid "Registered @1 and @2" -msgstr "Telah daftar @1 dan @2" - -#: init.lua -msgid "[MOD] signs loaded" -msgstr "[MODS] signs telah dimuatkan" diff --git a/locale/ru.po b/locale/ru.po deleted file mode 100644 index 9cd01aa..0000000 --- a/locale/ru.po +++ /dev/null @@ -1,94 +0,0 @@ -# Russian Translation for the signs_lib mod. -# Copyright (C) 2018 Vanessa Ezekowitz -# This file is distributed under the same license as the signs_lib package. -# CodeXP , 2018. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: signs_lib\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-03-24 22:23+0100\n" -"PO-Revision-Date: \n" -"Last-Translator: CodeXP \n" -"Language-Team: \n" -"Language: ru\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: init.lua -msgid "Write" -msgstr "записать" - -#: init.lua -msgid "Locked sign, owned by @1\n" -msgstr "защищенная табличка, пренадлежит @1\n" - -#: init.lua -msgid "locked " -msgstr "защищенный " - -#: init.lua -msgid "@1 wrote \"@2\" to @3sign at @4" -msgstr "@1 записал \"@2\" в @3sign на @4" - -#: init.lua -msgid "Sign" -msgstr "табличка" - -#: init.lua -msgid "Can edit all locked signs" -msgstr "Может редактировать все защищенные таблички" - -#: init.lua -msgid "Locked Sign" -msgstr "защищенная табличка" - -#: init.lua -msgid "green" -msgstr "зеленая" - -#: init.lua -msgid "yellow" -msgstr "желтая" - -#: init.lua -msgid "red" -msgstr "красная" - -#: init.lua -msgid "white_red" -msgstr "краснобелая" - -#: init.lua -msgid "white_black" -msgstr "чернобелая" - -#: init.lua -msgid "orange" -msgstr "оранжевая" - -#: init.lua -msgid "blue" -msgstr "синея" - -#: init.lua -msgid "brown" -msgstr "коричневая" - -#: init.lua -msgid "Sign (@1, metal)" -msgstr "Табличка (@1, металл)" - -#: init.lua -msgid "Attempt to register unknown node as fence" -msgstr "Попытка зарегистрировать неизвестный узел как забор" - -#: init.lua -msgid "Registered @1 and @2" -msgstr "Зарегистрировано @1 для @2" - -#: init.lua -msgid "[MOD] signs loaded" -msgstr "[MOD] мод табличек загружен" diff --git a/locale/template.pot b/locale/template.pot deleted file mode 100644 index e277437..0000000 --- a/locale/template.pot +++ /dev/null @@ -1,94 +0,0 @@ -# LANGUAGE Translation for the signs_lib mod. -# Copyright (C) 2018 Vanessa Ezekowitz -# This file is distributed under the same license as the signs_lib package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: signs_lib\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-03-24 22:23+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: init.lua -msgid "Write" -msgstr "" - -#: init.lua -msgid "Locked sign, owned by @1\n" -msgstr "" - -#: init.lua -msgid "locked " -msgstr "" - -#: init.lua -msgid "@1 wrote \"@2\" to @3sign at @4" -msgstr "" - -#: init.lua -msgid "Sign" -msgstr "" - -#: init.lua -msgid "Can edit all locked signs" -msgstr "" - -#: init.lua -msgid "Locked Sign" -msgstr "" - -#: init.lua -msgid "green" -msgstr "" - -#: init.lua -msgid "yellow" -msgstr "" - -#: init.lua -msgid "red" -msgstr "" - -#: init.lua -msgid "white_red" -msgstr "" - -#: init.lua -msgid "white_black" -msgstr "" - -#: init.lua -msgid "orange" -msgstr "" - -#: init.lua -msgid "blue" -msgstr "" - -#: init.lua -msgid "brown" -msgstr "" - -#: init.lua -msgid "Sign (@1, metal)" -msgstr "" - -#: init.lua -msgid "Attempt to register unknown node as fence" -msgstr "" - -#: init.lua -msgid "Registered @1 and @2" -msgstr "" - -#: init.lua -msgid "[MOD] signs loaded" -msgstr "" diff --git a/locale/template.txt b/locale/template.txt new file mode 100644 index 0000000..22bef1d --- /dev/null +++ b/locale/template.txt @@ -0,0 +1,14 @@ +# textdomain: basic_signs +Locked Sign= +Glass Sign= +Obsidian Glass Sign= +Plastic Sign= +green= +yellow= +red= +white_red= +white_black= +orange= +blue= +brown= +Sign (@1, steel)=