mirror of
https://gitlab.com/4w/mtimer.git
synced 2024-11-28 10:13:50 +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 modpath = minetest.get_modpath('mtimer')..DIR_DELIM
|
||||||
local syspath = modpath..'system'..DIR_DELIM
|
local syspath = modpath..'system'..DIR_DELIM
|
||||||
|
local S = minetest.get_translator('mtimer')
|
||||||
|
|
||||||
|
|
||||||
mtimer = {
|
mtimer = {
|
||||||
translator = minetest.get_translator('mtimer'),
|
translator = S,
|
||||||
show_formspec = {},
|
show_formspec = {},
|
||||||
meta = {
|
meta = {
|
||||||
visible = { key = 'mtimer:visible', default = 'true' },
|
visible = { key = 'mtimer:visible', default = 'true' },
|
||||||
@ -28,11 +29,13 @@ mtimer = {
|
|||||||
},
|
},
|
||||||
timer_format = {
|
timer_format = {
|
||||||
key = 'mtimer:timer_format',
|
key = 'mtimer:timer_format',
|
||||||
default = 'Current Date: {rd}\n'..
|
default = table.concat({
|
||||||
'Ingame Time: {it}\n'..
|
S('Current Date: @1', '{rd}'),
|
||||||
'Session Start: {st}\n'..
|
S('Ingame Time: @1', '{it}'),
|
||||||
'Session Duration: {sd}'
|
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 Start Time=Sitzungs-Startzeit
|
||||||
Session Duration=Sitzungsdauer
|
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
|
# Generic Formspec Strings
|
||||||
Default=Standard
|
Default=Standard
|
||||||
Exit=Verlassen
|
Exit=Verlassen
|
||||||
|
Loading…
Reference in New Issue
Block a user