Merge branch 'main' into natures-langs

pull/611/head
rnicar245 2024-05-12 04:20:14 +02:00 committed by GitHub
commit b0a6ab00da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 74 additions and 11 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";
@ -26,6 +27,6 @@ export const deConfig = {
pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial,
nature: nature
nature: nature,
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";
@ -26,6 +27,6 @@ export const enConfig = {
pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial,
nature: nature
nature: nature,
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";
@ -26,6 +27,6 @@ export const esConfig = {
pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial,
nature: nature
nature: nature,
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";
@ -26,6 +27,6 @@ export const frConfig = {
pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial,
nature: nature
nature: nature,
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";
@ -26,6 +27,6 @@ export const itConfig = {
pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial,
nature: nature
nature: nature,
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

@ -104,6 +104,7 @@ declare module 'i18next' {
tutorial: SimpleTranslationEntries;
starterSelectUiHandler: SimpleTranslationEntries;
nature: 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);