diff options
author | Wuzzy <wuzzy2@mail.ru> | 2021-03-05 15:27:33 +0000 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2021-03-05 16:29:48 +0100 |
commit | cafad6ac03348aa77e8ee4bb035840e73de4b2a9 (patch) | |
tree | bf4b24df4e92ea49ccccb19101671bb136abba12 /builtin/client | |
parent | ac8ac191691a13162667314358e96f07a65d0d1a (diff) | |
download | minetest-cafad6ac03348aa77e8ee4bb035840e73de4b2a9.tar.gz minetest-cafad6ac03348aa77e8ee4bb035840e73de4b2a9.tar.bz2 minetest-cafad6ac03348aa77e8ee4bb035840e73de4b2a9.zip |
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/client')
-rw-r--r-- | builtin/client/chatcommands.lua | 9 | ||||
-rw-r--r-- | builtin/client/death_formspec.lua | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/builtin/client/chatcommands.lua b/builtin/client/chatcommands.lua index 0e8d4dd03..a563a6627 100644 --- a/builtin/client/chatcommands.lua +++ b/builtin/client/chatcommands.lua @@ -1,6 +1,5 @@ -- Minetest: builtin/client/chatcommands.lua - core.register_on_sending_chat_message(function(message) if message:sub(1,2) == ".." then return false @@ -8,7 +7,7 @@ core.register_on_sending_chat_message(function(message) local first_char = message:sub(1,1) if first_char == "/" or first_char == "." then - core.display_chat_message(core.gettext("issued command: ") .. message) + core.display_chat_message(core.gettext("Issued command: ") .. message) end if first_char ~= "." then @@ -19,7 +18,7 @@ core.register_on_sending_chat_message(function(message) param = param or "" if not cmd then - core.display_chat_message(core.gettext("-!- Empty command")) + core.display_chat_message("-!- " .. core.gettext("Empty command.")) return true end @@ -36,7 +35,7 @@ core.register_on_sending_chat_message(function(message) core.display_chat_message(result) end else - core.display_chat_message(core.gettext("-!- Invalid command: ") .. cmd) + core.display_chat_message("-!- " .. core.gettext("Invalid command: ") .. cmd) end return true @@ -66,7 +65,7 @@ core.register_chatcommand("clear_chat_queue", { description = core.gettext("Clear the out chat queue"), func = function(param) core.clear_out_chat_queue() - return true, core.gettext("The out chat queue is now empty") + return true, core.gettext("The out chat queue is now empty.") end, }) diff --git a/builtin/client/death_formspec.lua b/builtin/client/death_formspec.lua index e755ac5c1..7df0cbd75 100644 --- a/builtin/client/death_formspec.lua +++ b/builtin/client/death_formspec.lua @@ -2,7 +2,7 @@ -- handled by the engine. core.register_on_death(function() - core.display_chat_message("You died.") + core.display_chat_message(core.gettext("You died.")) local formspec = "size[11,5.5]bgcolor[#320000b4;true]" .. "label[4.85,1.35;" .. fgettext("You died") .. "]button_exit[4,3;3,0.5;btn_respawn;".. fgettext("Respawn") .."]" |