change growth locales use

This commit is contained in:
fabske0 2025-08-13 14:58:17 +02:00
parent b2454234f6
commit 81a4e98a11
2 changed files with 3 additions and 3 deletions

View File

@ -2612,7 +2612,7 @@ export class PokedexPageUiHandler extends MessageUiHandler {
// Setting growth rate text // Setting growth rate text
if (isFormCaught) { if (isFormCaught) {
let growthReadable = toTitleCase(GrowthRate[species.growthRate]); let growthReadable = toTitleCase(GrowthRate[species.growthRate]);
const growthAux = growthReadable.replace(" ", "_"); const growthAux = toCamelCase(growthReadable);
if (i18next.exists("growth:" + growthAux)) { if (i18next.exists("growth:" + growthAux)) {
growthReadable = i18next.t(("growth:" + growthAux) as any); growthReadable = i18next.t(("growth:" + growthAux) as any);
} }

View File

@ -72,7 +72,7 @@ import {
import type { StarterPreferences } from "#utils/data"; import type { StarterPreferences } from "#utils/data";
import { loadStarterPreferences, saveStarterPreferences } from "#utils/data"; import { loadStarterPreferences, saveStarterPreferences } from "#utils/data";
import { getPokemonSpeciesForm, getPokerusStarters } from "#utils/pokemon-utils"; import { getPokemonSpeciesForm, getPokerusStarters } from "#utils/pokemon-utils";
import { toTitleCase } from "#utils/strings"; import { toCamelCase, toTitleCase } from "#utils/strings";
import { argbFromRgba } from "@material/material-color-utilities"; import { argbFromRgba } from "@material/material-color-utilities";
import i18next from "i18next"; import i18next from "i18next";
import type { GameObjects } from "phaser"; import type { GameObjects } from "phaser";
@ -3464,7 +3464,7 @@ export class StarterSelectUiHandler extends MessageUiHandler {
//Growth translate //Growth translate
let growthReadable = toTitleCase(GrowthRate[species.growthRate]); let growthReadable = toTitleCase(GrowthRate[species.growthRate]);
const growthAux = growthReadable.replace(" ", "_"); const growthAux = toCamelCase(growthReadable);
if (i18next.exists("growth:" + growthAux)) { if (i18next.exists("growth:" + growthAux)) {
growthReadable = i18next.t(("growth:" + growthAux) as any); growthReadable = i18next.t(("growth:" + growthAux) as any);
} }