Translation fixes.
- Fix in tooltip context for healing 'Health' - Fix in tooltip for splash shape. - Translate locale_advanced - Translate specific name in the structure truee - Translate player name in gamesetup. Patch by: nwtour Differential Revision: https://code.wildfiregames.com/D3889 This was SVN commit r25332.
This commit is contained in:
parent
b74d5bf0d8
commit
cbd91ca999
@ -391,7 +391,7 @@ function captureDetails(captureTemplate)
|
||||
function splashDetails(splashTemplate)
|
||||
{
|
||||
let splashLabel = sprintf(headerFont(translate("%(splashShape)s Splash")), {
|
||||
"splashShape": splashTemplate.shape
|
||||
"splashShape": translate(splashTemplate.shape)
|
||||
});
|
||||
let splashDamageTooltip = sprintf(translate("%(label)s: %(effects)s"), {
|
||||
"label": splashLabel,
|
||||
@ -560,7 +560,7 @@ function getGarrisonTooltip(template)
|
||||
sprintf(translate("%(healRateLabel)s %(value)s %(health)s / %(second)s"), {
|
||||
"healRateLabel": headerFont(translate("Heal:")),
|
||||
"value": Math.round(template.garrisonHolder.buffHeal),
|
||||
"health": unitFont(translate("Health")),
|
||||
"health": unitFont(translateWithContext("garrison tooltip", "Health")),
|
||||
"second": unitFont(translate("second")),
|
||||
})
|
||||
);
|
||||
|
@ -37,6 +37,10 @@ PlayerSettingControls.PlayerName = class PlayerName extends GameSettingControl
|
||||
let status = this.guid ? g_PlayerAssignments[this.guid].status : this.ReadyTags.length - 1;
|
||||
name = setStringTags(name, this.ReadyTags[status]);
|
||||
}
|
||||
else if (name && !this.guid)
|
||||
{
|
||||
name = translate(name);
|
||||
}
|
||||
|
||||
this.playerName.caption = name;
|
||||
}
|
||||
|
@ -86,6 +86,10 @@ class TemplateLoader
|
||||
let data = Engine.ReadJSONFile(this.TechnologyPath + templateName + ".json");
|
||||
translateObjectKeys(data, this.TechnologyTranslateKeys);
|
||||
|
||||
// Translate specificName as in GetTechnologyData() from gui/session/session.js
|
||||
for (let civ in data.specificName)
|
||||
data.specificName[civ] = translate(data.specificName[civ]);
|
||||
|
||||
this.technologyData[templateName] = data;
|
||||
}
|
||||
|
||||
|
@ -314,6 +314,7 @@
|
||||
"gui/hotkeys/**.js",
|
||||
"gui/loadgame/**.js",
|
||||
"gui/locale/**.js",
|
||||
"gui/locale_advanced/**.js",
|
||||
"gui/maps/**.js",
|
||||
"gui/options/**.js",
|
||||
"gui/pregame/**.js",
|
||||
@ -348,6 +349,7 @@
|
||||
"gui/hotkeys/**.xml",
|
||||
"gui/loadgame/**.xml",
|
||||
"gui/locale/**.xml",
|
||||
"gui/locale_advanced/**.xml",
|
||||
"gui/maps/**.xml",
|
||||
"gui/options/**.xml",
|
||||
"gui/pregame/**.xml",
|
||||
@ -493,6 +495,7 @@
|
||||
"DisabledTooltip": {},
|
||||
"FormationName": {},
|
||||
"FromClass": {},
|
||||
"Shape": {},
|
||||
"Rank": {
|
||||
"tagAsContext": true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user