New growth rate lang files (#563)

* New growth rate lang files

* Update i18n.ts, fixing overwrite

* Added growth to lang conf files

---------

Co-authored-by: rnicar <rj.nieto.car@gmail.com>
pull/611/head^2
ArceUseless 2024-05-12 04:04:09 +02:00 committed by GitHub
parent f540b7d17f
commit e9ca17c519
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 74 additions and 6 deletions

View File

@ -2,6 +2,7 @@ import { ability } from "./ability";
import { battle } from "./battle";
import { commandUiHandler } from "./command-ui-handler";
import { fightUiHandler } from "./fight-ui-handler";
import { growth } from "./growth";
import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler";
import { move } from "./move";
@ -24,5 +25,6 @@ export const deConfig = {
pokemonStat: pokemonStat,
pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial
tutorial: tutorial,
growth: growth
}

10
src/locales/de/growth.ts Normal file
View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const growth: SimpleTranslationEntries = {
"Erratic": "Erratic",
"Fast": "Fast",
"Medium_Fast": "Medium Fast",
"Medium_Slow": "Medium Slow",
"Slow": "Slow",
"Fluctuating": "Fluctuating"
} as const;

View File

@ -2,6 +2,7 @@ import { ability } from "./ability";
import { battle } from "./battle";
import { commandUiHandler } from "./command-ui-handler";
import { fightUiHandler } from "./fight-ui-handler";
import { growth } from "./growth";
import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler";
import { move } from "./move";
@ -24,5 +25,6 @@ export const enConfig = {
pokemonStat: pokemonStat,
pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial
tutorial: tutorial,
growth: growth
}

10
src/locales/en/growth.ts Normal file
View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const growth: SimpleTranslationEntries = {
"Erratic": "Erratic",
"Fast": "Fast",
"Medium_Fast": "Medium Fast",
"Medium_Slow": "Medium Slow",
"Slow": "Slow",
"Fluctuating": "Fluctuating"
} as const;

View File

@ -2,6 +2,7 @@ import { ability } from "./ability";
import { battle } from "./battle";
import { commandUiHandler } from "./command-ui-handler";
import { fightUiHandler } from "./fight-ui-handler";
import { growth } from "./growth";
import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler";
import { move } from "./move";
@ -24,5 +25,6 @@ export const esConfig = {
pokemonStat: pokemonStat,
pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial
tutorial: tutorial,
growth: growth
}

10
src/locales/es/growth.ts Normal file
View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const growth: SimpleTranslationEntries = {
"Erratic": "Errático",
"Fast": "Rápido",
"Medium_Fast": "Medio Rápido",
"Medium_Slow": "Medio Lento",
"Slow": "Lento",
"Fluctuating": "Fluctuante"
} as const;

View File

@ -2,6 +2,7 @@ import { ability } from "./ability";
import { battle } from "./battle";
import { commandUiHandler } from "./command-ui-handler";
import { fightUiHandler } from "./fight-ui-handler";
import { growth } from "./growth";
import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler";
import { move } from "./move";
@ -24,5 +25,6 @@ export const frConfig = {
pokemonStat: pokemonStat,
pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial
tutorial: tutorial,
growth: growth
}

10
src/locales/fr/growth.ts Normal file
View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const growth: SimpleTranslationEntries = {
"Erratic": "Erratic",
"Fast": "Fast",
"Medium_Fast": "Medium Fast",
"Medium_Slow": "Medium Slow",
"Slow": "Slow",
"Fluctuating": "Fluctuating"
} as const;

View File

@ -2,6 +2,7 @@ import { ability } from "./ability";
import { battle } from "./battle";
import { commandUiHandler } from "./command-ui-handler";
import { fightUiHandler } from "./fight-ui-handler";
import { growth } from "./growth";
import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler";
import { move } from "./move";
@ -24,5 +25,6 @@ export const itConfig = {
pokemonStat: pokemonStat,
pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial
tutorial: tutorial,
growth: growth
}

10
src/locales/it/growth.ts Normal file
View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const growth: SimpleTranslationEntries = {
"Erratic": "Erratic",
"Fast": "Fast",
"Medium_Fast": "Medium Fast",
"Medium_Slow": "Medium Slow",
"Slow": "Slow",
"Fluctuating": "Fluctuating"
} as const;

View File

@ -103,6 +103,7 @@ declare module 'i18next' {
fightUiHandler: SimpleTranslationEntries;
tutorial: SimpleTranslationEntries;
starterSelectUiHandler: SimpleTranslationEntries;
growth: SimpleTranslationEntries;
};
}
}

View File

@ -1294,7 +1294,14 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.pokemonLuckText.setTint(getVariantTint(Math.min(luck - 1, 2) as Variant));
this.pokemonLuckLabelText.setVisible(this.pokemonLuckText.visible);
this.pokemonGrowthRateText.setText(Utils.toReadableString(GrowthRate[species.growthRate]));
//Growth translate
let growthReadable = Utils.toReadableString(GrowthRate[species.growthRate]);
let growthAux = growthReadable.replace(" ", "_")
if(i18next.exists("growth:" + growthAux)){
growthReadable = i18next.t("growth:"+ growthAux as any)
}
this.pokemonGrowthRateText.setText(growthReadable);
this.pokemonGrowthRateText.setColor(getGrowthRateColor(species.growthRate));
this.pokemonGrowthRateText.setShadowColor(getGrowthRateColor(species.growthRate, true));
this.pokemonGrowthRateLabelText.setVisible(true);