1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +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:
Wuzzy 2021-03-05 15:27:33 +00:00 committed by SmallJoker
parent ac8ac19169
commit cafad6ac03
12 changed files with 623 additions and 334 deletions

View file

@ -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,
})