From 6f91c379a604051be5e5dfcbfbd687c6e14ce91f Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 24 Aug 2019 18:01:48 +0200 Subject: [PATCH] Use 5.0.0 translation system --- init.lua | 25 ++++++++----- locale/de.txt | 45 ----------------------- locale/pep.de.tr | 45 +++++++++++++++++++++++ locale/template.txt | 88 ++++++++++++++++++++++----------------------- 4 files changed, 106 insertions(+), 97 deletions(-) delete mode 100644 locale/de.txt create mode 100644 locale/pep.de.tr diff --git a/init.lua b/init.lua index 2e377fd..57690f5 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("pep") local ppa = minetest.get_modpath("playerphysics") pep = {} @@ -23,7 +17,7 @@ function pep.register_potion(potiondef) end end minetest.register_craftitem("pep:"..potiondef.basename, { - description = string.format(S("Glass Bottle (%s)"), potiondef.contentstring), + description = S("Glass Bottle (@1)", potiondef.contentstring), _doc_items_longdesc = potiondef.longdesc, _doc_items_usagehelp = S("Hold it in your hand, then left-click to drink it."), inventory_image = "pep_"..potiondef.basename..".png", @@ -243,6 +237,14 @@ playereffects.register_effect_type("pepmole", S("Mole mode"), "pep_mole.png", {" pep.disable_mole_mode(player:get_player_name()) end ) +playereffects.register_effect_type("pepglow", S("Glow"), "pep_glow.png", {"glow"}, + function(player) + player:set_properties({glow=minetest.LIGHT_MAX}) + end, + function(effect, player) + player:set_properties({glow=0}) + end +) pep.register_potion({ basename = "speedplus", @@ -328,6 +330,13 @@ pep.register_potion({ effect_type = "pepmole", duration = 18, }) +pep.register_potion({ + basename = "glow", + contentstring = S("Glow Potion"), + longdesc = S("Drinking it will make you glow. The effect lasts for 60 seconds."), + effect_type = "pepglow", + duration = 60, +}) if(minetest.get_modpath("mana")~=nil) then pep.register_potion({ basename = "manaregen", diff --git a/locale/de.txt b/locale/de.txt deleted file mode 100644 index 9c8742a..0000000 --- a/locale/de.txt +++ /dev/null @@ -1,45 +0,0 @@ -Air Potion = Lufttrank -Drinking it gives you breath underwater for 30 seconds. = Trinken Sie dies, um im Wasser für 30 Sekunden lang einen perfekten Atem zu haben. -Drinking it makes you regenerate health quickly. Every second you get 2 HP, 10 times in total. = Trinken Sie dies, um Ihre Gesundheit zu regenerieren. Jede Sekunde erhalten Sie 2 TP, und das insgesamt 10 mal. -Drinking it makes you regenerate health. Every 2 seconds, you get 1 HP, 10 times in total. = Trinken Sie dies, um Ihre Gesundheit zu regenerieren. Alle 2 Sekunden erhalten Sie 1 TP, und das insgesamt 10 mal. -Drinking it will increase your mana regeneration rate by 0.5 for 10 seconds. = Trinken Sie dies, um Ihre Manaregenerierungsrate für 10 Sekunden um 0,5 zu erhöhen. -Drinking it will increase your mana regeneration rate by 1 for 10 seconds. = Trinken Sie dies, um Ihre Manaregenerierungsrate für 10 Sekunden um 1 zu erhöhen. -Drinking it will make you jump higher for 30 seconds. = Trinken Sie dies, um für 30 Sekunden lang höher springen zu können. -Drinking it will make you jump lower for 30 seconds. = Trinken Sie dies, um für 30 Sekunden lang Ihre Sprunghöhe zu reduzieren. -Drinking it will make you run faster for 30 seconds. = Trinken Sie dies, um für 30 Sekunden lang schneller laufen zu können. -Drinking it will make you walk slower for 30 seconds. = Trinken Sie dies, um für 30 Sekunden lang Ihre Gehschwindigkeit zu reduzieren. -Drinking it will start an effect which will magically attempt to mine any two blocks in front of you horizontally, as if you were using a steel pickaxe on them. The effect lasts for 18 seconds. = Wenn Sie diesen Trank trinken, wird eine Wirkung ausgelöst, welche auf magische Weise versucht, die beiden Blöcke horizontal vor Ihnen abzubauen, als ob Sie eine Stahlspitzhacke auf sie anwenden würden. Die Wirkung dauert 18 Sekunden. -Drinking it will stop all gravity effects you currently have. = Trinken Sie dies, um alle Schwerkraftwirkungen, die Sie momentan haben, aufzuheben. -Drinking it will stop all jumping effects you may currently have. = Trinken Sie dies, um alle Sprungwirkungen, die Sie momentan haben, aufzuheben. -Drinking it will stop all speed effects you may currently have. = Trinken Sie dies, um alle Geschwindigkeitswirkungen, die Sie momentan haben, aufzuheben. -Glass Bottle (%s) = Glasflasche (%s) -Gravity Neutralizer = Schwerkraftneutralisator -Gravity neutralizer = Schwerkraftneutralisator -High Jumping Potion = Hochsprungtrank -High jump = Hochsprung -High speed = Schnell -# »ihn« = der Trank -Hold it in your hand, then left-click to drink it. = Halten Sie ihn in Ihrer Hand, dann klicken Sie mit der linken Maustaste, um ihn zu trinken. -Jump Neutralizer = Sprungneutralisator -Jump height neutralizer = Sprunghöhenneutralisator -Low Jumping Potion = Tiefsprungtrank -Low jump = Tiefsprung -Low speed = Langsam -Mole Potion = Maulwurfstrank -Mole mode = Maulwurfsmodus -No gravity = Schwerelos -Non-Gravity Potion = Schwerelosigkeitstrank -Perfect breath = Perfekter Atem -Regeneration = Regeneration -Running Potion = Lauftrank -Slug Potion = Schneckentrank -Speed Neutralizer = Temponeutralisator -Speed neutralizer = Temponeutralisator -Strong Healing Potion = Starker Heiltrank -Strong Mana Potion = Starker Manatrank -Strong mana boost = Staker Manaschub -Strong regeneration = Starke Regeneration -Weak Healing Potion = Schwacher Heiltrank -Weak Mana Potion = Schwacher Manatrank -Weak mana boost = Schwacher Manaschub -When you drink this potion, gravity stops affecting you, as if you were in space. The effect lasts for 20 seconds. = Wenn Sie diesen Trank trinken, wird die Schwerkraft Sie nicht mehr beeinflussen, als ob Sie im Weltall wären. Die Wirkung hält für 20 Sekunden an. diff --git a/locale/pep.de.tr b/locale/pep.de.tr new file mode 100644 index 0000000..fcaa89e --- /dev/null +++ b/locale/pep.de.tr @@ -0,0 +1,45 @@ +Air Potion=Lufttrank +Drinking it gives you breath underwater for 30 seconds.=Trinken Sie dies, um im Wasser für 30 Sekunden lang einen perfekten Atem zu haben. +Drinking it makes you regenerate health quickly. Every second you get 2 HP, 10 times in total.=Trinken Sie dies, um Ihre Gesundheit zu regenerieren. Jede Sekunde erhalten Sie 2 TP, und das insgesamt 10 mal. +Drinking it makes you regenerate health. Every 2 seconds, you get 1 HP, 10 times in total.=Trinken Sie dies, um Ihre Gesundheit zu regenerieren. Alle 2 Sekunden erhalten Sie 1 TP, und das insgesamt 10 mal. +Drinking it will increase your mana regeneration rate by 0.5 for 10 seconds.=Trinken Sie dies, um Ihre Manaregenerierungsrate für 10 Sekunden um 0,5 zu erhöhen. +Drinking it will increase your mana regeneration rate by 1 for 10 seconds.=Trinken Sie dies, um Ihre Manaregenerierungsrate für 10 Sekunden um 1 zu erhöhen. +Drinking it will make you jump higher for 30 seconds.=Trinken Sie dies, um für 30 Sekunden lang höher springen zu können. +Drinking it will make you jump lower for 30 seconds.=Trinken Sie dies, um für 30 Sekunden lang Ihre Sprunghöhe zu reduzieren. +Drinking it will make you run faster for 30 seconds.=Trinken Sie dies, um für 30 Sekunden lang schneller laufen zu können. +Drinking it will make you walk slower for 30 seconds.=Trinken Sie dies, um für 30 Sekunden lang Ihre Gehschwindigkeit zu reduzieren. +Drinking it will start an effect which will magically attempt to mine any two blocks in front of you horizontally, as if you were using a steel pickaxe on them. The effect lasts for 18 seconds.=Wenn Sie diesen Trank trinken, wird eine Wirkung ausgelöst, welche auf magische Weise versucht, die beiden Blöcke horizontal vor Ihnen abzubauen, als ob Sie eine Stahlspitzhacke auf sie anwenden würden. Die Wirkung dauert 18 Sekunden. +Drinking it will stop all gravity effects you currently have.=Trinken Sie dies, um alle Schwerkraftwirkungen, die Sie momentan haben, aufzuheben. +Drinking it will stop all jumping effects you may currently have.=Trinken Sie dies, um alle Sprungwirkungen, die Sie momentan haben, aufzuheben. +Drinking it will stop all speed effects you may currently have.=Trinken Sie dies, um alle Geschwindigkeitswirkungen, die Sie momentan haben, aufzuheben. +Glass Bottle (@1)=Glasflasche (@1) +Gravity Neutralizer=Schwerkraftneutralisator +Gravity neutralizer=Schwerkraftneutralisator +High Jumping Potion=Hochsprungtrank +High jump=Hochsprung +High speed=Schnell +# »ihn«=der Trank +Hold it in your hand, then left-click to drink it.=Halten Sie ihn in Ihrer Hand, dann klicken Sie mit der linken Maustaste, um ihn zu trinken. +Jump Neutralizer=Sprungneutralisator +Jump height neutralizer=Sprunghöhenneutralisator +Low Jumping Potion=Tiefsprungtrank +Low jump=Tiefsprung +Low speed=Langsam +Mole Potion=Maulwurfstrank +Mole mode=Maulwurfsmodus +No gravity=Schwerelos +Non-Gravity Potion=Schwerelosigkeitstrank +Perfect breath=Perfekter Atem +Regeneration=Regeneration +Running Potion=Lauftrank +Slug Potion=Schneckentrank +Speed Neutralizer=Temponeutralisator +Speed neutralizer=Temponeutralisator +Strong Healing Potion=Starker Heiltrank +Strong Mana Potion=Starker Manatrank +Strong mana boost=Staker Manaschub +Strong regeneration=Starke Regeneration +Weak Healing Potion=Schwacher Heiltrank +Weak Mana Potion=Schwacher Manatrank +Weak mana boost=Schwacher Manaschub +When you drink this potion, gravity stops affecting you, as if you were in space. The effect lasts for 20 seconds.=Wenn Sie diesen Trank trinken, wird die Schwerkraft Sie nicht mehr beeinflussen, als ob Sie im Weltall wären. Die Wirkung hält für 20 Sekunden an. diff --git a/locale/template.txt b/locale/template.txt index 00ea1ce..1aa663b 100644 --- a/locale/template.txt +++ b/locale/template.txt @@ -1,44 +1,44 @@ -Air Potion = -Drinking it gives you breath underwater for 30 seconds. = -Drinking it makes you regenerate health quickly. Every second you get 2 HP, 10 times in total. = -Drinking it makes you regenerate health. Every 2 seconds, you get 1 HP, 10 times in total. = -Drinking it will increase your mana regeneration rate by 0.5 for 10 seconds. = -Drinking it will increase your mana regeneration rate by 1 for 10 seconds. = -Drinking it will make you jump higher for 30 seconds. = -Drinking it will make you jump lower for 30 seconds. = -Drinking it will make you run faster for 30 seconds. = -Drinking it will make you walk slower for 30 seconds. = -Drinking it will start an effect which will magically attempt to mine any two blocks in front of you horizontally, as if you were using a steel pickaxe on them. The effect lasts for 18 seconds. = -Drinking it will stop all gravity effects you currently have. = -Drinking it will stop all jumping effects you may currently have. = -Drinking it will stop all speed effects you may currently have. = -Glass Bottle (%s) = -Gravity Neutralizer = -Gravity neutralizer = -High Jumping Potion = -High jump = -High speed = -Hold it in your hand, then left-click to drink it. = -Jump Neutralizer = -Jump height neutralizer = -Low Jumping Potion = -Low jump = -Low speed = -Mole Potion = -Mole mode = -No gravity = -Non-Gravity Potion = -Perfect breath = -Regeneration = -Running Potion = -Slug Potion = -Speed Neutralizer = -Speed neutralizer = -Strong Healing Potion = -Strong Mana Potion = -Strong mana boost = -Strong regeneration = -Weak Healing Potion = -Weak Mana Potion = -Weak mana boost = -When you drink this potion, gravity stops affecting you, as if you were in space. The effect lasts for 20 seconds. = +Air Potion= +Drinking it gives you breath underwater for 30 seconds.= +Drinking it makes you regenerate health quickly. Every second you get 2 HP, 10 times in total.= +Drinking it makes you regenerate health. Every 2 seconds, you get 1 HP, 10 times in total.= +Drinking it will increase your mana regeneration rate by 0.5 for 10 seconds.= +Drinking it will increase your mana regeneration rate by 1 for 10 seconds.= +Drinking it will make you jump higher for 30 seconds.= +Drinking it will make you jump lower for 30 seconds.= +Drinking it will make you run faster for 30 seconds.= +Drinking it will make you walk slower for 30 seconds.= +Drinking it will start an effect which will magically attempt to mine any two blocks in front of you horizontally, as if you were using a steel pickaxe on them. The effect lasts for 18 seconds.= +Drinking it will stop all gravity effects you currently have.= +Drinking it will stop all jumping effects you may currently have.= +Drinking it will stop all speed effects you may currently have.= +Glass Bottle (@1)= +Gravity Neutralizer= +Gravity neutralizer= +High Jumping Potion= +High jump= +High speed= +Hold it in your hand, then left-click to drink it.= +Jump Neutralizer= +Jump height neutralizer= +Low Jumping Potion= +Low jump= +Low speed= +Mole Potion= +Mole mode= +No gravity= +Non-Gravity Potion= +Perfect breath= +Regeneration= +Running Potion= +Slug Potion= +Speed Neutralizer= +Speed neutralizer= +Strong Healing Potion= +Strong Mana Potion= +Strong mana boost= +Strong regeneration= +Weak Healing Potion= +Weak Mana Potion= +Weak mana boost= +When you drink this potion, gravity stops affecting you, as if you were in space. The effect lasts for 20 seconds.=