Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/replaymenu/replay_menu.js
Show First 20 Lines • Show All 290 Lines • ▼ Show 20 Lines | function displayReplayDetails() | ||||
setMapPreviewImage("sgMapPreview", mapData.preview); | setMapPreviewImage("sgMapPreview", mapData.preview); | ||||
} | } | ||||
/** | /** | ||||
* Returns a human-readable version of the replay date. | * Returns a human-readable version of the replay date. | ||||
*/ | */ | ||||
function getReplayDateTime(replay) | function getReplayDateTime(replay) | ||||
{ | { | ||||
return Engine.FormatMillisecondsIntoDateStringLocal(replay.attribs.timestamp * 1000, translate("yyyy-MM-dd HH:mm")); | // Translation: Format of the local time as shown 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 | |||||
return Engine.FormatMillisecondsIntoDateStringLocal(replay.attribs.timestamp * 1000, translateWithContext("replay date format", "yyyy-MM-dd HH:mm")); | |||||
} | } | ||||
/** | /** | ||||
* Returns a human-readable list of the playernames of that replay. | * Returns a human-readable list of the playernames of that replay. | ||||
* | * | ||||
* @returns {string} | * @returns {string} | ||||
*/ | */ | ||||
function getReplayPlayernames(replay) | function getReplayPlayernames(replay) | ||||
Show All 13 Lines | |||||
/** | /** | ||||
* Returns the month of the given replay in the format "yyyy-MM". | * Returns the month of the given replay in the format "yyyy-MM". | ||||
* | * | ||||
* @returns {string} | * @returns {string} | ||||
*/ | */ | ||||
function getReplayMonth(replay) | function getReplayMonth(replay) | ||||
{ | { | ||||
return Engine.FormatMillisecondsIntoDateStringLocal(replay.attribs.timestamp * 1000, translate("yyyy-MM")); | // Translation: Format of the local time (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 | |||||
return Engine.FormatMillisecondsIntoDateStringLocal(replay.attribs.timestamp * 1000, translateWithContext("replay date filter format", "yyyy-MM")); | |||||
} | } | ||||
/** | /** | ||||
* Returns a human-readable version of the time when the replay started. | * Returns a human-readable version of the duration of the replay. | ||||
* | * | ||||
* @returns {string} | * @returns {string} | ||||
*/ | */ | ||||
function getReplayDuration(replay) | function getReplayDuration(replay) | ||||
{ | { | ||||
return timeToString(replay.duration * 1000); | return timeToString(replay.duration * 1000); | ||||
} | } | ||||
Show All 15 Lines |
Wildfire Games · Phabricator