From 2111b67106752efe4417705f4d1a3c9c0bb5bb7e Mon Sep 17 00:00:00 2001 From: rudzik8 Date: Fri, 25 Feb 2022 17:47:42 +0700 Subject: [PATCH] Change the chat message when you're trying to sit while moving and add ability to translate it --- api.lua | 4 +++- locale/mcl_decor.ru.tr | 1 + locale/template.txt | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/api.lua b/api.lua index f41c805..3d9e19c 100644 --- a/api.lua +++ b/api.lua @@ -1,11 +1,13 @@ -- mcl_decor/api.lua +local S = minetest.get_translator(minetest.get_current_modname()) + -- originally from the ts_furniture mod (which is from cozy) by Thomas--S // https://github.com/minetest-mods/ts_furniture/ mcl_decor.sit = function(pos, _, player) local name = player:get_player_name() if not mcl_player.player_attached[name] then if vector.length(player:get_player_velocity()) > 0 then - minetest.chat_send_player(player:get_player_name(), 'You can only sit down when you are not moving.') + minetest.chat_send_player(player:get_player_name(), S("You have to stop moving before sitting down!")) return end player:move_to(pos) diff --git a/locale/mcl_decor.ru.tr b/locale/mcl_decor.ru.tr index 13beae0..c1b5f7f 100644 --- a/locale/mcl_decor.ru.tr +++ b/locale/mcl_decor.ru.tr @@ -1,4 +1,5 @@ # textdomain: mcl_decor +You have to stop moving before sitting down!=Вам нужно перестать двигаться, чтобы сесть! Coalquartz Tile=Уголекварцевая плитка Gravel Path=Дорожка из гравия Rainbow Block=Радужный блок diff --git a/locale/template.txt b/locale/template.txt index 2ef03a9..e440203 100644 --- a/locale/template.txt +++ b/locale/template.txt @@ -1,4 +1,5 @@ # textdomain: mcl_decor +You have to stop moving before sitting down!= Coalquartz Tile= Gravel Path= Rainbow Block=