Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/common/l10n.js
function durationToString(time) | |||||
{ | |||||
return Engine.FormatMillisecondsIntoDateStringGMT(time, time < 1000 * 60 * 60 ? | |||||
// Translation: Format of the time elapsed or remaining, for game durations, ceasefire and wonder-victory countdowns, etc. | |||||
// For a list of symbols that you can use, see: | |||||
// https://sites.google.com/site/icuprojectuserguide/formatparse/datetime?pli=1#TOC-Date-Field-Symbol-Table | |||||
// The default format is for the US, but every language/country will probably want to use this format too. | |||||
translateWithContext("duration less than one hour", "m:ss") : | |||||
// Translation: Format of the time elapsed or remaining, for game durations, ceasefire and wonder-victory countdowns, etc. | |||||
// For a list of symbols that you can use, see: | |||||
// https://sites.google.com/site/icuprojectuserguide/formatparse/datetime?pli=1#TOC-Date-Field-Symbol-Table | |||||
// The default format is for the US, but every language/country will probably want to use this format too. | |||||
translateWithContext("duration greater than one hour", "H:mm:ss")); | |||||
} | |||||
function timeOfDayToString(time) | |||||
{ | |||||
// Translation: Format of the local time as shown in the chat in the lobby, game setup, and session, and the lobby game start time. | |||||
// For a list of symbols that you can use, see: | |||||
// https://sites.google.com/site/icuprojectuserguide/formatparse/datetime?pli=1#TOC-Date-Field-Symbol-Table | |||||
// The default format is for the US. Most other languages/countries may want to use "HH:mm" instead. | |||||
return Engine.FormatMillisecondsIntoDateStringLocal(time, translateWithContext("time of day", "h:mm a")); | |||||
} | |||||
function datetimeToString(datetime) | |||||
{ | |||||
// Translation: Format of the local datetime as shown in the load game, save game, and replay menus. | |||||
// For a list of symbols that you can use, see: | |||||
// https://sites.google.com/site/icuprojectuserguide/formatparse/datetime?pli=1#TOC-Date-Field-Symbol-Table | |||||
// The default format is for the US. Most other languages/countries may want to use "yyyy-MM-dd HH:mm" instead. | |||||
return Engine.FormatMillisecondsIntoDateStringLocal(datetime, translateWithContext("datetime", "M/d/yyyy h:mm a")); | |||||
} | |||||
function monthToString(datetime) | |||||
{ | |||||
// Translation: Format of the local date (month) as shown in the date filter dropdown in the replay menu. | |||||
// For a list of symbols that you can use, see: | |||||
// https://sites.google.com/site/icuprojectuserguide/formatparse/datetime?pli=1#TOC-Date-Field-Symbol-Table | |||||
// The default format is for the US. Most other languages/countries may want to use "yyyy-MM" instead. | |||||
return Engine.FormatMillisecondsIntoDateStringLocal(datetime, translateWithContext("date month", "M/yyyy")); | |||||
} |
Wildfire Games · Phabricator