diff --git a/src/egg-hatch-phase.ts b/src/egg-hatch-phase.ts index be571b9d440..44b72fb3d05 100644 --- a/src/egg-hatch-phase.ts +++ b/src/egg-hatch-phase.ts @@ -1,4 +1,5 @@ import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; +import i18next from "i18next"; import { Phase } from "./phase"; import BattleScene, { AnySound } from "./battle-scene"; import * as Utils from "./utils"; @@ -341,7 +342,7 @@ export class EggHatchPhase extends Phase { this.scene.playSoundWithoutBgm("evolution_fanfare"); - this.scene.ui.showText(`${this.pokemon.name} hatched from the egg!`, null, () => { + this.scene.ui.showText(i18next.t("egg:hatchFromTheEgg", { pokemonName: this.pokemon.name }), null, () => { this.scene.gameData.updateSpeciesDexIvs(this.pokemon.species.speciesId, this.pokemon.ivs); this.scene.gameData.setPokemonCaught(this.pokemon, true, true).then(() => { this.scene.gameData.setEggMoveUnlocked(this.pokemon.species, this.eggMoveIndex).then(() => { diff --git a/src/locales/de/egg.ts b/src/locales/de/egg.ts index 88a5da30dd0..61a2f627aa4 100644 --- a/src/locales/de/egg.ts +++ b/src/locales/de/egg.ts @@ -19,4 +19,7 @@ export const egg: SimpleTranslationEntries = { "pull": "Pull", "pulls": "Pulls", "sameSpeciesEgg": "{{species}} wird aus dem Ei schlüpfen!", + "hatchFromTheEgg": "Ein {{pokemonName}} ist aus dem Ei geschlüpft!", + "eggMoveUnlock": "Ei-Attacke freigeschaltet: {{moveName}}", + "rareEggMoveUnlock": "Seltene Ei-Attacke freigeschaltet: {{moveName}}", } as const; diff --git a/src/locales/en/egg.ts b/src/locales/en/egg.ts index ccca1d21427..b6e13d26213 100644 --- a/src/locales/en/egg.ts +++ b/src/locales/en/egg.ts @@ -19,4 +19,7 @@ export const egg: SimpleTranslationEntries = { "pull": "Pull", "pulls": "Pulls", "sameSpeciesEgg": "{{species}} will hatch from this egg!", + "hatchFromTheEgg": "{{pokemonName}} hatched from the egg!", + "eggMoveUnlock": "Egg Move unlocked: {{moveName}}", + "rareEggMoveUnlock": "Rare Egg Move unlocked: {{moveName}}", } as const; diff --git a/src/locales/es/egg.ts b/src/locales/es/egg.ts index e1e6a151779..dea466066f1 100644 --- a/src/locales/es/egg.ts +++ b/src/locales/es/egg.ts @@ -19,4 +19,7 @@ export const egg: SimpleTranslationEntries = { "pull": "Tirada", "pulls": "Tiradas", "sameSpeciesEgg": "{{species}} will hatch from this egg!", + "hatchFromTheEgg": "¡Ha salido un {{pokemonName}} del Huevo!", + "eggMoveUnlock": "Mov. Huevo desbloqueado:\n{{moveName}}", + "rareEggMoveUnlock": "Mov. Huevo Raro desbloqueado:\n{{moveName}}", } as const; diff --git a/src/locales/fr/egg.ts b/src/locales/fr/egg.ts index 7b18e218e2e..96fbc4dce15 100644 --- a/src/locales/fr/egg.ts +++ b/src/locales/fr/egg.ts @@ -19,4 +19,7 @@ export const egg: SimpleTranslationEntries = { "pull": "Tirage", "pulls": "Tirages", "sameSpeciesEgg": "{{species}} sortira de cet Œuf !", + "hatchFromTheEgg": "{{pokemonName}} sort de l’Œuf !", + "eggMoveUnlock": "Capacité Œuf débloquée :\n{{moveName}}", + "rareEggMoveUnlock": "Capacité Œuf Rare débloquée :\n{{moveName}}", } as const; diff --git a/src/locales/it/egg.ts b/src/locales/it/egg.ts index 9c353b71a20..9b60b2f1835 100644 --- a/src/locales/it/egg.ts +++ b/src/locales/it/egg.ts @@ -19,4 +19,7 @@ export const egg: SimpleTranslationEntries = { "pull": "Tiro", "pulls": "Tiri", "sameSpeciesEgg": "{{species}} will hatch from this egg!", + "hatchFromTheEgg": "Dall’Uovo è nato {{pokemonName}}!", + "eggMoveUnlock": "Egg Move unlocked: {{moveName}}", + "rareEggMoveUnlock": "Rare Egg Move unlocked: {{moveName}}", } as const; diff --git a/src/locales/ko/egg.ts b/src/locales/ko/egg.ts index 8a47e35c53e..88a845c6424 100644 --- a/src/locales/ko/egg.ts +++ b/src/locales/ko/egg.ts @@ -19,4 +19,7 @@ export const egg: SimpleTranslationEntries = { "pull": "뽑기", "pulls": "뽑기", "sameSpeciesEgg": "{{species}}[[가]] 이 알에서 부화할 거야!", + "hatchFromTheEgg": "알이 부화해서\n{{pokemonName}}[[가]] 태어났다!", + "eggMoveUnlock": "알 기술 {{moveName}}[[를]]\n사용할 수 있게 되었다!", + "rareEggMoveUnlock": "레어 알 기술 {{moveName}}[[를]]\n사용할 수 있게 되었다!", } as const; diff --git a/src/locales/pt_BR/egg.ts b/src/locales/pt_BR/egg.ts index 19fb7d27f00..845e54e3a1a 100644 --- a/src/locales/pt_BR/egg.ts +++ b/src/locales/pt_BR/egg.ts @@ -19,4 +19,7 @@ export const egg: SimpleTranslationEntries = { "pull": "Prêmio", "pulls": "Prêmios", "sameSpeciesEgg": "{{species}} vai rachar desse ovo!", + "hatchFromTheEgg": "{{pokemonName}} hatched from the egg!", + "eggMoveUnlock": "Egg Move unlocked: {{moveName}}", + "rareEggMoveUnlock": "Rare Egg Move unlocked: {{moveName}}", } as const; diff --git a/src/locales/zh_CN/egg.ts b/src/locales/zh_CN/egg.ts index 70811d7cd7b..6a0f3f92d2e 100644 --- a/src/locales/zh_CN/egg.ts +++ b/src/locales/zh_CN/egg.ts @@ -19,4 +19,7 @@ export const egg: SimpleTranslationEntries = { "pull": "次", "pulls": "次", "sameSpeciesEgg": "{{species}} will hatch from this egg!", + "hatchFromTheEgg": "{{pokemonName}} 从蛋中孵化了!", + "eggMoveUnlock": "蛋招式已解锁: {{moveName}}", + "rareEggMoveUnlock": "稀有蛋招式已解锁: {{moveName}}", } as const; diff --git a/src/locales/zh_TW/egg.ts b/src/locales/zh_TW/egg.ts index aacf0217928..46da3abed60 100644 --- a/src/locales/zh_TW/egg.ts +++ b/src/locales/zh_TW/egg.ts @@ -18,5 +18,8 @@ export const egg: SimpleTranslationEntries = { "tooManyEggs": "你的蛋太多啦!", "pull": "抽", "pulls": "抽", - "sameSpeciesEgg": "{{species}} 會從這個蛋裡孵化!" + "sameSpeciesEgg": "{{species}} 會從這個蛋裡孵化!", + "hatchFromTheEgg": "{{pokemonName}} hatched from the egg!", + "eggMoveUnlock": "Egg Move unlocked: {{moveName}}", + "rareEggMoveUnlock": "Rare Egg Move unlocked: {{moveName}}", } as const; diff --git a/src/system/game-data.ts b/src/system/game-data.ts index f36bf1af229..c01314670a3 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -1,3 +1,4 @@ +import i18next from "i18next"; import BattleScene, { PokeballCounts, bypassLogin } from "../battle-scene"; import Pokemon, { EnemyPokemon, PlayerPokemon } from "../field/pokemon"; import { pokemonEvolutions, pokemonPrevolutions } from "../data/pokemon-evolutions"; @@ -1551,7 +1552,9 @@ export class GameData { this.starterData[speciesId].eggMoves |= value; this.scene.playSound("level_up_fanfare"); - this.scene.ui.showText(`${eggMoveIndex === 3 ? "Rare " : ""}Egg Move unlocked: ${allMoves[speciesEggMoves[speciesId][eggMoveIndex]].name}`, null, () => resolve(true), null, true); + + const moveName = allMoves[speciesEggMoves[speciesId][eggMoveIndex]].name; + this.scene.ui.showText(eggMoveIndex === 3 ? i18next.t("egg:rareEggMoveUnlock", { moveName: moveName }) : i18next.t("egg:eggMoveUnlock", { moveName: moveName }), null, () => resolve(true), null, true); }); }