1
0
Fork 0

New translation system, part 4: Misc/Player

objects
Wuzzy 2019-03-07 21:14:30 +01:00
parent 0d6610dcee
commit 0cc038c545
4 changed files with 9 additions and 13 deletions

View File

@ -1,11 +1,6 @@
local minecraftaliases = true local minecraftaliases = true
local S local S = minetest.get_translator("mcl_commands")
if minetest.get_modpath("intllib") then
S = intllib.Getter()
else
S = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end
end
local function handle_kill_command(suspect, victim) local function handle_kill_command(suspect, victim)
if minetest.settings:get_bool("enable_damage") == false then if minetest.settings:get_bool("enable_damage") == false then

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mcl_privs")
minetest.register_privilege("maphack", { minetest.register_privilege("maphack", {
description = "Can place and use advanced blocks like mob spawners, command blocks and barriers.", description = S("Can place and use advanced blocks like mob spawners, command blocks and barriers."),
}) })

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mcl_wip")
local wip_items = { local wip_items = {
"mcl_fishing:fishing_rod", "mcl_fishing:fishing_rod",
"mcl_maps:empty_map", "mcl_maps:empty_map",
@ -27,7 +29,7 @@ for i=1,#wip_items do
if new_description == "" then if new_description == "" then
new_description = wip_items[i] new_description = wip_items[i]
end end
new_description = new_description .. "\n"..core.colorize("#FF0000", "(WIP)") new_description = new_description .. "\n"..core.colorize("#FF0000", S("(WIP)"))
new_groups.not_in_craft_guide = 1 new_groups.not_in_craft_guide = 1
minetest.override_item(wip_items[i], { description = new_description, groups = new_groups }) minetest.override_item(wip_items[i], { description = new_description, groups = new_groups })
end end
@ -39,7 +41,7 @@ for i=1,#experimental_items do
break break
end end
local new_description = def.description local new_description = def.description
new_description = new_description .. "\n"..core.colorize("#FFFF00", "(Temporary)") new_description = new_description .. "\n"..core.colorize("#FFFF00", S("(Temporary)"))
minetest.override_item(experimental_items[i], { description = new_description }) minetest.override_item(experimental_items[i], { description = new_description })
end end

View File

@ -6,10 +6,7 @@ mcl_skins = {
skin_count = 0, -- counter of _custom_ skins (all skins except character.png) skin_count = 0, -- counter of _custom_ skins (all skins except character.png)
} }
local S = minetest.get_translator("mcl_skins")
-- Load support for intllib.
local S, NS = dofile(mcl_skins.modpath .. "/intllib.lua")
-- load skin list and metadata -- load skin list and metadata
local id, f, data, skin = 0 local id, f, data, skin = 0