Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/replaymenu/replay_actions.js
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | |||||
* @param replay {Object} | * @param replay {Object} | ||||
*/ | */ | ||||
function displayReplayCompatibilityError(replay) | function displayReplayCompatibilityError(replay) | ||||
{ | { | ||||
var errMsg; | var errMsg; | ||||
if (replayHasSameEngineVersion(replay)) | if (replayHasSameEngineVersion(replay)) | ||||
{ | { | ||||
let gameMods = replay.attribs.mods || []; | let gameMods = replay.attribs.mods || []; | ||||
errMsg = translate("You don't have the same mods active as the replay does.") + "\n"; | errMsg = translate("This replay needs a different sequence of mods:") + "\n" + | ||||
errMsg += sprintf(translate("Required: %(mods)s"), { "mods": gameMods.join(translate(", ")) }) + "\n"; | comparedModsString(gameMods, g_EngineInfo.mods); | ||||
elexis: Can become one statement on two lines | |||||
Done Inline ActionsShould use the same phrasing as the other loadgame / lobby elexis: Should use the same phrasing as the other loadgame / lobby | |||||
errMsg += sprintf(translate("Active: %(mods)s"), { "mods": g_EngineInfo.mods.join(translate(", ")) }); | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
errMsg = translate("This replay is not compatible with your version of the game!") + "\n"; | errMsg = translate("This replay is not compatible with your version of the game!") + "\n"; | ||||
errMsg += sprintf(translate("Your version: %(version)s"), { "version": g_EngineInfo.engine_version }) + "\n"; | errMsg += sprintf(translate("Your version: %(version)s"), { "version": g_EngineInfo.engine_version }) + "\n"; | ||||
errMsg += sprintf(translate("Required version: %(version)s"), { "version": replay.attribs.engine_version }); | errMsg += sprintf(translate("Required version: %(version)s"), { "version": replay.attribs.engine_version }); | ||||
elexisUnsubmitted Not Done Inline Actionsguess the replay and savegame engine check can be abstracted too eventually elexis: guess the replay and savegame engine check can be abstracted too eventually | |||||
ImarokAuthorUnsubmitted Not Done Inline Actions
Probably, but not in this diff I'd say. Imarok: > guess the replay and savegame engine check can be abstracted too eventually
Probably, but… | |||||
} | } | ||||
messageBox(500, 200, errMsg, translate("Incompatible replay")); | messageBox(500, 200, errMsg, translate("Incompatible replay")); | ||||
} | } | ||||
/** | /** | ||||
* Opens the summary screen of the given replay, if its data was found in that directory. | * Opens the summary screen of the given replay, if its data was found in that directory. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Can become one statement on two lines