From f1e97f3b38157409e44088770397238ec0fbf709 Mon Sep 17 00:00:00 2001 From: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Date: Thu, 16 May 2024 13:09:12 +0200 Subject: [PATCH 1/3] Added difference between the "x want to fight" for double and single battle since in some languages it needs to be (like german) (#966) --- src/locales/de/battle.ts | 1 + src/locales/en/battle.ts | 1 + src/locales/es/battle.ts | 1 + src/locales/fr/battle.ts | 1 + src/locales/it/battle.ts | 1 + src/locales/pt_BR/battle.ts | 1 + src/locales/zh_CN/battle.ts | 1 + src/phases.ts | 11 +++++++++-- 8 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/locales/de/battle.ts b/src/locales/de/battle.ts index 687c60129cc..5504e541be0 100644 --- a/src/locales/de/battle.ts +++ b/src/locales/de/battle.ts @@ -3,6 +3,7 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const battle: SimpleTranslationEntries = { "bossAppeared": "{{bossName}} erscheint.", "trainerAppeared": "{{trainerName}}\nmöchte kämpfen!", + "trainerAppearedDouble": "{{trainerName}}\nmöchten kämpfen!", "singleWildAppeared": "Ein wildes {{pokemonName}} erscheint!", "multiWildAppeared": "Ein wildes {{pokemonName1}}\nund {{pokemonName2}} erscheinen!", "playerComeBack": "Komm zurück, {{pokemonName}}!", diff --git a/src/locales/en/battle.ts b/src/locales/en/battle.ts index 0162f2922af..a6ed2fabc64 100644 --- a/src/locales/en/battle.ts +++ b/src/locales/en/battle.ts @@ -3,6 +3,7 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const battle: SimpleTranslationEntries = { "bossAppeared": "{{bossName}} appeared.", "trainerAppeared": "{{trainerName}}\nwould like to battle!", + "trainerAppearedDouble": "{{trainerName}}\nwould like to battle!", "singleWildAppeared": "A wild {{pokemonName}} appeared!", "multiWildAppeared": "A wild {{pokemonName1}}\nand {{pokemonName2}} appeared!", "playerComeBack": "Come back, {{pokemonName}}!", diff --git a/src/locales/es/battle.ts b/src/locales/es/battle.ts index 5b4b696a9d2..5715c58ece0 100644 --- a/src/locales/es/battle.ts +++ b/src/locales/es/battle.ts @@ -3,6 +3,7 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const battle: SimpleTranslationEntries = { "bossAppeared": "¡{{bossName}} te corta el paso!", "trainerAppeared": "¡{{trainerName}}\nte desafía!", + "trainerAppearedDouble": "{{trainerName}}\nwould like to battle!", "singleWildAppeared": "¡Un {{pokemonName}} salvaje te corta el paso!", "multiWildAppeared": "¡Un {{pokemonName1}} y un {{pokemonName2}} salvajes\nte cortan el paso!", "playerComeBack": "¡{{pokemonName}}, ven aquí!", diff --git a/src/locales/fr/battle.ts b/src/locales/fr/battle.ts index a76cc9cdeaf..27948f3a6a1 100644 --- a/src/locales/fr/battle.ts +++ b/src/locales/fr/battle.ts @@ -3,6 +3,7 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const battle: SimpleTranslationEntries = { "bossAppeared": "Un {{bossName}} apparaît.", "trainerAppeared": "Un combat est lancé\npar {{trainerName}} !", + "trainerAppearedDouble": "{{trainerName}}\nwould like to battle!", "singleWildAppeared": "Un {{pokemonName}} sauvage apparaît !", "multiWildAppeared": "Un {{pokemonName1}} et un {{pokemonName2}}\nsauvages apparaissent !", "playerComeBack": "{{pokemonName}}, on change !\nReviens !", diff --git a/src/locales/it/battle.ts b/src/locales/it/battle.ts index 702ec0708ef..3eff2493ed6 100644 --- a/src/locales/it/battle.ts +++ b/src/locales/it/battle.ts @@ -3,6 +3,7 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const battle: SimpleTranslationEntries = { "bossAppeared": "{{bossName}} è apparso.", "trainerAppeared": "{{trainerName}}\nvuole combattere!", + "trainerAppearedDouble": "{{trainerName}}\nwould like to battle!", "singleWildAppeared": "Appare {{pokemonName}} selvatico!", "multiWildAppeared": "Appaiono {{pokemonName1}}\ne {{pokemonName2}} salvatici!", "playerComeBack": "Rientra, {{pokemonName}}!", diff --git a/src/locales/pt_BR/battle.ts b/src/locales/pt_BR/battle.ts index 39f889deeac..8d8ce72ef67 100644 --- a/src/locales/pt_BR/battle.ts +++ b/src/locales/pt_BR/battle.ts @@ -3,6 +3,7 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const battle: SimpleTranslationEntries = { "bossAppeared": "{{bossName}} apareceu.", "trainerAppeared": "{{trainerName}}\nquer batalhar!", + "trainerAppearedDouble": "{{trainerName}}\nwould like to battle!", "singleWildAppeared": "Um {{pokemonName}} selvagem apareceu!", "multiWildAppeared": "Um {{pokemonName1}} e um {{pokemonName2}} selvagens\napareceram!", "playerComeBack": "{{pokemonName}}, retorne!", diff --git a/src/locales/zh_CN/battle.ts b/src/locales/zh_CN/battle.ts index f99e2ddc76a..cf58add1d6d 100644 --- a/src/locales/zh_CN/battle.ts +++ b/src/locales/zh_CN/battle.ts @@ -3,6 +3,7 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const battle: SimpleTranslationEntries = { "bossAppeared": "{{bossName}} 出现了。", "trainerAppeared": "{{trainerName}}\n想要和你对战!", + "trainerAppearedDouble": "{{trainerName}}\nwould like to battle!", "singleWildAppeared": "一只野生 {{pokemonName}} 出现了。!", "multiWildAppeared": "野生的 {{pokemonName1}}\n和 {{pokemonName2}} 出现了。!", "playerComeBack": "回来吧, {{pokemonName}}!", diff --git a/src/phases.ts b/src/phases.ts index 90039502c30..f44b4bcaa0b 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -841,8 +841,15 @@ export class EncounterPhase extends BattlePhase { if (this.scene.currentBattle.battleSpec === BattleSpec.FINAL_BOSS) return i18next.t('battle:bossAppeared', {bossName: enemyField[0].name}); - if (this.scene.currentBattle.battleType === BattleType.TRAINER) - return i18next.t('battle:trainerAppeared', {trainerName: this.scene.currentBattle.trainer.getName(TrainerSlot.NONE, true)}); + if (this.scene.currentBattle.battleType === BattleType.TRAINER) { + if (this.scene.currentBattle.double) { + return i18next.t('battle:trainerAppearedDouble', {trainerName: this.scene.currentBattle.trainer.getName(TrainerSlot.NONE, true)}); + + } + else { + return i18next.t('battle:trainerAppeared', {trainerName: this.scene.currentBattle.trainer.getName(TrainerSlot.NONE, true)}); + } + } return enemyField.length === 1 ? i18next.t('battle:singleWildAppeared', {pokemonName: enemyField[0].name}) From 55105bf79ab4d12adbb0b3f16447ca46802fe665 Mon Sep 17 00:00:00 2001 From: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Date: Thu, 16 May 2024 13:10:20 +0200 Subject: [PATCH 2/3] Fixes that brocks name is undefined (#967) * Brock now has a name againg (we check if i18 is initialized before localising elite4,champs and gym leaders * Removed console log --- src/data/trainer-config.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/data/trainer-config.ts b/src/data/trainer-config.ts index 0556a4df95a..712cd13a38d 100644 --- a/src/data/trainer-config.ts +++ b/src/data/trainer-config.ts @@ -399,6 +399,9 @@ export class TrainerConfig { } initForGymLeader(signatureSpecies: (Species | Species[])[], ...specialtyTypes: Type[]): TrainerConfig { + if (!getIsInitialized()) { + initI18n(); + } this.setPartyTemplateFunc(getGymLeaderPartyTemplate); signatureSpecies.forEach((speciesPool, s) => { @@ -431,7 +434,9 @@ export class TrainerConfig { } initForEliteFour(signatureSpecies: (Species | Species[])[], ...specialtyTypes: Type[]): TrainerConfig { - + if (!getIsInitialized()) { + initI18n(); + } this.setPartyTemplates(trainerPartyTemplates.ELITE_FOUR); signatureSpecies.forEach((speciesPool, s) => { @@ -459,7 +464,9 @@ export class TrainerConfig { } initForChampion(signatureSpecies: (Species | Species[])[]): TrainerConfig { - + if (!getIsInitialized()) { + initI18n(); + } this.setPartyTemplates(trainerPartyTemplates.CHAMPION); signatureSpecies.forEach((speciesPool, s) => { if (!Array.isArray(speciesPool)) From 0e8431386254061b15bc8aa02a56d1f783e35722 Mon Sep 17 00:00:00 2001 From: Lugiad Date: Thu, 16 May 2024 13:11:00 +0200 Subject: [PATCH 3/3] Update French trainers.ts (#965) --- src/locales/fr/trainers.ts | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/locales/fr/trainers.ts b/src/locales/fr/trainers.ts index 0f67e860186..826daa7deb2 100644 --- a/src/locales/fr/trainers.ts +++ b/src/locales/fr/trainers.ts @@ -16,13 +16,13 @@ export const titles: SimpleTranslationEntries = { export const trainerClasses: SimpleTranslationEntries = { "ace_trainer": "Topdresseur", "ace_trainer_female": "Topdresseuse", - "ace_duo": "Ace Duo", + "ace_duo": "Topdresseurs", "artist": "Artiste", "artist_female": "Artiste", "backers": "Pompom Girls", "backpacker": "Randonneur", "backpacker_female": "Randonneuse", - "backpackers": "Backpackers", + "backpackers": "Randonneurs", "baker": "Boulangère", "battle_girl": "Combattante", "beauty": "Canon", @@ -30,13 +30,13 @@ export const trainerClasses: SimpleTranslationEntries = { "black_belt": "Karatéka", "breeder": "Éleveur", "breeder_female": "Éleveuse", - "breeders": "Breeders", + "breeders": "Éleveurs", "clerk": "Employé", "clerk_female": "Employée", - "colleagues": "Colleagues", + "colleagues": "Collègues de Bureau", "cyclist": "Cycliste", "cyclist_female": "Cycliste", - "cyclists": "Cyclists", + "cyclists": "Cyclistes", "dancer": "Danseur", "dancer_female": "Danseuse", "depot_agent": "Cheminot", @@ -59,46 +59,46 @@ export const trainerClasses: SimpleTranslationEntries = { "maid": "Gouvernante", "madame": "Mondaine", "musican": "Musicien", - "medical_team": "Medical Team", - "hex_maniac": "Hex Maniac", - "nurse": " Infirmière", + "medical_team": "Médecins", + "hex_maniac": "Mystimaniac", + "nurse": "Infirmière", "nursery_aide": "Institutrice", "officer": "Policier", "parasol_lady": "Sœur Parasol", "pilot": "Pilote", "poké_fan": "Poké Fan", - "poké_fan_family": "Poké Fan Family", + "poké_fan_family": "Couple de Pokéfans", "preschooler": "Petit", "preschooler_female": "Petite", - "preschoolers": "Preschoolers", + "preschoolers": "Petits", "psychic": "Kinésiste", "psychic_female": "Kinésiste", - "psychics": "Psychics", + "psychics": "Kinésistes", "pokémon_ranger": "Pokémon Ranger", - "pokémon_rangers": "Pokémon Ranger", + "pokémon_rangers": "Pokémon Rangers", "ranger": "Ranger", - "restaurant_staff": "Restaurant Staff", - "rich_boy": "Rich Boy", - "rich_couple": "Rich Couple", - "rich_kids": "Rich Kids", + "restaurant_staff": "Serveurs", + "rich_boy": "Richard", + "rich_couple": "Couple de Bourgeois", + "rich_kids": "Richards", "roughneck": "Loubard", "scientist": "Scientifique", "scientist_female": "Scientifique", - "scientists": "Scientists", + "scientists": "Scientifiques", "smasher": "Tenniswoman", "snow_worker": "Ouvrier Alpin", "snow_worker_female": "Ouvrière Alpine", "striker": "Footballeur", "school_kid": "Élève", "school_kid_female": "Élève", - "school_kids": "School Kids", + "school_kids": "Élèves", "swimmer": "Nageur", "swimmer_female": "Nageuse", - "swimmers": "Swimmers", + "swimmers": "Nageurs", "twins": "Jumelles", "veteran": "Vénérable", "veteran_female": "Vénérable", - "veteran_duo": "Veteran Duo", + "veteran_duo": "Vénérables", "waiter": "Serveur", "waitress": "Serveuse", "worker": "Ouvrier",