mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Translate builtin (#10693)
This PR is the second attempt to translate builtin. Server-sent translation files can be added to `builtin/locale/`, whereas client-side translations depend on gettext.
This commit is contained in:
parent
ac8ac19169
commit
cafad6ac03
12 changed files with 623 additions and 334 deletions
|
@ -1,5 +1,7 @@
|
|||
-- Minetest: builtin/privileges.lua
|
||||
|
||||
local S = core.get_translator("__builtin")
|
||||
|
||||
--
|
||||
-- Privileges
|
||||
--
|
||||
|
@ -15,7 +17,7 @@ function core.register_privilege(name, param)
|
|||
def.give_to_admin = def.give_to_singleplayer
|
||||
end
|
||||
if def.description == nil then
|
||||
def.description = "(no description)"
|
||||
def.description = S("(no description)")
|
||||
end
|
||||
end
|
||||
local def
|
||||
|
@ -28,69 +30,69 @@ function core.register_privilege(name, param)
|
|||
core.registered_privileges[name] = def
|
||||
end
|
||||
|
||||
core.register_privilege("interact", "Can interact with things and modify the world")
|
||||
core.register_privilege("shout", "Can speak in chat")
|
||||
core.register_privilege("basic_privs", "Can modify 'shout' and 'interact' privileges")
|
||||
core.register_privilege("privs", "Can modify privileges")
|
||||
core.register_privilege("interact", S("Can interact with things and modify the world"))
|
||||
core.register_privilege("shout", S("Can speak in chat"))
|
||||
core.register_privilege("basic_privs", S("Can modify 'shout' and 'interact' privileges"))
|
||||
core.register_privilege("privs", S("Can modify privileges"))
|
||||
|
||||
core.register_privilege("teleport", {
|
||||
description = "Can teleport self",
|
||||
description = S("Can teleport self"),
|
||||
give_to_singleplayer = false,
|
||||
})
|
||||
core.register_privilege("bring", {
|
||||
description = "Can teleport other players",
|
||||
description = S("Can teleport other players"),
|
||||
give_to_singleplayer = false,
|
||||
})
|
||||
core.register_privilege("settime", {
|
||||
description = "Can set the time of day using /time",
|
||||
description = S("Can set the time of day using /time"),
|
||||
give_to_singleplayer = false,
|
||||
})
|
||||
core.register_privilege("server", {
|
||||
description = "Can do server maintenance stuff",
|
||||
description = S("Can do server maintenance stuff"),
|
||||
give_to_singleplayer = false,
|
||||
give_to_admin = true,
|
||||
})
|
||||
core.register_privilege("protection_bypass", {
|
||||
description = "Can bypass node protection in the world",
|
||||
description = S("Can bypass node protection in the world"),
|
||||
give_to_singleplayer = false,
|
||||
})
|
||||
core.register_privilege("ban", {
|
||||
description = "Can ban and unban players",
|
||||
description = S("Can ban and unban players"),
|
||||
give_to_singleplayer = false,
|
||||
give_to_admin = true,
|
||||
})
|
||||
core.register_privilege("kick", {
|
||||
description = "Can kick players",
|
||||
description = S("Can kick players"),
|
||||
give_to_singleplayer = false,
|
||||
give_to_admin = true,
|
||||
})
|
||||
core.register_privilege("give", {
|
||||
description = "Can use /give and /giveme",
|
||||
description = S("Can use /give and /giveme"),
|
||||
give_to_singleplayer = false,
|
||||
})
|
||||
core.register_privilege("password", {
|
||||
description = "Can use /setpassword and /clearpassword",
|
||||
description = S("Can use /setpassword and /clearpassword"),
|
||||
give_to_singleplayer = false,
|
||||
give_to_admin = true,
|
||||
})
|
||||
core.register_privilege("fly", {
|
||||
description = "Can use fly mode",
|
||||
description = S("Can use fly mode"),
|
||||
give_to_singleplayer = false,
|
||||
})
|
||||
core.register_privilege("fast", {
|
||||
description = "Can use fast mode",
|
||||
description = S("Can use fast mode"),
|
||||
give_to_singleplayer = false,
|
||||
})
|
||||
core.register_privilege("noclip", {
|
||||
description = "Can fly through solid nodes using noclip mode",
|
||||
description = S("Can fly through solid nodes using noclip mode"),
|
||||
give_to_singleplayer = false,
|
||||
})
|
||||
core.register_privilege("rollback", {
|
||||
description = "Can use the rollback functionality",
|
||||
description = S("Can use the rollback functionality"),
|
||||
give_to_singleplayer = false,
|
||||
})
|
||||
core.register_privilege("debug", {
|
||||
description = "Allows enabling various debug options that may affect gameplay",
|
||||
description = S("Allows enabling various debug options that may affect gameplay"),
|
||||
give_to_singleplayer = false,
|
||||
give_to_admin = true,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue