[Enhancement] Added the ability to localize the tera type hover text (#4138)

This commit is contained in:
Jannik Tappert 2024-09-09 21:57:07 +02:00 committed by GitHub
parent a82d64b5b5
commit d9a8448c6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View File

@ -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}}"
} }

View File

@ -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"
} }

View File

@ -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());