[Enhancement] Added the ability to localize the tera type hover text (#4138)
This commit is contained in:
parent
a82d64b5b5
commit
d9a8448c6e
|
@ -3,5 +3,6 @@
|
||||||
"power": "Stärke",
|
"power": "Stärke",
|
||||||
"accuracy": "Genauigkeit",
|
"accuracy": "Genauigkeit",
|
||||||
"abilityFlyInText": "{{passive}}{{abilityName}} von {{pokemonName}} wirkt!",
|
"abilityFlyInText": "{{passive}}{{abilityName}} von {{pokemonName}} wirkt!",
|
||||||
"passive": "Passive Fähigkeit "
|
"passive": "Passive Fähigkeit ",
|
||||||
|
"teraHover": "Tera-Typ {{type}}"
|
||||||
}
|
}
|
|
@ -3,5 +3,6 @@
|
||||||
"power": "Power",
|
"power": "Power",
|
||||||
"accuracy": "Accuracy",
|
"accuracy": "Accuracy",
|
||||||
"abilityFlyInText": " {{pokemonName}}'s {{passive}}{{abilityName}}",
|
"abilityFlyInText": " {{pokemonName}}'s {{passive}}{{abilityName}}",
|
||||||
"passive": "Passive "
|
"passive": "Passive ",
|
||||||
|
"teraHover": "{{type}} Terastallized"
|
||||||
}
|
}
|
|
@ -323,7 +323,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||||
this.teraIcon.setVisible(this.lastTeraType !== Type.UNKNOWN);
|
this.teraIcon.setVisible(this.lastTeraType !== Type.UNKNOWN);
|
||||||
this.teraIcon.on("pointerover", () => {
|
this.teraIcon.on("pointerover", () => {
|
||||||
if (this.lastTeraType !== Type.UNKNOWN) {
|
if (this.lastTeraType !== Type.UNKNOWN) {
|
||||||
(this.scene as BattleScene).ui.showTooltip("", `${Utils.toReadableString(Type[this.lastTeraType])} Terastallized`);
|
(this.scene as BattleScene).ui.showTooltip("", i18next.t("fightUiHandler:teraHover", {type: i18next.t(`pokemonInfo:Type.${Type[this.lastTeraType]}`) }));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.teraIcon.on("pointerout", () => (this.scene as BattleScene).ui.hideTooltip());
|
this.teraIcon.on("pointerout", () => (this.scene as BattleScene).ui.hideTooltip());
|
||||||
|
|
Loading…
Reference in New Issue