From 5dd6dc09939da694bc45d690ecd903ec511990c4 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 6 Apr 2020 00:06:02 +0200 Subject: [PATCH] Move to new translation system --- README.md | 1 - depends.txt | 1 - init.lua | 8 +------- locale/de.txt | 12 ------------ locale/teletool.de.tr | 13 +++++++++++++ locale/template.txt | 25 +++++++++++++------------ 6 files changed, 27 insertions(+), 33 deletions(-) delete mode 100644 locale/de.txt create mode 100644 locale/teletool.de.tr diff --git a/README.md b/README.md index fb7e81d..1abb4ee 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,6 @@ the installed mods. * `technic`: For electronic point teleporter * `mana`: For magic point teleporter * `default` and `technic`: For crafting recipe for electronic point teleporter -* `intllib`: For simple translation of item names Also supported (but not through a direct dependency) is the `doc_items` mod from the Documentation System modpack; help texts for all tools are provided. diff --git a/depends.txt b/depends.txt index d4df5fa..efb3388 100644 --- a/depends.txt +++ b/depends.txt @@ -1,4 +1,3 @@ -intllib? technic? default? mana? diff --git a/init.lua b/init.lua index 138c320..704960c 100644 --- a/init.lua +++ b/init.lua @@ -1,10 +1,4 @@ --- Boilerplate to support localized strings if intllib mod is installed. -local S -if minetest.get_modpath("intllib") then - S = intllib.Getter() -else - S = function(s) return s end -end +local S = minetest.get_translator("teletool") local REACH = 20.0 diff --git a/locale/de.txt b/locale/de.txt deleted file mode 100644 index 87fe137..0000000 --- a/locale/de.txt +++ /dev/null @@ -1,12 +0,0 @@ -Electronic point teleporter = Elektronischer Zeigeteleporter -Magical point teleporter = Magischer Zeigeteleporter -Infinite point teleporter = Unendlicher Zeigeteleporter -Point teleporters are short-range teleportation devices which allow the user to teleport instantly towards a block they point at. = Zeigeteleporter sind Teleportationsgeräte für kurze Entfernungen, welche es ihren Benutzern ermöglichen, sich sofort zu einem Block, auf dem sie zeigen, zu teleportieren. -Infinite point teleporters are very powerful, they can be used without limits. = Unendliche Zeigeteleporter sind sehr mächtig, sie können unbegrenzt verwendet werden. -Magical point teleporters are fueled by mana and require %d mana per teleportation. = Magische Zeigeteleporter werden von Mana angetrieben und erfordern %d Mana pro Teleportation. -Electronic point teleporters run on electricity and must be charged initially. Fully charged, they can be used about 50 times. = Elektronische Zeigeteleporter werden von Elektrizität angetrieben und müssen zuerst aufgeladen werden. Voll aufgeladen können sie ca. 50 mal benutzt werden. -To use this tool, point to a face of a block and punch to teleport in front of it. The target location must have a minimum amount of space for you to stand in, otherwise, teleportation will fail. = Um dieses Werkzeug zu benutzen, zeigen Sie auf eine Seite eines Blockes, und schlagen Sie, um sich direkt davor zu teleportieren. Der Zielort muss genügend Platz haben, damit Sie darin stehen können, ansonsten wird die Teleportation fehlschlagen. -To recharge this tool, place it in a powered battery box. = Um dieses Werkzeug wiederaufzuladen, platzieren Sie es in einer mit Strom versorgten Batteriebox. -First make sure you have at least %d mana. = Stellen Sie zunächst sicher, dass Sie mindestens %d Mana haben. -What an awesome device! = Was für ein tolles Gerät! -Craft an electronic point teleporter. = Fertigen Sie einen elektronischen Zeigeteleporter. diff --git a/locale/teletool.de.tr b/locale/teletool.de.tr new file mode 100644 index 0000000..f6c1e85 --- /dev/null +++ b/locale/teletool.de.tr @@ -0,0 +1,13 @@ +# textdomain:teletool +Electronic point teleporter=Elektronischer Zeigeteleporter +Magical point teleporter=Magischer Zeigeteleporter +Infinite point teleporter=Unendlicher Zeigeteleporter +Point teleporters are short-range teleportation devices which allow the user to teleport instantly towards a block they point at.=Zeigeteleporter sind Teleportationsgeräte für kurze Entfernungen, welche es ihren Benutzern ermöglichen, sich sofort zu einem Block, auf dem sie zeigen, zu teleportieren. +Infinite point teleporters are very powerful, they can be used without limits.=Unendliche Zeigeteleporter sind sehr mächtig, sie können unbegrenzt verwendet werden. +Magical point teleporters are fueled by mana and require @1 mana per teleportation.=Magische Zeigeteleporter werden von Mana angetrieben und erfordern @1 Mana pro Teleportation. +Electronic point teleporters run on electricity and must be charged initially. Fully charged, they can be used about 50 times.=Elektronische Zeigeteleporter werden von Elektrizität angetrieben und müssen zuerst aufgeladen werden. Voll aufgeladen können sie ca. 50 mal benutzt werden. +To use this tool, point to a face of a block and punch to teleport in front of it. The target location must have a minimum amount of space for you to stand in, otherwise, teleportation will fail.=Um dieses Werkzeug zu benutzen, zeigen Sie auf eine Seite eines Blockes, und schlagen Sie, um sich direkt davor zu teleportieren. Der Zielort muss genügend Platz haben, damit Sie darin stehen können, ansonsten wird die Teleportation fehlschlagen. +To recharge this tool, place it in a powered battery box.=Um dieses Werkzeug wiederaufzuladen, platzieren Sie es in einer mit Strom versorgten Batteriebox. +First make sure you have at least @1 mana.=Stellen Sie zunächst sicher, dass Sie mindestens @1 Mana haben. +What an awesome device!=Was für ein tolles Gerät! +Craft an electronic point teleporter.=Fertigen Sie einen elektronischen Zeigeteleporter. diff --git a/locale/template.txt b/locale/template.txt index 8952fd8..57a6168 100644 --- a/locale/template.txt +++ b/locale/template.txt @@ -1,12 +1,13 @@ -Infinite point teleporter -Electronic point teleporter -Magical point teleporter -Point teleporters are short-range teleportation devices which allow the user to teleport instantly towards a block they point at. -Infinite point teleporters are very powerful, they can be used without limits. -Magical point teleporters are fueled by mana and require %d mana per teleportation. -Electronic point teleporters run on electricity and must be charged initially. Fully charged, they can be used about 50 times. -To use this tool, point to a face of a block and punch to teleport in front of it. The target location must have a minimum amount of space for you to stand in, otherwise, teleportation will fail. -To recharge this tool, place it in a powered battery box. -First make sure you have at least %d mana. -What an awesome device! -Craft an electronic point teleporter. +# textdomain:teletool +Infinite point teleporter= +Electronic point teleporter= +Magical point teleporter= +Point teleporters are short-range teleportation devices which allow the user to teleport instantly towards a block they point at.= +Infinite point teleporters are very powerful, they can be used without limits.= +Magical point teleporters are fueled by mana and require @1 mana per teleportation.= +Electronic point teleporters run on electricity and must be charged initially. Fully charged, they can be used about 50 times.= +To use this tool, point to a face of a block and punch to teleport in front of it. The target location must have a minimum amount of space for you to stand in, otherwise, teleportation will fail.= +To recharge this tool, place it in a powered battery box.= +First make sure you have at least @1 mana.= +What an awesome device!= +Craft an electronic point teleporter.=