mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-21 06:49:35 +02:00
Updated to include showing the root speciesId if the speciesId locale key doesn't exist
This commit is contained in:
parent
5df60fc294
commit
012a419fde
@ -244,7 +244,13 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||
formName = i18next.t(`pokemonInfo:Type.${formText?.toUpperCase()}`);
|
||||
} else {
|
||||
const i18key = `pokemonForm:${speciesName}${formText}`;
|
||||
formName = i18next.exists(i18key) ? i18next.t(i18key) : formText;
|
||||
if (i18next.exists(i18key)) {
|
||||
formName = i18next.t(i18key);
|
||||
} else {
|
||||
const rootSpeciesName = Utils.capitalizeString(Species[pokemon.species.getRootSpeciesId()], "_", true, false);
|
||||
const i18RootKey = `pokemonForm:${rootSpeciesName}${formText}`;
|
||||
formName = i18next.exists(i18RootKey) ? i18next.t(i18RootKey) : formText;
|
||||
}
|
||||
}
|
||||
|
||||
if (formName) {
|
||||
|
Loading…
Reference in New Issue
Block a user