Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/common/l10n.js
- This file was added.
function timeOfDayToString(time) | |||||
elexis: `timeToString`? | |||||
templeAuthorUnsubmitted Not Done Inline ActionsWe don't want people using this function when they should use durationToString, so I think it's better to emphasize that it's a time of day. temple: We don't want people using this function when they should use `durationToString`, so I think… | |||||
{ | |||||
// 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 | |||||
return Engine.FormatMillisecondsIntoDateStringLocal(time, translateWithContext("time of day", "HH:mm:ss")); | |||||
elexisUnsubmitted Not Done Inline ActionsWhere does that :ss come from again? Doesn't hurt adding them? elexis: Where does that `:ss` come from again? Doesn't hurt adding them? | |||||
templeAuthorUnsubmitted Not Done Inline ActionsI should've made a note here, it's the seconds. The realtime overlay currently shows them and all the other places don't show them. So either we could have two functions, one showing seconds and one not showing them, or we could decide on one format. I'd actually prefer to not show the seconds because I think it's unnecessary, and actually in the US-english version I don't include them (I use "H:mm a" which gives times like "8:44 AM"). So let me remove the :ss. temple: I should've made a note here, it's the seconds. The realtime overlay currently shows them and… | |||||
templeAuthorUnsubmitted Not Done Inline Actions"h:mm a" actually. temple: "h:mm a" actually. | |||||
} | |||||
function chatTimestampToString(time) | |||||
{ | |||||
// Translation: Time prefix as shown in the chat in the lobby, game setup, and session. | |||||
return sprintf(escapeText(translate("[%(time)s]")), { "time": timeOfDayToString(time) }); | |||||
} |
Wildfire Games · Phabricator
timeToString?