diff --git a/src/locales/de/config.ts b/src/locales/de/config.ts index a808dc49140..50cf09181fa 100644 --- a/src/locales/de/config.ts +++ b/src/locales/de/config.ts @@ -31,6 +31,7 @@ import { PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue } from "./dialogue"; import { biome } from "./biome"; +import { pokemonInfoContainer } from "./pokemon-info-container"; export const deConfig = { ability: ability, @@ -60,6 +61,7 @@ export const deConfig = { gameStatsUiHandler: gameStatsUiHandler, voucher: voucher, biome: biome, + pokemonInfoContainer: pokemonInfoContainer, PGMdialogue: PGMdialogue, PGFdialogue: PGFdialogue, PGMbattleSpecDialogue: PGMbattleSpecDialogue, diff --git a/src/locales/de/pokemon-info-container.ts b/src/locales/de/pokemon-info-container.ts new file mode 100644 index 00000000000..41cca2d7dbb --- /dev/null +++ b/src/locales/de/pokemon-info-container.ts @@ -0,0 +1,11 @@ +import { SimpleTranslationEntries } from "#app/plugins/i18n"; + +export const pokemonInfoContainer: SimpleTranslationEntries = { + "moveset": "Attacken", + "gender": "Geschlecht:", + "ability": "Fähigkeit:", + "nature": "Wesen:", + "epic": "Episch", + "rare": "Selten", + "common": "Gewöhnlich" +} as const; diff --git a/src/locales/en/config.ts b/src/locales/en/config.ts index 4f0f097ff14..d01102bc3a4 100644 --- a/src/locales/en/config.ts +++ b/src/locales/en/config.ts @@ -31,6 +31,7 @@ import { PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue } from "./dialogue"; import { biome } from "./biome"; +import { pokemonInfoContainer } from "./pokemon-info-container"; export const enConfig = { ability: ability, @@ -60,6 +61,7 @@ export const enConfig = { gameStatsUiHandler: gameStatsUiHandler, voucher: voucher, biome: biome, + pokemonInfoContainer: pokemonInfoContainer, PGMdialogue: PGMdialogue, PGFdialogue: PGFdialogue, PGMbattleSpecDialogue: PGMbattleSpecDialogue, diff --git a/src/locales/en/pokemon-info-container.ts b/src/locales/en/pokemon-info-container.ts new file mode 100644 index 00000000000..068c9ebb431 --- /dev/null +++ b/src/locales/en/pokemon-info-container.ts @@ -0,0 +1,11 @@ +import { SimpleTranslationEntries } from "#app/plugins/i18n"; + +export const pokemonInfoContainer: SimpleTranslationEntries = { + "moveset": "Moveset", + "gender": "Gender:", + "ability": "Ability:", + "nature": "Nature:", + "epic": "Epic", + "rare": "Rare", + "common": "Common" +} as const; diff --git a/src/locales/es/config.ts b/src/locales/es/config.ts index a38e287a29f..2f33cd680ae 100644 --- a/src/locales/es/config.ts +++ b/src/locales/es/config.ts @@ -31,6 +31,7 @@ import { PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue } from "./dialogue"; import { biome } from "./biome"; +import { pokemonInfoContainer } from "./pokemon-info-container"; export const esConfig = { ability: ability, @@ -60,6 +61,7 @@ export const esConfig = { gameStatsUiHandler: gameStatsUiHandler, voucher: voucher, biome: biome, + pokemonInfoContainer: pokemonInfoContainer, PGMdialogue: PGMdialogue, PGFdialogue: PGFdialogue, PGMbattleSpecDialogue: PGMbattleSpecDialogue, diff --git a/src/locales/es/pokemon-info-container.ts b/src/locales/es/pokemon-info-container.ts new file mode 100644 index 00000000000..068c9ebb431 --- /dev/null +++ b/src/locales/es/pokemon-info-container.ts @@ -0,0 +1,11 @@ +import { SimpleTranslationEntries } from "#app/plugins/i18n"; + +export const pokemonInfoContainer: SimpleTranslationEntries = { + "moveset": "Moveset", + "gender": "Gender:", + "ability": "Ability:", + "nature": "Nature:", + "epic": "Epic", + "rare": "Rare", + "common": "Common" +} as const; diff --git a/src/locales/fr/config.ts b/src/locales/fr/config.ts index 37d698c5a22..f7f7201ddd7 100644 --- a/src/locales/fr/config.ts +++ b/src/locales/fr/config.ts @@ -31,6 +31,7 @@ import { PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue } from "./dialogue"; import { biome } from "./biome"; +import { pokemonInfoContainer } from "./pokemon-info-container"; export const frConfig = { ability: ability, @@ -60,6 +61,7 @@ export const frConfig = { gameStatsUiHandler: gameStatsUiHandler, voucher: voucher, biome: biome, + pokemonInfoContainer: pokemonInfoContainer, PGMdialogue: PGMdialogue, PGFdialogue: PGFdialogue, PGMbattleSpecDialogue: PGMbattleSpecDialogue, diff --git a/src/locales/fr/pokemon-info-container.ts b/src/locales/fr/pokemon-info-container.ts new file mode 100644 index 00000000000..102616da287 --- /dev/null +++ b/src/locales/fr/pokemon-info-container.ts @@ -0,0 +1,11 @@ +import { SimpleTranslationEntries } from "#app/plugins/i18n"; + +export const pokemonInfoContainer: SimpleTranslationEntries = { + "moveset": "Capacités", + "gender": "Sexe :", + "ability": "Talent :", + "nature": "Nature :", + "epic": "Épique", + "rare": "Rare", + "common": "Commun" +} as const; diff --git a/src/locales/it/config.ts b/src/locales/it/config.ts index e630914db1a..5f76e4d4205 100644 --- a/src/locales/it/config.ts +++ b/src/locales/it/config.ts @@ -31,6 +31,7 @@ import { PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue } from "./dialogue"; import { biome } from "./biome"; +import { pokemonInfoContainer } from "./pokemon-info-container"; export const itConfig = { ability: ability, @@ -60,6 +61,7 @@ export const itConfig = { gameStatsUiHandler: gameStatsUiHandler, voucher: voucher, biome: biome, + pokemonInfoContainer: pokemonInfoContainer, PGMdialogue: PGMdialogue, PGFdialogue: PGFdialogue, PGMbattleSpecDialogue: PGMbattleSpecDialogue, diff --git a/src/locales/it/pokemon-info-container.ts b/src/locales/it/pokemon-info-container.ts new file mode 100644 index 00000000000..068c9ebb431 --- /dev/null +++ b/src/locales/it/pokemon-info-container.ts @@ -0,0 +1,11 @@ +import { SimpleTranslationEntries } from "#app/plugins/i18n"; + +export const pokemonInfoContainer: SimpleTranslationEntries = { + "moveset": "Moveset", + "gender": "Gender:", + "ability": "Ability:", + "nature": "Nature:", + "epic": "Epic", + "rare": "Rare", + "common": "Common" +} as const; diff --git a/src/locales/pt_BR/config.ts b/src/locales/pt_BR/config.ts index 0710fc07924..ae43e0aba75 100644 --- a/src/locales/pt_BR/config.ts +++ b/src/locales/pt_BR/config.ts @@ -31,6 +31,7 @@ import { PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue } from "./dialogue"; import { biome } from "./biome"; +import { pokemonInfoContainer } from "./pokemon-info-container"; export const ptBrConfig = { ability: ability, @@ -60,6 +61,7 @@ export const ptBrConfig = { gameStatsUiHandler: gameStatsUiHandler, voucher: voucher, biome: biome, + pokemonInfoContainer: pokemonInfoContainer, PGMdialogue: PGMdialogue, PGFdialogue: PGFdialogue, PGMbattleSpecDialogue: PGMbattleSpecDialogue, diff --git a/src/locales/pt_BR/pokemon-info-container.ts b/src/locales/pt_BR/pokemon-info-container.ts new file mode 100644 index 00000000000..068c9ebb431 --- /dev/null +++ b/src/locales/pt_BR/pokemon-info-container.ts @@ -0,0 +1,11 @@ +import { SimpleTranslationEntries } from "#app/plugins/i18n"; + +export const pokemonInfoContainer: SimpleTranslationEntries = { + "moveset": "Moveset", + "gender": "Gender:", + "ability": "Ability:", + "nature": "Nature:", + "epic": "Epic", + "rare": "Rare", + "common": "Common" +} as const; diff --git a/src/locales/zh_CN/config.ts b/src/locales/zh_CN/config.ts index 102f0823133..245727d874b 100644 --- a/src/locales/zh_CN/config.ts +++ b/src/locales/zh_CN/config.ts @@ -31,6 +31,7 @@ import { PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue } from "./dialogue"; import { biome } from "./biome"; +import { pokemonInfoContainer } from "./pokemon-info-container"; export const zhCnConfig = { ability: ability, @@ -60,6 +61,7 @@ export const zhCnConfig = { gameStatsUiHandler: gameStatsUiHandler, voucher: voucher, biome: biome, + pokemonInfoContainer: pokemonInfoContainer, PGMdialogue: PGMdialogue, PGFdialogue: PGFdialogue, PGMbattleSpecDialogue: PGMbattleSpecDialogue, diff --git a/src/locales/zh_CN/pokemon-info-container.ts b/src/locales/zh_CN/pokemon-info-container.ts new file mode 100644 index 00000000000..068c9ebb431 --- /dev/null +++ b/src/locales/zh_CN/pokemon-info-container.ts @@ -0,0 +1,11 @@ +import { SimpleTranslationEntries } from "#app/plugins/i18n"; + +export const pokemonInfoContainer: SimpleTranslationEntries = { + "moveset": "Moveset", + "gender": "Gender:", + "ability": "Ability:", + "nature": "Nature:", + "epic": "Epic", + "rare": "Rare", + "common": "Common" +} as const; diff --git a/src/locales/zh_TW/config.ts b/src/locales/zh_TW/config.ts index 1c91e3001d3..c213aa4b0df 100644 --- a/src/locales/zh_TW/config.ts +++ b/src/locales/zh_TW/config.ts @@ -30,6 +30,7 @@ import { PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue } from "./dialogue"; import { biome } from "./biome"; +import { pokemonInfoContainer } from "./pokemon-info-container"; export const zhTWConfig = { ability: ability, @@ -58,6 +59,7 @@ export const zhTWConfig = { berry: berry, voucher: voucher, biome: biome, + pokemonInfoContainer: pokemonInfoContainer, PGMdialogue: PGMdialogue, PGFdialogue: PGFdialogue, PGMbattleSpecDialogue: PGMbattleSpecDialogue, diff --git a/src/locales/zh_TW/pokemon-info-container.ts b/src/locales/zh_TW/pokemon-info-container.ts new file mode 100644 index 00000000000..068c9ebb431 --- /dev/null +++ b/src/locales/zh_TW/pokemon-info-container.ts @@ -0,0 +1,11 @@ +import { SimpleTranslationEntries } from "#app/plugins/i18n"; + +export const pokemonInfoContainer: SimpleTranslationEntries = { + "moveset": "Moveset", + "gender": "Gender:", + "ability": "Ability:", + "nature": "Nature:", + "epic": "Epic", + "rare": "Rare", + "common": "Common" +} as const; diff --git a/src/plugins/i18n.ts b/src/plugins/i18n.ts index 5dbd3879238..3d3e1be0837 100644 --- a/src/plugins/i18n.ts +++ b/src/plugins/i18n.ts @@ -181,6 +181,7 @@ declare module "i18next" { gameStatsUiHandler: SimpleTranslationEntries; voucher: SimpleTranslationEntries; biome: SimpleTranslationEntries; + pokemonInfoContainer: SimpleTranslationEntries; PGMdialogue: DialogueTranslationEntries; PGMbattleSpecDialogue: SimpleTranslationEntries; PGMmiscDialogue: SimpleTranslationEntries; diff --git a/src/ui/pokemon-info-container.ts b/src/ui/pokemon-info-container.ts index 94884a6977c..256662048a7 100644 --- a/src/ui/pokemon-info-container.ts +++ b/src/ui/pokemon-info-container.ts @@ -10,6 +10,7 @@ import * as Utils from "../utils"; import { Type } from "../data/type"; import { getVariantTint } from "#app/data/variant"; import ConfirmUiHandler from "./confirm-ui-handler"; +import i18next from "../plugins/i18n"; export default class PokemonInfoContainer extends Phaser.GameObjects.Container { private readonly infoWindowWidth = 104; @@ -55,7 +56,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { movesBg.setOrigin(1, 0); this.pokemonMovesContainer.add(movesBg); - const movesLabel = addTextObject(this.scene, -movesBg.width / 2, 6, "Moveset", TextStyle.WINDOW, { fontSize: "64px" }); + const movesLabel = addTextObject(this.scene, -movesBg.width / 2, 6, i18next.t("pokemonInfoContainer:moveset"), TextStyle.WINDOW, { fontSize: "64px" }); movesLabel.setOrigin(0.5, 0); this.pokemonMovesContainer.add(movesLabel); @@ -86,7 +87,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { this.add(infoBg); this.add(this.statsContainer); - this.pokemonGenderLabelText = addTextObject(this.scene, -18, 18, "Gender:", TextStyle.WINDOW, { fontSize: "64px" }); + this.pokemonGenderLabelText = addTextObject(this.scene, -18, 18, i18next.t("pokemonInfoContainer:gender"), TextStyle.WINDOW, { fontSize: "64px" }); this.pokemonGenderLabelText.setOrigin(1, 0); this.pokemonGenderLabelText.setVisible(false); this.add(this.pokemonGenderLabelText); @@ -96,7 +97,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { this.pokemonGenderText.setVisible(false); this.add(this.pokemonGenderText); - this.pokemonAbilityLabelText = addTextObject(this.scene, -18, 28, "Ability:", TextStyle.WINDOW, { fontSize: "64px" }); + this.pokemonAbilityLabelText = addTextObject(this.scene, -18, 28, i18next.t("pokemonInfoContainer:ability"), TextStyle.WINDOW, { fontSize: "64px" }); this.pokemonAbilityLabelText.setOrigin(1, 0); this.add(this.pokemonAbilityLabelText); @@ -104,7 +105,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { this.pokemonAbilityText.setOrigin(0, 0); this.add(this.pokemonAbilityText); - this.pokemonNatureLabelText = addTextObject(this.scene, -18, 38, "Nature:", TextStyle.WINDOW, { fontSize: "64px" }); + this.pokemonNatureLabelText = addTextObject(this.scene, -18, 38, i18next.t("pokemonInfoContainer:nature"), TextStyle.WINDOW, { fontSize: "64px" }); this.pokemonNatureLabelText.setOrigin(1, 0); this.add(this.pokemonNatureLabelText); @@ -154,7 +155,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { this.pokemonShinyIcon.setTint(getVariantTint(baseVariant)); if (this.pokemonShinyIcon.visible) { const shinyDescriptor = doubleShiny || baseVariant ? - `${baseVariant === 2 ? "Epic" : baseVariant === 1 ? "Rare" : "Common"}${doubleShiny ? `/${pokemon.fusionVariant === 2 ? "Epic" : pokemon.fusionVariant === 1 ? "Rare" : "Common"}` : ""}` + `${baseVariant === 2 ? i18next.t("pokemonInfoContainer:epic") : baseVariant === 1 ? i18next.t("pokemonInfoContainer:rare") : i18next.t("pokemonInfoContainer:common")}${doubleShiny ? `/${pokemon.fusionVariant === 2 ? i18next.t("pokemonInfoContainer:epic") : pokemon.fusionVariant === 1 ? i18next.t("pokemonInfoContainer:rare") : i18next.t("pokemonInfoContainer:common")}` : ""}` : ""; this.pokemonShinyIcon.on("pointerover", () => (this.scene as BattleScene).ui.showTooltip(null, `Shiny${shinyDescriptor ? ` (${shinyDescriptor})` : ""}`, true)); this.pokemonShinyIcon.on("pointerout", () => (this.scene as BattleScene).ui.hideTooltip());