From ca6eae134539f09248e80fde14fb3823dafcfb19 Mon Sep 17 00:00:00 2001 From: fabske0 <192151969+fabske0@users.noreply.github.com> Date: Mon, 18 Aug 2025 15:32:33 +0200 Subject: [PATCH 1/9] change run-history --- src/ui/run-info-ui-handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/run-info-ui-handler.ts b/src/ui/run-info-ui-handler.ts index a5e21a3a0a1..288f74a1ed8 100644 --- a/src/ui/run-info-ui-handler.ts +++ b/src/ui/run-info-ui-handler.ts @@ -805,7 +805,7 @@ export class RunInfoUiHandler extends UiHandler { const spdef = i18next.t("pokemonInfo:stat.spdefShortened") + ": " + pStats[4]; const speedLabel = currentLanguage === "es-ES" || currentLanguage === "pt_BR" - ? i18next.t("runHistory:SPDshortened") + ? i18next.t("runHistory:spdShortened") : i18next.t("pokemonInfo:stat.spdShortened"); const speed = speedLabel + ": " + pStats[5]; // Column 1: HP Atk Def From ba6272835d8242ea9d67a4f110aa5e01b6888d8d Mon Sep 17 00:00:00 2001 From: fabske0 <192151969+fabske0@users.noreply.github.com> Date: Mon, 18 Aug 2025 15:47:12 +0200 Subject: [PATCH 2/9] change menu --- src/ui/rename-run-ui-handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/rename-run-ui-handler.ts b/src/ui/rename-run-ui-handler.ts index 23ba0137f2d..a94b7b08fb9 100644 --- a/src/ui/rename-run-ui-handler.ts +++ b/src/ui/rename-run-ui-handler.ts @@ -5,7 +5,7 @@ import type { ModalConfig } from "./modal-ui-handler"; export class RenameRunFormUiHandler extends FormModalUiHandler { getModalTitle(_config?: ModalConfig): string { - return i18next.t("menu:renamerun"); + return i18next.t("menu:renameRun"); } getWidth(_config?: ModalConfig): number { From e7e77dff73accf9853163668353493712f732465 Mon Sep 17 00:00:00 2001 From: fabske0 <192151969+fabske0@users.noreply.github.com> Date: Mon, 18 Aug 2025 16:45:35 +0200 Subject: [PATCH 3/9] change settings --- src/system/settings/settings.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/system/settings/settings.ts b/src/system/settings/settings.ts index 32d9e0ee2be..86305b3f7ed 100644 --- a/src/system/settings/settings.ts +++ b/src/system/settings/settings.ts @@ -197,35 +197,35 @@ export const Setting: Array = [ options: [ { value: "1", - label: i18next.t("settings:gameSpeed1x"), + label: i18next.t("settings:gameSpeed100x"), }, { value: "1.25", - label: i18next.t("settings:gameSpeed1_25x"), + label: i18next.t("settings:gameSpeed125x"), }, { value: "1.5", - label: i18next.t("settings:gameSpeed1_5x"), + label: i18next.t("settings:gameSpeed150x"), }, { value: "2", - label: i18next.t("settings:gameSpeed2x"), + label: i18next.t("settings:gameSpeed200x"), }, { value: "2.5", - label: i18next.t("settings:gameSpeed2_5x"), + label: i18next.t("settings:gameSpeed250x"), }, { value: "3", - label: i18next.t("settings:gameSpeed3x"), + label: i18next.t("settings:gameSpeed300x"), }, { value: "4", - label: i18next.t("settings:gameSpeed4x"), + label: i18next.t("settings:gameSpeed400x"), }, { value: "5", - label: i18next.t("settings:gameSpeed5x"), + label: i18next.t("settings:gameSpeed500x"), }, ], default: 3, @@ -566,7 +566,7 @@ export const Setting: Array = [ }, { value: "Back", - label: i18next.t("settings:timeOfDay_back"), + label: i18next.t("settings:timeOfDayBack"), }, ], default: 0, From e7105fad136ccfcedd9bd5363b7783ba4e590b10 Mon Sep 17 00:00:00 2001 From: fabske0 <192151969+fabske0@users.noreply.github.com> Date: Mon, 18 Aug 2025 17:07:26 +0200 Subject: [PATCH 4/9] change splash texts --- src/data/splash-messages.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/splash-messages.ts b/src/data/splash-messages.ts index 3223bbb019e..55ba185bfb2 100644 --- a/src/data/splash-messages.ts +++ b/src/data/splash-messages.ts @@ -100,7 +100,7 @@ const commonSplashMessages = [ "liveWoChienReaction", "itsAFeatureNotABug", "theEggsAreNotForEating", - "7.8outOf10TooManyWaterBiomes", + "tooManyWaterBiomes", "butNothingHappened", "thePowerOfScienceIsAmazing", "freeToPlay", @@ -152,7 +152,7 @@ const commonSplashMessages = [ "insertTextHere", "endingEndlessNotFound", "iLikeMyEggsVouchered", - "YOU", + "you", "noAddedSugar", "notSponsored", "notRated", From 0162879ee82dd186221d0e9643ab8b97a0333739 Mon Sep 17 00:00:00 2001 From: fabske0 <192151969+fabske0@users.noreply.github.com> Date: Mon, 18 Aug 2025 18:08:09 +0200 Subject: [PATCH 5/9] Change trainer classes --- src/data/trainers/trainer-config.ts | 6 +++--- src/field/trainer.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/data/trainers/trainer-config.ts b/src/data/trainers/trainer-config.ts index 67618df1ddd..123996aa403 100644 --- a/src/data/trainers/trainer-config.ts +++ b/src/data/trainers/trainer-config.ts @@ -43,7 +43,7 @@ import type { } from "#types/trainer-funcs"; import { coerceArray, isNullOrUndefined, randSeedInt, randSeedIntRange, randSeedItem } from "#utils/common"; import { getPokemonSpecies } from "#utils/pokemon-utils"; -import { toSnakeCase, toTitleCase } from "#utils/strings"; +import { toCamelCase, toSnakeCase, toTitleCase } from "#utils/strings"; import i18next from "i18next"; /** Minimum BST for Pokemon generated onto the Elite Four's teams */ @@ -830,9 +830,9 @@ export class TrainerConfig { initI18n(); } // Check if the female version exists in the i18n file - if (i18next.exists(`trainerClasses:${this.name.toLowerCase()}`)) { + if (i18next.exists(`trainerClasses:${toCamelCase(this.name)}Female`)) { // If it does, return - return ret + "_female"; + return ret + "Female"; } } } diff --git a/src/field/trainer.ts b/src/field/trainer.ts index 584c9310932..a35cca46c46 100644 --- a/src/field/trainer.ts +++ b/src/field/trainer.ts @@ -23,7 +23,7 @@ import { } from "#trainers/trainer-party-template"; import { randSeedInt, randSeedItem, randSeedWeightedItem } from "#utils/common"; import { getPokemonSpecies } from "#utils/pokemon-utils"; -import { toSnakeCase } from "#utils/strings"; +import { toCamelCase, toSnakeCase } from "#utils/strings"; import i18next from "i18next"; export class Trainer extends Phaser.GameObjects.Container { @@ -170,7 +170,7 @@ export class Trainer extends Phaser.GameObjects.Container { const evilTeamTitles = ["grunt"]; if (this.name === "" && evilTeamTitles.some(t => name.toLocaleLowerCase().includes(t))) { // This is a evil team grunt so we localize it by only using the "name" as the title - title = i18next.t(`trainerClasses:${toSnakeCase(name)}`); + title = i18next.t(`trainerClasses:${toCamelCase(name)}`); console.log("Localized grunt name: " + title); // Since grunts are not named we can just return the title return title; @@ -187,7 +187,7 @@ export class Trainer extends Phaser.GameObjects.Container { } // Get the localized trainer class name from the i18n file and set it as the title. // This is used for trainer class names, not titles like "Elite Four, Champion, etc." - title = i18next.t(`trainerClasses:${toSnakeCase(name)}`); + title = i18next.t(`trainerClasses:${toCamelCase(name)}`); } // If no specific trainer slot is set. From 4d02e74012795cbf6d04733503a28500c474b9c3 Mon Sep 17 00:00:00 2001 From: fabske0 <192151969+fabske0@users.noreply.github.com> Date: Mon, 18 Aug 2025 20:15:07 +0200 Subject: [PATCH 6/9] change trainer names --- .../encounters/bug-type-superfan-encounter.ts | 2 +- .../the-expert-pokemon-breeder-encounter.ts | 2 +- src/data/trainers/trainer-config.ts | 18 +++++++++--------- src/field/trainer.ts | 4 ++-- src/ui/game-stats-ui-handler.ts | 4 ++-- src/ui/run-history-ui-handler.ts | 2 +- src/ui/run-info-ui-handler.ts | 2 +- src/ui/summary-ui-handler.ts | 4 ++-- src/ui/title-ui-handler.ts | 4 ++-- .../the-expert-breeder-encounter.test.ts | 8 ++++---- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/data/mystery-encounters/encounters/bug-type-superfan-encounter.ts b/src/data/mystery-encounters/encounters/bug-type-superfan-encounter.ts index 2f6b988f32e..6750051c3c4 100644 --- a/src/data/mystery-encounters/encounters/bug-type-superfan-encounter.ts +++ b/src/data/mystery-encounters/encounters/bug-type-superfan-encounter.ts @@ -514,7 +514,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde function getTrainerConfigForWave(waveIndex: number) { // Bug type superfan trainer config const config = trainerConfigs[TrainerType.BUG_TYPE_SUPERFAN].clone(); - config.name = i18next.t("trainerNames:bug_type_superfan"); + config.name = i18next.t("trainerNames:bugTypeSuperfan"); let pool3Copy = POOL_3_POKEMON.slice(0); pool3Copy = randSeedShuffle(pool3Copy); diff --git a/src/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter.ts b/src/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter.ts index 6d0ff11f07a..5d97dd1fd67 100644 --- a/src/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter.ts +++ b/src/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter.ts @@ -33,7 +33,7 @@ import i18next from "i18next"; /** the i18n namespace for the encounter */ const namespace = "mysteryEncounters/theExpertPokemonBreeder"; -const trainerNameKey = "trainerNames:expert_pokemon_breeder"; +const trainerNameKey = "trainerNames:expertPokemonBreeder"; const FIRST_STAGE_EVOLUTION_WAVE = 45; const SECOND_STAGE_EVOLUTION_WAVE = 60; diff --git a/src/data/trainers/trainer-config.ts b/src/data/trainers/trainer-config.ts index 123996aa403..f0fead6641d 100644 --- a/src/data/trainers/trainer-config.ts +++ b/src/data/trainers/trainer-config.ts @@ -43,7 +43,7 @@ import type { } from "#types/trainer-funcs"; import { coerceArray, isNullOrUndefined, randSeedInt, randSeedIntRange, randSeedItem } from "#utils/common"; import { getPokemonSpecies } from "#utils/pokemon-utils"; -import { toCamelCase, toSnakeCase, toTitleCase } from "#utils/strings"; +import { toCamelCase, toTitleCase } from "#utils/strings"; import i18next from "i18next"; /** Minimum BST for Pokemon generated onto the Elite Four's teams */ @@ -288,7 +288,7 @@ export class TrainerConfig { initI18n(); } // Set the localized name for the female rival. - this.nameFemale = i18next.t("trainerNames:rival_female"); + this.nameFemale = i18next.t("trainerNames:rivalFemale"); } else { // Otherwise, assign the provided female name. this.nameFemale = nameFemale!; // TODO: is this bang correct? @@ -552,7 +552,7 @@ export class TrainerConfig { this.setPartyMemberFunc(-(s + 1), getRandomPartyMemberFunc(coerceArray(speciesPool))); }); - const nameForCall = this.name.toLowerCase().replace(/\s/g, "_"); + const nameForCall = toCamelCase(this.name); this.name = i18next.t(`trainerNames:${nameForCall}`); this.setHasVoucher(false); this.setTitle(title); @@ -577,7 +577,7 @@ export class TrainerConfig { this.setPartyTemplates(trainerPartyTemplates.ELITE_FOUR); - const nameForCall = this.name.toLowerCase().replace(/\s/g, "_"); + const nameForCall = toCamelCase(this.name); this.name = i18next.t(`trainerNames:${nameForCall}`); this.setMoneyMultiplier(2); this.setBoss(); @@ -618,7 +618,7 @@ export class TrainerConfig { this.setSpeciesFilter(p => p.isOfType(specialtyType)); this.setSpecialtyType(specialtyType); } - const nameForCall = this.name.toLowerCase().replace(/\s/g, "_"); + const nameForCall = toCamelCase(this.name); this.name = i18next.t(`trainerNames:${nameForCall}`); this.setTitle(title); this.setMoneyMultiplier(2.5); @@ -666,7 +666,7 @@ export class TrainerConfig { this.setSpecialtyType(specialtyType); // Localize the trainer's name by converting it to lowercase and replacing spaces with underscores. - const nameForCall = this.name.toLowerCase().replace(/\s/g, "_"); + const nameForCall = toCamelCase(this.name); this.name = i18next.t(`trainerNames:${nameForCall}`); // Set the title to "gym_leader". (this is the key in the i18n file) @@ -727,7 +727,7 @@ export class TrainerConfig { } // Localize the trainer's name by converting it to lowercase and replacing spaces with underscores. - const nameForCall = toSnakeCase(this.name); + const nameForCall = toCamelCase(this.name); this.name = i18next.t(`trainerNames:${nameForCall}`); // Set the title to "elite_four". (this is the key in the i18n file) @@ -764,7 +764,7 @@ export class TrainerConfig { this.setPartyTemplates(trainerPartyTemplates.CHAMPION); // Localize the trainer's name by converting it to lowercase and replacing spaces with underscores. - const nameForCall = this.name.toLowerCase().replace(/\s/g, "_"); + const nameForCall = toCamelCase(this.name); this.name = i18next.t(`trainerNames:${nameForCall}`); // Set the title to "champion". (this is the key in the i18n file) @@ -794,7 +794,7 @@ export class TrainerConfig { if (!getIsInitialized()) { initI18n(); } - this.name = i18next.t(`trainerNames:${name.toLowerCase().replace(/\s/g, "_")}`); + this.name = i18next.t(`trainerNames:${toCamelCase(name)}`); return this; } diff --git a/src/field/trainer.ts b/src/field/trainer.ts index a35cca46c46..d3825aae26b 100644 --- a/src/field/trainer.ts +++ b/src/field/trainer.ts @@ -23,7 +23,7 @@ import { } from "#trainers/trainer-party-template"; import { randSeedInt, randSeedItem, randSeedWeightedItem } from "#utils/common"; import { getPokemonSpecies } from "#utils/pokemon-utils"; -import { toCamelCase, toSnakeCase } from "#utils/strings"; +import { toCamelCase } from "#utils/strings"; import i18next from "i18next"; export class Trainer extends Phaser.GameObjects.Container { @@ -208,7 +208,7 @@ export class Trainer extends Phaser.GameObjects.Container { if (this.config.titleDouble && this.variant === TrainerVariant.DOUBLE && !this.config.doubleOnly) { title = this.config.titleDouble; - name = i18next.t(`trainerNames:${toSnakeCase(this.config.nameDouble)}`); + name = i18next.t(`trainerNames:${toCamelCase(this.config.nameDouble)}`); } console.log(title ? `${title} ${name}` : name); diff --git a/src/ui/game-stats-ui-handler.ts b/src/ui/game-stats-ui-handler.ts index d2a9779f515..4ddb80fcc00 100644 --- a/src/ui/game-stats-ui-handler.ts +++ b/src/ui/game-stats-ui-handler.ts @@ -308,8 +308,8 @@ export class GameStatsUiHandler extends UiHandler { private getUsername(): string { const usernameReplacement = globalScene.gameData.gender === PlayerGender.FEMALE - ? i18next.t("trainerNames:player_f") - : i18next.t("trainerNames:player_m"); + ? i18next.t("trainerNames:playerF") + : i18next.t("trainerNames:playerM"); const displayName = !globalScene.hideUsername ? (loggedInUser?.username ?? i18next.t("common:guest")) diff --git a/src/ui/run-history-ui-handler.ts b/src/ui/run-history-ui-handler.ts index 457c48654a3..6f4d9024832 100644 --- a/src/ui/run-history-ui-handler.ts +++ b/src/ui/run-history-ui-handler.ts @@ -337,7 +337,7 @@ class RunEntryContainer extends Phaser.GameObjects.Container { // Because of the interesting mechanics behind rival names, the rival name and title have to be retrieved differently const RIVAL_TRAINER_ID_THRESHOLD = 375; if (data.trainer.trainerType >= RIVAL_TRAINER_ID_THRESHOLD) { - const rivalName = tObj.variant === TrainerVariant.FEMALE ? "trainerNames:rival_female" : "trainerNames:rival"; + const rivalName = tObj.variant === TrainerVariant.FEMALE ? "trainerNames:rivalFemale" : "trainerNames:rival"; const gameOutcomeLabel = addTextObject( 8, 5, diff --git a/src/ui/run-info-ui-handler.ts b/src/ui/run-info-ui-handler.ts index 288f74a1ed8..5fc0f37c72d 100644 --- a/src/ui/run-info-ui-handler.ts +++ b/src/ui/run-info-ui-handler.ts @@ -337,7 +337,7 @@ export class RunInfoUiHandler extends UiHandler { if (this.runInfo.trainer.trainerType >= RIVAL_TRAINER_ID_THRESHOLD) { trainerName = trainerObj.variant === TrainerVariant.FEMALE - ? i18next.t("trainerNames:rival_female") + ? i18next.t("trainerNames:rivalFemale") : i18next.t("trainerNames:rival"); } else { trainerName = trainerObj.getName(0, true); diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index 01d9b981563..b6447f03587 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -808,8 +808,8 @@ export class SummaryUiHandler extends UiHandler { globalScene.gameData.gender === PlayerGender.FEMALE ? TextStyle.SUMMARY_PINK : TextStyle.SUMMARY_BLUE; const usernameReplacement = globalScene.gameData.gender === PlayerGender.FEMALE - ? i18next.t("trainerNames:player_f") - : i18next.t("trainerNames:player_m"); + ? i18next.t("trainerNames:playerF") + : i18next.t("trainerNames:playerM"); // TODO: should add field for original trainer name to Pokemon object, to support gift/traded Pokemon from MEs const trainerText = addBBCodeTextObject( diff --git a/src/ui/title-ui-handler.ts b/src/ui/title-ui-handler.ts index 36e37500a64..5ae195231e5 100644 --- a/src/ui/title-ui-handler.ts +++ b/src/ui/title-ui-handler.ts @@ -122,8 +122,8 @@ export class TitleUiHandler extends OptionSelectUiHandler { genderSplash(): void { if (this.splashMessage === "splashMessages:aprilFools.helloKyleAmber") { globalScene.gameData.gender === PlayerGender.MALE - ? this.splashMessageText.setText(i18next.t(this.splashMessage, { name: i18next.t("trainerNames:player_m") })) - : this.splashMessageText.setText(i18next.t(this.splashMessage, { name: i18next.t("trainerNames:player_f") })); + ? this.splashMessageText.setText(i18next.t(this.splashMessage, { name: i18next.t("trainerNames:playerM") })) + : this.splashMessageText.setText(i18next.t(this.splashMessage, { name: i18next.t("trainerNames:playerF") })); } } diff --git a/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts b/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts index 31584048c78..f9cc13c856b 100644 --- a/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts +++ b/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts @@ -70,7 +70,7 @@ describe("The Expert Pokémon Breeder - Mystery Encounter", () => { text: `${namespace}:intro`, }, { - speaker: "trainerNames:expert_pokemon_breeder", + speaker: "trainerNames:expertPokemonBreeder", text: `${namespace}:introDialogue`, }, ]); @@ -123,7 +123,7 @@ describe("The Expert Pokémon Breeder - Mystery Encounter", () => { buttonTooltip: expect.any(String), // Varies based on pokemon selected: [ { - speaker: "trainerNames:expert_pokemon_breeder", + speaker: "trainerNames:expertPokemonBreeder", text: `${namespace}:option.selected`, }, ], @@ -208,7 +208,7 @@ describe("The Expert Pokémon Breeder - Mystery Encounter", () => { buttonTooltip: expect.any(String), // Varies based on pokemon selected: [ { - speaker: "trainerNames:expert_pokemon_breeder", + speaker: "trainerNames:expertPokemonBreeder", text: `${namespace}:option.selected`, }, ], @@ -290,7 +290,7 @@ describe("The Expert Pokémon Breeder - Mystery Encounter", () => { buttonTooltip: expect.any(String), // Varies based on pokemon selected: [ { - speaker: "trainerNames:expert_pokemon_breeder", + speaker: "trainerNames:expertPokemonBreeder", text: `${namespace}:option.selected`, }, ], From ff560fa7ea52890025f08b910395ccbd93af4c91 Mon Sep 17 00:00:00 2001 From: fabske0 <192151969+fabske0@users.noreply.github.com> Date: Mon, 18 Aug 2025 23:47:44 +0200 Subject: [PATCH 7/9] Change trainer titles --- src/data/trainers/trainer-config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/trainers/trainer-config.ts b/src/data/trainers/trainer-config.ts index f0fead6641d..59dc53a659b 100644 --- a/src/data/trainers/trainer-config.ts +++ b/src/data/trainers/trainer-config.ts @@ -194,7 +194,7 @@ export class TrainerConfig { } // Make the title lowercase and replace spaces with underscores - title = title.toLowerCase().replace(/\s/g, "_"); + title = toCamelCase(title); // Get the title from the i18n file this.title = i18next.t(`titles:${title}`); @@ -366,7 +366,7 @@ export class TrainerConfig { } // Make the title lowercase and replace spaces with underscores - titleDouble = titleDouble.toLowerCase().replace(/\s/g, "_"); + titleDouble = toCamelCase(titleDouble); // Get the title from the i18n file this.titleDouble = i18next.t(`titles:${titleDouble}`); From ea8ac5b43cc4dffb3035ab04858736eeaad34aba Mon Sep 17 00:00:00 2001 From: fabske0 <192151969+fabske0@users.noreply.github.com> Date: Mon, 18 Aug 2025 23:58:16 +0200 Subject: [PATCH 8/9] fix trainer config comments and `setTitle()` --- src/data/trainers/trainer-config.ts | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/data/trainers/trainer-config.ts b/src/data/trainers/trainer-config.ts index 59dc53a659b..b39795d2650 100644 --- a/src/data/trainers/trainer-config.ts +++ b/src/data/trainers/trainer-config.ts @@ -193,7 +193,6 @@ export class TrainerConfig { initI18n(); } - // Make the title lowercase and replace spaces with underscores title = toCamelCase(title); // Get the title from the i18n file @@ -365,7 +364,6 @@ export class TrainerConfig { initI18n(); } - // Make the title lowercase and replace spaces with underscores titleDouble = toCamelCase(titleDouble); // Get the title from the i18n file @@ -665,14 +663,14 @@ export class TrainerConfig { this.setSpeciesFilter(p => p.isOfType(specialtyType)); this.setSpecialtyType(specialtyType); - // Localize the trainer's name by converting it to lowercase and replacing spaces with underscores. + // Localize the trainer's name by converting it to camel case. const nameForCall = toCamelCase(this.name); this.name = i18next.t(`trainerNames:${nameForCall}`); - // Set the title to "gym_leader". (this is the key in the i18n file) - this.setTitle("gym_leader"); + // Set the title to "gymLeader". (this is the key in the i18n file) + this.setTitle("gymLeader"); if (!isMale) { - this.setTitle("gym_leader_female"); + this.setTitle("gymLeaderFemale"); } // Configure various properties for the Gym Leader. @@ -726,14 +724,14 @@ export class TrainerConfig { this.setSpeciesFilter(p => p.baseTotal >= ELITE_FOUR_MINIMUM_BST); } - // Localize the trainer's name by converting it to lowercase and replacing spaces with underscores. + // Localize the trainer's name by converting it to camel case. const nameForCall = toCamelCase(this.name); this.name = i18next.t(`trainerNames:${nameForCall}`); // Set the title to "elite_four". (this is the key in the i18n file) - this.setTitle("elite_four"); + this.setTitle("eliteFour"); if (!isMale) { - this.setTitle("elite_four_female"); + this.setTitle("eliteFourFemale"); } // Configure various properties for the Elite Four member. @@ -763,14 +761,14 @@ export class TrainerConfig { // Set the party templates for the Champion. this.setPartyTemplates(trainerPartyTemplates.CHAMPION); - // Localize the trainer's name by converting it to lowercase and replacing spaces with underscores. + // Localize the trainer's name by converting it to camel case. const nameForCall = toCamelCase(this.name); this.name = i18next.t(`trainerNames:${nameForCall}`); // Set the title to "champion". (this is the key in the i18n file) this.setTitle("champion"); if (!isMale) { - this.setTitle("champion_female"); + this.setTitle("championFemale"); } // Configure various properties for the Champion. From d05caf443da6c03fe14c9202ef1628764123d3d7 Mon Sep 17 00:00:00 2001 From: fabske0 <192151969+fabske0@users.noreply.github.com> Date: Tue, 19 Aug 2025 00:36:20 +0200 Subject: [PATCH 9/9] change challenges --- src/data/challenge.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/challenge.ts b/src/data/challenge.ts index ea780f8aeb2..b4fb176de4e 100644 --- a/src/data/challenge.ts +++ b/src/data/challenge.ts @@ -674,10 +674,10 @@ export class SingleGenerationChallenge extends Challenge { getDescription(overrideValue: number = this.value): string { if (overrideValue === 0) { - return i18next.t("challenges:singleGeneration.desc_default"); + return i18next.t("challenges:singleGeneration.descDefault"); } return i18next.t("challenges:singleGeneration.desc", { - gen: i18next.t(`challenges:singleGeneration.gen_${overrideValue}`), + gen: i18next.t(`challenges:singleGeneration.gen${overrideValue}`), }); } @@ -758,7 +758,7 @@ export class SingleTypeChallenge extends Challenge { getDescription(overrideValue: number = this.value): string { const type = i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[overrideValue - 1])}`); const typeColor = `[color=${TypeColor[PokemonType[overrideValue - 1]]}][shadow=${TypeShadow[PokemonType[this.value - 1]]}]${type}[/shadow][/color]`; - const defaultDesc = i18next.t("challenges:singleType.desc_default"); + const defaultDesc = i18next.t("challenges:singleType.descDefault"); const typeDesc = i18next.t("challenges:singleType.desc", { type: typeColor, });