mirror of
https://gitlab.com/4w/mtimer.git
synced 2024-11-28 02:03:46 +01:00
make timer default format translatable
This commit is contained in:
parent
27fef2760f
commit
0c04bb9f50
15
init.lua
15
init.lua
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user