make timer default format translatable

This commit is contained in:
Dirk Sohler 2019-02-22 16:00:18 +01:00
parent 27fef2760f
commit 0c04bb9f50
No known key found for this signature in database
GPG Key ID: B9751241BD7D4E1A
2 changed files with 15 additions and 6 deletions

@ -1,9 +1,10 @@
local modpath = minetest.get_modpath('mtimer')..DIR_DELIM
local syspath = modpath..'system'..DIR_DELIM
local S = minetest.get_translator('mtimer')
mtimer = {
translator = minetest.get_translator('mtimer'),
translator = S,
show_formspec = {},
meta = {
visible = { key = 'mtimer:visible', default = 'true' },
@ -28,11 +29,13 @@ mtimer = {
},
timer_format = {
key = 'mtimer:timer_format',
default = 'Current Date: {rd}\n'..
'Ingame Time: {it}\n'..
'Session Start: {st}\n'..
'Session Duration: {sd}'
},
default = table.concat({
S('Current Date: @1', '{rd}'),
S('Ingame Time: @1', '{it}'),
S('Session Start: @1', '{st}'),
S('Session Duration: @1', '{sd}')
}, '\n')
}
}
}

@ -53,6 +53,12 @@ In-Game Time=Spielzeit
Session Start Time=Sitzungs-Startzeit
Session Duration=Sitzungsdauer
# Timer default format
Current Date: @1=Aktuelles Datum: @1
Ingame Time: @1=Spielzeit: @1
Session Start: @1=Sitzungsstart: @1
Session Duration: @1=Sitzungsdauer: @1
# Generic Formspec Strings
Default=Standard
Exit=Verlassen