mirror of
https://github.com/minetest/minetest_game.git
synced 2025-06-28 12:46:02 +02:00
Add support for MT 5 game translation (rebasing ) (#2466)
rebased #2368
This commit is contained in:
@ -1,5 +1,11 @@
|
||||
-- game_commands/init.lua
|
||||
|
||||
-- Load support for MT game translation.
|
||||
local S = minetest.get_translator("game_commands")
|
||||
|
||||
|
||||
minetest.register_chatcommand("killme", {
|
||||
description = "Kill yourself to respawn",
|
||||
description = S("Kill yourself to respawn"),
|
||||
func = function(name)
|
||||
local player = minetest.get_player_by_name(name)
|
||||
if player then
|
||||
@ -15,11 +21,11 @@ minetest.register_chatcommand("killme", {
|
||||
|
||||
-- There doesn't seem to be a way to get a default spawn pos
|
||||
-- from the lua API
|
||||
return false, "No static_spawnpoint defined"
|
||||
return false, S("No static_spawnpoint defined")
|
||||
end
|
||||
else
|
||||
-- Show error message if used when not logged in, eg: from IRC mod
|
||||
return false, "You need to be online to be killed!"
|
||||
return false, S("You need to be online to be killed!")
|
||||
end
|
||||
end
|
||||
})
|
||||
|
Reference in New Issue
Block a user