From ded38fbe35f8f911857a25f189ba21e4e23a455b Mon Sep 17 00:00:00 2001 From: lord-papirus Date: Mon, 23 Dec 2024 21:47:51 +0300 Subject: [PATCH] Translations: `protector_lott`. Related to #328 (#1871) --- mods/lord/Blocks/protector_lott/blocks.lua | 6 +- mods/lord/Blocks/protector_lott/chests.lua | 14 ++--- mods/lord/Blocks/protector_lott/doors.lua | 4 +- mods/lord/Blocks/protector_lott/init.lua | 34 +++++------ mods/lord/Blocks/protector_lott/locale/en.txt | 59 ------------------ .../locale/protector_lott.ru.tr | 60 +++++++++++++++++++ mods/lord/Blocks/protector_lott/locale/ru.txt | 59 ------------------ 7 files changed, 89 insertions(+), 147 deletions(-) delete mode 100644 mods/lord/Blocks/protector_lott/locale/en.txt create mode 100644 mods/lord/Blocks/protector_lott/locale/protector_lott.ru.tr delete mode 100644 mods/lord/Blocks/protector_lott/locale/ru.txt diff --git a/mods/lord/Blocks/protector_lott/blocks.lua b/mods/lord/Blocks/protector_lott/blocks.lua index cdee429cb..ec365d695 100644 --- a/mods/lord/Blocks/protector_lott/blocks.lua +++ b/mods/lord/Blocks/protector_lott/blocks.lua @@ -1,4 +1,4 @@ -local SL = lord.require_intllib() +local S = minetest.get_mod_translator() minetest.register_alias("protector_lott:protect", "protector_lott:protect_stone") @@ -12,7 +12,7 @@ local function reg_prot_node(subname, desc, base_node_name, texture) end minetest.register_node("protector_lott:protect_"..subname, { - description = SL("Protection "..desc), + description = S("Protection "..desc), tiles = {texture, texture, texture.."^protector_logo.png"}, sounds = default.node_sound_stone_defaults(), groups = groups, @@ -21,7 +21,7 @@ local function reg_prot_node(subname, desc, base_node_name, texture) after_place_node = function(pos, placer) local meta = minetest.get_meta(pos) meta:set_string("owner", placer:get_player_name() or "") - meta:set_string("infotext", SL("Protection").." ("..SL("owned by").." " .. meta:get_string("owner") .. ")") + meta:set_string("infotext", S("Protection").." ("..S("owned by").." " .. meta:get_string("owner") .. ")") meta:set_string("members", "") end, diff --git a/mods/lord/Blocks/protector_lott/chests.lua b/mods/lord/Blocks/protector_lott/chests.lua index d3cc32747..4bec72a27 100644 --- a/mods/lord/Blocks/protector_lott/chests.lua +++ b/mods/lord/Blocks/protector_lott/chests.lua @@ -1,9 +1,9 @@ -local SL = lord.require_intllib() +local S = minetest.get_mod_translator() -- Protected Chest minetest.register_node("protector_lott:chest", { - description = SL("Protected Chest"), + description = S("Protected Chest"), tiles = { "default_chest_top.png", "default_chest_top.png", "default_chest_side.png", "default_chest_side.png", @@ -17,7 +17,7 @@ minetest.register_node("protector_lott:chest", { on_construct = function(pos) local meta = minetest.get_meta(pos) - meta:set_string("infotext", SL("Protected Chest")) + meta:set_string("infotext", S("Protected Chest")) meta:set_string("name", "") local inv = meta:get_inventory() inv:set_size("main", 8 * 4) @@ -49,10 +49,10 @@ minetest.register_node("protector_lott:chest", { local spos = pos.x .. "," .. pos.y .. "," ..pos.z local formspec = "size[8,9]" .. "list[nodemeta:".. spos .. ";main;0,0.3;8,4;]" - .. "button[0,4.5;2,0.25;toup;"..SL("To Chest").."]" + .. "button[0,4.5;2,0.25;toup;"..S("To Chest").."]" .. "field[2.3,4.8;4,0.25;chestname;;" .. meta:get_string("name") .. "]" - .. "button[6,4.5;2,0.25;todn;"..SL("To Inventory").."]" + .. "button[6,4.5;2,0.25;todn;"..S("To Inventory").."]" .. "list[current_player;main;0,5;8,1;]" .. "list[current_player;main;0,6.08;8,3;8]" .. "listring[nodemeta:" .. spos .. ";main]" @@ -110,9 +110,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) if fields.chestname ~= "" then meta:set_string("name", fields.chestname) meta:set_string("infotext", - SL("Protected Chest").." (" .. fields.chestname .. ")") + S("Protected Chest").." (" .. fields.chestname .. ")") else - meta:set_string("infotext", SL("Protected Chest")) + meta:set_string("infotext", S("Protected Chest")) end end diff --git a/mods/lord/Blocks/protector_lott/doors.lua b/mods/lord/Blocks/protector_lott/doors.lua index 03ab58b16..30659a431 100644 --- a/mods/lord/Blocks/protector_lott/doors.lua +++ b/mods/lord/Blocks/protector_lott/doors.lua @@ -1,4 +1,4 @@ -local SL = lord.require_intllib() +local S = minetest.get_mod_translator() -- Register Protected Doors @@ -13,7 +13,7 @@ local function reg_prot_door(desc, name, door, mat, texture_i, texture_uv) end doors.register(name, { tiles = {{ name = texture_uv.."^protector_logo_door_uv.png", backface_culling = true }}, - description = SL(desc), + description = S(desc), inventory_image = texture_i.."^protector_logo_i.png", groups = gd, sunlight = true, diff --git a/mods/lord/Blocks/protector_lott/init.lua b/mods/lord/Blocks/protector_lott/init.lua index 3bab80484..9bc360b3b 100644 --- a/mods/lord/Blocks/protector_lott/init.lua +++ b/mods/lord/Blocks/protector_lott/init.lua @@ -1,6 +1,6 @@ -local SL = lord.require_intllib() +local S = minetest.get_mod_translator() -minetest.register_privilege("delprotect", SL("Ignore player protection")) +minetest.register_privilege("delprotect", S("Ignore player protection")) -- get static spawn position @@ -53,8 +53,8 @@ end protector.generate_formspec = function(meta) local formspec = "size[8,7]" - .."label[0,1;"..SL("PUNCH node to show protected area or USE for area check").."]" - .."label[0,2;"..SL("Members: (type player name then press Enter to add)").."]" + .."label[0,1;"..S("PUNCH node to show protected area or USE for area check").."]" + .."label[0,2;"..S("Members: (type player name then press Enter to add)").."]" local members = protector.get_member_list(meta) local npp = 12 @@ -79,7 +79,7 @@ protector.generate_formspec = function(meta) "field_close_on_enter[protector_add_member;false]" end - formspec = formspec .. "button_exit[2.5,6.2;3,0.5;close_me;"..SL("Close").."]" + formspec = formspec .. "button_exit[2.5,6.2;3,0.5;close_me;"..S("Close").."]" return formspec end @@ -131,15 +131,15 @@ protector.can_dig = function(r, pos, digger, onlyowner, infolevel) if infolevel == 1 then minetest.get_player_by_name(digger):set_hp(dig_player:get_hp()-protector.damage) minetest.chat_send_player(digger, - SL("This area is owned by").." " .. owner .. "!") + S("This area is owned by").." " .. owner .. "!") elseif infolevel == 2 then minetest.chat_send_player(digger, - SL("This area is owned by").." " .. owner .. ".") + S("This area is owned by").." " .. owner .. ".") minetest.chat_send_player(digger, - SL("Protection located at:").." " .. minetest.pos_to_string(p)) + S("Protection located at:").." " .. minetest.pos_to_string(p)) if members ~= "" then minetest.chat_send_player(digger, - SL("Members:").." ".. members .. ".") + S("Members:").." ".. members .. ".") end end return false @@ -148,12 +148,12 @@ protector.can_dig = function(r, pos, digger, onlyowner, infolevel) if infolevel == 2 then minetest.chat_send_player(digger, - SL("This area is owned by").." " .. owner .. ".") + S("This area is owned by").." " .. owner .. ".") minetest.chat_send_player(digger, - SL("Protection located at:").." " .. minetest.pos_to_string(positions[1])) + S("Protection located at:").." " .. minetest.pos_to_string(positions[1])) if members ~= "" then minetest.chat_send_player(digger, - SL("Members:").." ".. members .. ".") + S("Members:").." ".. members .. ".") end break end @@ -163,9 +163,9 @@ protector.can_dig = function(r, pos, digger, onlyowner, infolevel) if infolevel == 2 then if #positions < 1 then minetest.chat_send_player(digger, - SL("This area is not protected.")) + S("This area is not protected.")) end - minetest.chat_send_player(digger, SL("You can build here.")) + minetest.chat_send_player(digger, S("You can build here.")) end return true @@ -226,7 +226,7 @@ function minetest.item_place(itemstack, placer, pointed_thing) local pos = pointed_thing.under if not protector.can_dig(protector.radius * 2, pos, user, true, 3) then minetest.chat_send_player(user, - SL("Overlaps into another protected area!")) + S("Overlaps into another protected area!")) return protector.old_node_place(itemstack, placer, pos) end end @@ -240,7 +240,7 @@ end --= Protection Logo minetest.register_node("protector_lott:protect2", { - description = SL("Protection Logo"), + description = S("Protection Logo"), tiles = {"protector_logo.png"}, wield_image = "protector_logo.png", inventory_image = "protector_logo.png", @@ -264,7 +264,7 @@ minetest.register_node("protector_lott:protect2", { after_place_node = function(pos, placer) local meta = minetest.get_meta(pos) meta:set_string("owner", placer:get_player_name() or "") - meta:set_string("infotext", SL("Protection").." ("..SL("owned by").." " .. meta:get_string("owner") .. ")") + meta:set_string("infotext", S("Protection").." ("..S("owned by").." " .. meta:get_string("owner") .. ")") meta:set_string("members", "") end, diff --git a/mods/lord/Blocks/protector_lott/locale/en.txt b/mods/lord/Blocks/protector_lott/locale/en.txt deleted file mode 100644 index f1da1c220..000000000 --- a/mods/lord/Blocks/protector_lott/locale/en.txt +++ /dev/null @@ -1,59 +0,0 @@ -### init.lua ### -Protection Logo = Protection Logo - -Protection = Protection -owned by = owned by - -PUNCH node to show protected area or USE for area check = PUNCH node to show protected area or USE for area check -Members: (type player name then press Enter to add) = Members: (type player name then press Enter to add) -Close = Close - -This area is owned by = This area is owned by -Protection located at: = Protection located at: -Members: = Members: -This area is not protected. = This area is not protected. -You can build here. = You can build here. - -Overlaps into another protected area! = Overlaps into another protected area! - -To Chest = To Chest -To Inventory = To Inventory - -Ignore player protection = Ignore player protection - -### blocks.lua ### -Protection Brick Block = Protection Brick Block -Protection Obsidian = Protection Obsidian -Protection Stone = Protection Stone -Protection Stonebrick = Protection Stonebrick -Protection Cobble = Protection Cobble -Protection Desert Stone = Protection Desert Stone -Protection Desert Cobble = Protection Desert Cobble -Protection Desert Stone Brick = Protection Desert Stone Brick -Protection Sandstone = Protection Sandstone -Protection Sandstone Brick = Protection Sandstone Brick -Protection Dungeon Stone = Protection Dungeon Stone -Protection Paving Stone = Protection Paving Stone -Protection Marble = Protection Marble -Protection Marble Brick = Protection Marble Brick -Protection Orc Brick = Protection Orc Brick -Protection Mordor Stone = Protection Mordor Stone - -### doors.lua ### -Protected Steel Door = Protected Steel Door -Protected Glass Door = Protected Glass Door -Protected Obsidian Glass Door = Protected Obsidian Glass Door - -Protected Wooden Door = Protected Wooden Door -Protected Junglewood Door = Protected Junglewood Door -Protected Alder Door = Protected Alder Door -Protected Birch Door = Protected Birch Door -Protected Pine Door = Protected Pine Door -Protected Lebethron Door = Protected Lebethron Door -Protected Mallorn Door = Protected Mallorn Door - -Protected Oak Door = Protected Oak Door -Protected Jail Door = Protected Jail Door - -### chests.lua ### -Protected Chest = Protected Chest diff --git a/mods/lord/Blocks/protector_lott/locale/protector_lott.ru.tr b/mods/lord/Blocks/protector_lott/locale/protector_lott.ru.tr new file mode 100644 index 000000000..48283e2ce --- /dev/null +++ b/mods/lord/Blocks/protector_lott/locale/protector_lott.ru.tr @@ -0,0 +1,60 @@ +# textdomain: protector_lott +### init.lua ### +Protection Logo=Знак защиты + +Protection=Защита +owned by=только для + +PUNCH node to show protected area or USE for area check=Ударьте этот нод для подсветки защищённой области. +Members: (type player name then press Enter to add)=Доступ для (введите имя игрока и нажмите Enter для добавления): +Close=Закрыть + +This area is owned by=Это только для +Protection located at:=Защитный блок на координатах: +Members:=Также доступно для: +This area is not protected.=Этот блок не защищён. +You can build here.=Вы можете здесь строить. + +Overlaps into another protected area!=Перекрытие с другими защищёнными регионами! + +To Chest=В сундук +To Inventory=В инвентарь + +Ignore player protection=Возможность игнорировать защиту игроков + +### blocks.lua ### +Protection Brick Block=Защитный кирпич +Protection Obsidian=Защитный обсидиан +Protection Stone=Защитный камень +Protection Cobble=Защитный булыжник +Protection Stonebrick=Защитный каменный кирпич +Protection Desert Stone=Защитный пустынный камень +Protection Desert Cobble=Защитный пустынный булыжник +Protection Desert Stone Brick=Защитный кирпич из пустынного камня +Protection Sandstone=Защитный песчаник +Protection Sandstone Brick=Защитный кирпич из песчаника +Protection Dungeon Stone=Защитный малахит +Protection Paving Stone=Защитная брусчатка +Protection Marble=Защитный мрамор +Protection Marble Brick=Защитный мраморный кирпич +Protection Orc Brick=Защитный орочий камень +Protection Mordor Stone=Защитный камень Мордора + +### doors.lua ### +Protected Steel Door=Защищённая стальная дверь +Protected Glass Door=Защищённая стеклянная дверь +Protected Obsidian Glass Door=Защищённая стеклянно-обсидиановая дверь + +Protected Wooden Door=Защищённая яблоневая дверь +Protected Junglewood Door=Защищённая эвкалиптовая дверь +Protected Alder Door=Защищённая ольховая дверь +Protected Birch Door=Защищённая берёзовая дверь +Protected Pine Door=Защищённая сосновая дверь +Protected Lebethron Door=Защищённая лебетроновая дверь +Protected Mallorn Door=Защищённая маллорновая дверь + +Protected Oak Door=Защищённая дверь с зарешоченным окном +Protected Jail Door=Защищённая дверь-решётка + +### chests.lua ### +Protected Chest=Защищённый сундук diff --git a/mods/lord/Blocks/protector_lott/locale/ru.txt b/mods/lord/Blocks/protector_lott/locale/ru.txt deleted file mode 100644 index 9d5ae5434..000000000 --- a/mods/lord/Blocks/protector_lott/locale/ru.txt +++ /dev/null @@ -1,59 +0,0 @@ -### init.lua ### -Protection Logo = Знак защиты - -Protection = Защита -owned by = только для - -PUNCH node to show protected area or USE for area check = Ударьте этот нод для подсветки защищённой области. -Members: (type player name then press Enter to add) = Доступ для (введите имя игрока и нажмите Enter для добавления): -Close = Закрыть - -This area is owned by = Это только для -Protection located at: = Защитный блок на координатах -Members: = Также доступно для -This area is not protected. = Этот блок не защищён. -You can build here. = Вы можете здесь строить. - -Overlaps into another protected area! = Перекрытие с другими защищёнными регионами! - -To Chest = В сундук -To Inventory = В инвентарь - -Ignore player protection = Возможность игнорировать защиту игроков - -### blocks.lua ### -Protection Brick Block = Защитный кирпич -Protection Obsidian = Защитный обсидиан -Protection Stone = Защитный камень -Protection Cobble = Защитный булыжник -Protection Stonebrick = Защитный каменный кирпич -Protection Desert Stone = Защитный пустынный камень -Protection Desert Cobble = Защитный пустынный булыжник -Protection Desert Stone Brick = Защитный кирпич из пустынного камня -Protection Sandstone = Защитный песчаник -Protection Sandstone Brick = Защитный кирпич из песчаника -Protection Dungeon Stone = Защитный малахит -Protection Paving Stone = Защитная брусчатка -Protection Marble = Защитный мрамор -Protection Marble Brick = Защитный мраморный кирпич -Protection Orc Brick = Защитный орочий камень -Protection Mordor Stone = Защитный камень Мордора - -### doors.lua ### -Protected Steel Door = Защищённая стальная дверь -Protected Glass Door = Защищённая стеклянная дверь -Protected Obsidian Glass Door = Защищённая стеклянно-обсидиановая дверь - -Protected Wooden Door = Защищённая яблоневая дверь -Protected Junglewood Door = Защищённая эвкалиптовая дверь -Protected Alder Door = Защищённая ольховая дверь -Protected Birch Door = Защищённая берёзовая дверь -Protected Pine Door = Защищённая сосновая дверь -Protected Lebethron Door = Защищённая лебетроновая дверь -Protected Mallorn Door = Защищённая маллорновая дверь - -Protected Oak Door = Защищённая дверь с зарешоченным окном -Protected Jail Door = Защищённая дверь-решётка - -### chests.lua ### -Protected Chest = Защищённый сундук