Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/common/settings.js
Show First 20 Lines • Show All 419 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Returns title or placeholder. | * Returns title or placeholder. | ||||
* | * | ||||
* @param {string} victoryConditionName - For example "conquest". | * @param {string} victoryConditionName - For example "conquest". | ||||
* @returns {string} | * @returns {string} | ||||
*/ | */ | ||||
function translateVictoryCondition(victoryConditionName) | function translateVictoryCondition(victoryConditionName) | ||||
{ | { | ||||
let victoryCondition = g_Settings.VictoryConditions.find(victoryCondition => victoryCondition.Name == victoryConditionName); | let victoryCondition = g_Settings.VictoryConditions.find(condition => condition.Name == victoryConditionName); | ||||
return victoryCondition ? victoryCondition.Title : translate("Unknown Victory Condition"); | return victoryCondition ? victoryCondition.Title : translate("Unknown Victory Condition"); | ||||
} | } |
Wildfire Games · Phabricator