New growth rate lang files

This commit is contained in:
rnicar 2024-05-06 20:24:26 +02:00
parent bde7620ac0
commit 9834abc177
7 changed files with 76 additions and 6 deletions

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;

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;

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;

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;

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

@ -73,6 +73,12 @@ import { starterSelectUiHandler as frStarterSelectUiHandler } from '../locales/f
import { starterSelectUiHandler as itStarterSelectUiHandler} from '../locales/it/starter-select-ui-handler';
import { starterSelectUiHandler as deStarterSelectUiHandler } from '../locales/de/starter-select-ui-handler';
import { growth as enGrowth } from '../locales/en/growth';
import { growth as esGrowth } from '../locales/es/growth';
import { growth as frGrowth } from '../locales/fr/growth';
import { growth as itGrowth } from '../locales/it/growth';
import { growth as deGrowth } from '../locales/de/growth';
export interface SimpleTranslationEntries {
[key: string]: string
}
@ -142,7 +148,9 @@ export function initI18n(): void {
commandUiHandler: enCommandUiHandler,
fightUiHandler: enFightUiHandler,
tutorial: enTutorial,
starterSelectUiHandler: enStarterSelectUiHandler
starterSelectUiHandler: enStarterSelectUiHandler,
growth: enGrowth
},
es: {
menu: esMenu,
@ -156,7 +164,8 @@ export function initI18n(): void {
commandUiHandler: esCommandUiHandler,
fightUiHandler: esFightUiHandler,
tutorial: esTutorial,
starterSelectUiHandler: esStarterSelectUiHandler
starterSelectUiHandler: esStarterSelectUiHandler,
growth: esGrowth
},
fr: {
menu: frMenu,
@ -170,7 +179,8 @@ export function initI18n(): void {
commandUiHandler: frCommandUiHandler,
fightUiHandler: frFightUiHandler,
tutorial: frTutorial,
starterSelectUiHandler: frStarterSelectUiHandler
starterSelectUiHandler: frStarterSelectUiHandler,
growth: frGrowth
},
it: {
menu: itMenu,
@ -184,7 +194,8 @@ export function initI18n(): void {
commandUiHandler: itCommandUiHandler,
fightUiHandler: itFightUiHandler,
tutorial: itTutorial,
starterSelectUiHandler: itStarterSelectUiHandler
starterSelectUiHandler: itStarterSelectUiHandler,
growth: itGrowth
},
de: {
menu: deMenu,
@ -198,7 +209,8 @@ export function initI18n(): void {
commandUiHandler: deCommandUiHandler,
fightUiHandler: deFightUiHandler,
tutorial: deTutorial,
starterSelectUiHandler: deStarterSelectUiHandler
starterSelectUiHandler: deStarterSelectUiHandler,
growth: deGrowth
}
},
});
@ -220,6 +232,7 @@ declare module 'i18next' {
fightUiHandler: typeof enFightUiHandler;
tutorial: typeof enTutorial;
starterSelectUiHandler: typeof enStarterSelectUiHandler;
growth: typeof enGrowth;
};
}
}

View File

@ -1281,7 +1281,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);