aboutsummaryrefslogtreecommitdiff
path: root/builtin/game/register.lua
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2021-03-05 15:27:33 +0000
committerSmallJoker <mk939@ymail.com>2021-03-05 16:29:48 +0100
commitcafad6ac03348aa77e8ee4bb035840e73de4b2a9 (patch)
treebf4b24df4e92ea49ccccb19101671bb136abba12 /builtin/game/register.lua
parentac8ac191691a13162667314358e96f07a65d0d1a (diff)
downloadminetest-cafad6ac03348aa77e8ee4bb035840e73de4b2a9.tar.xz
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.
Diffstat (limited to 'builtin/game/register.lua')
-rw-r--r--builtin/game/register.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/builtin/game/register.lua b/builtin/game/register.lua
index 1cff85813..e01c50335 100644
--- a/builtin/game/register.lua
+++ b/builtin/game/register.lua
@@ -1,5 +1,7 @@
-- Minetest: builtin/misc_register.lua
+local S = core.get_translator("__builtin")
+
--
-- Make raw registration functions inaccessible to anyone except this file
--
@@ -326,7 +328,7 @@ end
core.register_item(":unknown", {
type = "none",
- description = "Unknown Item",
+ description = S("Unknown Item"),
inventory_image = "unknown_item.png",
on_place = core.item_place,
on_secondary_use = core.item_secondary_use,
@@ -336,7 +338,7 @@ core.register_item(":unknown", {
})
core.register_node(":air", {
- description = "Air",
+ description = S("Air"),
inventory_image = "air.png",
wield_image = "air.png",
drawtype = "airlike",
@@ -353,7 +355,7 @@ core.register_node(":air", {
})
core.register_node(":ignore", {
- description = "Ignore",
+ description = S("Ignore"),
inventory_image = "ignore.png",
wield_image = "ignore.png",
drawtype = "airlike",
@@ -370,7 +372,7 @@ core.register_node(":ignore", {
core.chat_send_player(
placer:get_player_name(),
core.colorize("#FF0000",
- "You can't place 'ignore' nodes!"))
+ S("You can't place 'ignore' nodes!")))
return ""
end,
})