From 7a4c64253f83a04c2ed8bedfd91a2eaf547096c7 Mon Sep 17 00:00:00 2001 From: lord-papirus Date: Wed, 8 Jan 2025 23:41:05 +0300 Subject: [PATCH] Mobs bee migrate to get_mod_translator(). Related to #328 --- mods/_various/mobs/bee.lua | 10 +++++----- mods/_various/mobs/locale/en.txt | 5 ----- mods/_various/mobs/locale/mobs.ru.tr | 13 +++++++++++++ mods/_various/mobs/locale/ru.txt | 15 --------------- 4 files changed, 18 insertions(+), 25 deletions(-) delete mode 100644 mods/_various/mobs/locale/en.txt create mode 100644 mods/_various/mobs/locale/mobs.ru.tr delete mode 100644 mods/_various/mobs/locale/ru.txt diff --git a/mods/_various/mobs/bee.lua b/mods/_various/mobs/bee.lua index ded8ed9b3..84e80b858 100644 --- a/mods/_various/mobs/bee.lua +++ b/mods/_various/mobs/bee.lua @@ -1,4 +1,4 @@ -local SL = lord.require_intllib() +local S = minetest.get_mod_translator() -- Bee by KrupnoPavel @@ -46,18 +46,18 @@ mobs:register_mob("mobs:bee", { --mobs:spawn_specific(name, nodes, {"air"}, min_light, max_light, 30, chance, active_object_count, -31000, max_height) mobs:spawn_specific("mobs:bee", {"group:flower"}, {"air"}, 10, 20, 30, 5000, 1, 0, 1000) -mobs:register_egg("mobs:bee", SL("Bee"), "mobs_bee_inv.png", 0) +mobs:register_egg("mobs:bee", S("Bee"), "mobs_bee_inv.png", 0) -- honey minetest.register_craftitem("mobs:honey", { - description = SL("Honey"), + description = S("Honey"), inventory_image = "mobs_honey_inv.png", on_use = minetest.item_eat(6), }) -- beehive (when placed spawns bee) minetest.register_node("mobs:beehive", { - description = SL("Beehive"), + description = S("Beehive"), drawtype = "plantlike", visual_scale = 1.0, tiles = {"mobs_beehive.png"}, @@ -88,7 +88,7 @@ minetest.register_node("mobs:beehive", { -- honey block minetest.register_node("mobs:honey_block", { - description = SL("Honey Block"), + description = S("Honey Block"), tiles = {"mobs_honey_block.png"}, groups = {snappy = 3, flammable = 2}, sounds = default.node_sound_dirt_defaults(), diff --git a/mods/_various/mobs/locale/en.txt b/mods/_various/mobs/locale/en.txt deleted file mode 100644 index 0e2057b64..000000000 --- a/mods/_various/mobs/locale/en.txt +++ /dev/null @@ -1,5 +0,0 @@ -### bee.lua ### -Honey = Honey -Beehive = Beehive -Honey Block = Honey Block -Bee = Bee \ No newline at end of file diff --git a/mods/_various/mobs/locale/mobs.ru.tr b/mods/_various/mobs/locale/mobs.ru.tr new file mode 100644 index 000000000..818d84eb4 --- /dev/null +++ b/mods/_various/mobs/locale/mobs.ru.tr @@ -0,0 +1,13 @@ +# textdomain: mobs +Honey=Мёд +Beehive=Улей +Honey Block=Блок мёда +Bee=Пчела +[MOBS] mod profiling enabled, damage not enabled=[MOBS] профилирование мода включено, урон не включен +lifetimer expired, removed @1=таймер жизни истёк, удален @1 +[Mobs Redo] @1 has spawning disabled=[Mobs Redo] спавн @1 выключен +[Mobs Redo] Chance setting for @1 is now @2=[Mobs Redo] Значение вероятности для @1 теперь равно @2 +[mobs] @1 failed to spawn at @2=@1 не удалось появиться на @2 +Missed!=Не поймал! +Enter name:=Введите имя: +Rename=Переименовать diff --git a/mods/_various/mobs/locale/ru.txt b/mods/_various/mobs/locale/ru.txt deleted file mode 100644 index c98a1bb97..000000000 --- a/mods/_various/mobs/locale/ru.txt +++ /dev/null @@ -1,15 +0,0 @@ -### bee.lua ### -Honey = Мёд -Beehive = Улей -Honey Block = Блок мёда -Bee = Пчела - -### api.lua ### -[MOBS] mod profiling enabled, damage not enabled = -lifetimer expired, removed @1 = таймер жизни истёк, удален @1 -[Mobs Redo] @1 has spawning disabled = [Mobs Redo] спавн @1 выключен -[Mobs Redo] Chance setting for @1 is now @2 = -[mobs] @1 failed to spawn at @2 = -Missed! = Не поймал! -Enter name: = Введите имя: -Rename = Переименовать