[Bug] Fix monotype challenge using unlocalized type names (#6438)

This commit is contained in:
Bertie690 2025-09-01 08:57:46 -04:00 committed by GitHub
parent 231cfd040c
commit 17c28c4024
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,7 +27,7 @@ import type { DexEntry } from "#types/dex-data";
import { type BooleanHolder, isBetween, type NumberHolder, randSeedItem } from "#utils/common";
import { deepCopy } from "#utils/data";
import { getPokemonSpecies, getPokemonSpeciesForm } from "#utils/pokemon-utils";
import { toCamelCase, toSnakeCase } from "#utils/strings";
import { toCamelCase } from "#utils/strings";
import i18next from "i18next";
/** A constant for the default max cost of the starting party before a run */
@ -764,7 +764,7 @@ export class SingleTypeChallenge extends Challenge {
}
getValue(overrideValue: number = this.value): string {
return toSnakeCase(PokemonType[overrideValue - 1]);
return i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[overrideValue - 1])}`);
}
getDescription(overrideValue: number = this.value): string {