Make descriptions translatable (add locales)

This commit is contained in:
Mikita Wiśniewski 2022-04-28 20:46:06 +07:00
parent 795836c5c0
commit 5c3cb4fa5e
3 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator(minetest.get_current_modname())
minetest.register_globalstep(function(dtime)
local players = minetest.get_connected_players()
for i=1, #players do
@ -17,7 +19,7 @@ minetest.register_globalstep(function(dtime)
end)
minetest.register_chatcommand("sit", {
description = "Sit down",
description = S("Sit down"),
func = function(name)
local player = minetest.get_player_by_name(name)
if mcl_player.player_attached[name] then
@ -35,7 +37,7 @@ minetest.register_chatcommand("sit", {
})
minetest.register_chatcommand("lay", {
description = "Lay down",
description = S("Lay down"),
func = function(name)
local player = minetest.get_player_by_name(name)
if mcl_player.player_attached[name] then

3
locale/mcl_cozy.ru.tr Normal file
View File

@ -0,0 +1,3 @@
# textdomain: mcl_cozy
Sit down=Сесть
Lay down=Лечь

3
locale/template.txt Normal file
View File

@ -0,0 +1,3 @@
# textdomain: mcl_cozy
Sit down=
Lay down=