aboutsummaryrefslogtreecommitdiff
path: root/advtrains/atc.lua
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2020-07-19 23:04:13 +0200
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2020-07-19 23:04:13 +0200
commit9d52770f211f6290fc172e82bad00daed0853848 (patch)
treeaebaacaa33f48eef2a01c396ad042cab05badb56 /advtrains/atc.lua
parent8c66f1caf495442e1435bf3a49176932eee986b3 (diff)
parentcc78b63e342c131e2a08b3697681d9d5fbf86d4f (diff)
downloadadvtrains-9d52770f211f6290fc172e82bad00daed0853848.tar.gz
advtrains-9d52770f211f6290fc172e82bad00daed0853848.tar.bz2
advtrains-9d52770f211f6290fc172e82bad00daed0853848.zip
Add client side translations by ywang
Diffstat (limited to 'advtrains/atc.lua')
-rw-r--r--advtrains/atc.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/advtrains/atc.lua b/advtrains/atc.lua
index fa9f097..20f52b9 100644
--- a/advtrains/atc.lua
+++ b/advtrains/atc.lua
@@ -128,9 +128,9 @@ advtrains.atc_function = function(def, preset, suffix, rotation)
if fields.mode then
meta:set_string("mode", idxtrans[fields.mode])
if fields.mode=="digiline" then
- meta:set_string("infotext", attrans("ATC controller, mode @1\nChannel: @2", fields.mode, meta:get_string("command")) )
+ meta:set_string("infotext", attrans("ATC controller, mode @1\nChannel: @2", (fields.mode or "?"), meta:get_string("command")) )
else
- meta:set_string("infotext", attrans("ATC controller, mode @1\nCommand: @2", fields.mode, meta:get_string("command")) )
+ meta:set_string("infotext", attrans("ATC controller, mode @1\nCommand: @2", (fields.mode or "?"), meta:get_string("command")) )
end
meta:set_string("formspec", atc.get_atc_controller_formspec(pos, meta))
end
@@ -141,9 +141,9 @@ advtrains.atc_function = function(def, preset, suffix, rotation)
meta:set_string("command_on", fields.command_on)
meta:set_string("channel", fields.channel)
if fields.mode=="digiline" then
- meta:set_string("infotext", attrans("ATC controller, mode @1\nChannel: @2", fields.mode, meta:get_string("command")) )
+ meta:set_string("infotext", attrans("ATC controller, mode @1\nChannel: @2", (fields.mode or "?"), meta:get_string("command")) )
else
- meta:set_string("infotext", attrans("ATC controller, mode @1\nCommand: @2", fields.mode, meta:get_string("command")) )
+ meta:set_string("infotext", attrans("ATC controller, mode @1\nCommand: @2", (fields.mode or "?"), meta:get_string("command")) )
end
meta:set_string("formspec", atc.get_atc_controller_formspec(pos, meta))