Differential D4191 Diff 18314 binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Checkboxes/AlliedView.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Checkboxes/AlliedView.js
- This file was added.
GameSettingControls.AlliedView = class AlliedView extends GameSettingControlCheckbox | |||||
{ | |||||
constructor(...args) | |||||
{ | |||||
super(...args); | |||||
g_GameSettings.mapExploration.watch(() => this.render(), ["allied"]); | |||||
g_GameSettings.map.watch(() => this.render(), ["type"]); | |||||
this.render(); | |||||
} | |||||
render() | |||||
{ | |||||
this.setEnabled(g_GameSettings.map.type != "scenario"); | |||||
this.setChecked(g_GameSettings.mapExploration.allied); | |||||
} | |||||
onPress(checked) | |||||
{ | |||||
g_GameSettings.mapExploration.setAllied(checked); | |||||
this.gameSettingsController.setNetworkInitAttributes(); | |||||
} | |||||
}; | |||||
// Translation: View what your team mates see. | |||||
GameSettingControls.AlliedView.prototype.TitleCaption = | |||||
translate("Allied View"); | |||||
Freagarach: Is this obvious enough for translators? Else one could consider adding a translation comment. | |||||
Done Inline Actions
I do wonder if another string would be easier to translate. "Shared Vision", "Shared Teammate Vision", "Share Vision with Allies"... ? But any of those may still required a translation comment. What's the format for adding one? andy5995: > Is this obvious enough for translators? Else one could consider adding a translation comment. | |||||
Done Inline ActionsTo get different translation depedning on context you use translateWithContext(context, message); For passing comment for translators you do comment above line where translation is done like this // Translation: Label followed by a list of values. Silier: To get different translation depedning on context you use translateWithContext(context… | |||||
// Translation: Enable viewing what your team mates can see from the start of the game. | |||||
SilierUnsubmitted Done Inline ActionsI would stick with allies Silier: I would stick with allies | |||||
GameSettingControls.AlliedView.prototype.Tooltip = | |||||
translate("Toggle allied view (see what your allies see)."); |
Wildfire Games · Phabricator
Is this obvious enough for translators? Else one could consider adding a translation comment.