[Localization] localize hatch egg message (+ egg move unlock) (#2395)

* localize hatch egg message (+ egg move unlock)

* Revert overrides.ts

* Update src/locales/de/egg.ts

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Update src/locales/zh_CN/egg.ts

Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>

* add parameter moveName to (rare)eggMoveUnlock to make sentense more flexable

* Update src/locales/ko/egg.ts

Co-authored-by: hibiya (김종이) <inemuri@hibiya.moe>

* Update src/locales/it/egg.ts

* Update src/locales/fr/egg.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Update src/locales/fr/egg.ts

* Update src/locales/fr/egg.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Update src/locales/fr/egg.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Update src/locales/es/egg.ts

Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com>

* solve merge error > Update src/locales/zh_TW/egg.ts

---------

Co-authored-by: 송지원 <jiwsong@gmarket.com>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>
Co-authored-by: hibiya (김종이) <inemuri@hibiya.moe>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com>
This commit is contained in:
Enoch 2024-06-24 09:14:18 +09:00 committed by GitHub
parent 20b708170c
commit b5ffb9aae3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 34 additions and 3 deletions

View File

@ -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(() => {

View File

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

View File

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

View File

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

View File

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

View File

@ -19,4 +19,7 @@ export const egg: SimpleTranslationEntries = {
"pull": "Tiro",
"pulls": "Tiri",
"sameSpeciesEgg": "{{species}} will hatch from this egg!",
"hatchFromTheEgg": "DallUovo è nato {{pokemonName}}!",
"eggMoveUnlock": "Egg Move unlocked: {{moveName}}",
"rareEggMoveUnlock": "Rare Egg Move unlocked: {{moveName}}",
} as const;

View File

@ -19,4 +19,7 @@ export const egg: SimpleTranslationEntries = {
"pull": "뽑기",
"pulls": "뽑기",
"sameSpeciesEgg": "{{species}}[[가]] 이 알에서 부화할 거야!",
"hatchFromTheEgg": "알이 부화해서\n{{pokemonName}}[[가]] 태어났다!",
"eggMoveUnlock": "알 기술 {{moveName}}[[를]]\n사용할 수 있게 되었다!",
"rareEggMoveUnlock": "레어 알 기술 {{moveName}}[[를]]\n사용할 수 있게 되었다!",
} as const;

View File

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

View File

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

View File

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

View File

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