Natures langs with new config (#611)

* Natures lang files

* Updated French nature.ts

* Nature german translation + chinese added

* Added nature to chinese config.ts

---------

Co-authored-by: rnicar <rj.nieto.car@gmail.com>
Co-authored-by: Lugiad <adrien.grivel@hotmail.fr>
Co-authored-by: rnicar245 <55734812+rnicar245@users.noreply.github.com>
pull/763/head
ArceUseless 2024-05-12 04:22:45 +02:00 committed by GitHub
parent e9ca17c519
commit fe6aefd910
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 194 additions and 1 deletions

View File

@ -2,6 +2,7 @@ import { Stat, getStatName } from "./pokemon-stat";
import * as Utils from "../utils";
import { TextStyle, getBBCodeFrag } from "../ui/text";
import { UiTheme } from "#app/enums/ui-theme";
import i18next from 'i18next';
export enum Nature {
HARDY,
@ -33,6 +34,10 @@ export enum Nature {
export function getNatureName(nature: Nature, includeStatEffects: boolean = false, forStarterSelect: boolean = false, ignoreBBCode: boolean = false, uiTheme: UiTheme = UiTheme.DEFAULT): string {
let ret = Utils.toReadableString(Nature[nature]);
//Translating nature
if(i18next.exists('nature:' + ret)){
ret = i18next.t('nature:' + ret as any)
}
if (includeStatEffects) {
const stats = Utils.getEnumValues(Stat).slice(1);
let increasedStat: Stat = null;

View File

@ -6,6 +6,7 @@ import { growth } from "./growth";
import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler";
import { move } from "./move";
import { nature } from "./nature";
import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon";
import { pokemonStat } from "./pokemon-stat";
@ -26,5 +27,6 @@ export const deConfig = {
pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial,
nature: nature,
growth: growth
}

29
src/locales/de/nature.ts Normal file
View File

@ -0,0 +1,29 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const nature: SimpleTranslationEntries = {
"Hardy": "Robust",
"Lonely": "Solo",
"Brave": "Mutig",
"Adamant": "Hart",
"Naughty": "Frech",
"Bold": "Kühn",
"Docile": "Sanft",
"Relaxed": "Locker",
"Impish": "Pfiffig",
"Lax": "Lasch",
"Timid": "Scheu",
"Hasty": "Hastig",
"Serious": "Ernst",
"Jolly": "Froh",
"Naive": "Naiv",
"Modest": "Mäßig",
"Mild": "Mild",
"Quiet": "Ruhig",
"Bashful": "Zaghaft",
"Rash": "Hitzig",
"Calm": "Still",
"Gentle": "Zart",
"Sassy": "Forsch",
"Careful": "Sacht",
"Quirky": "Kauzig"
} as const;

View File

@ -6,6 +6,7 @@ import { growth } from "./growth";
import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler";
import { move } from "./move";
import { nature } from "./nature";
import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon";
import { pokemonStat } from "./pokemon-stat";
@ -26,5 +27,6 @@ export const enConfig = {
pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial,
nature: nature,
growth: growth
}

29
src/locales/en/nature.ts Normal file
View File

@ -0,0 +1,29 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const nature: SimpleTranslationEntries = {
"Hardy": "Hardy",
"Lonely": "Lonely",
"Brave": "Brave",
"Adamant": "Adamant",
"Naughty": "Naughty",
"Bold": "Bold",
"Docile": "Docile",
"Relaxed": "Relaxed",
"Impish": "Impish",
"Lax": "Lax",
"Timid": "Timid",
"Hasty": "Hasty",
"Serious": "Serious",
"Jolly": "Jolly",
"Naive": "Naive",
"Modest": "Modest",
"Mild": "Mild",
"Quiet": "Quiet",
"Bashful": "Bashful",
"Rash": "Rash",
"Calm": "Calm",
"Gentle": "Gentle",
"Sassy": "Sassy",
"Careful": "Careful",
"Quirky": "Quirky"
} as const;

View File

@ -6,6 +6,7 @@ import { growth } from "./growth";
import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler";
import { move } from "./move";
import { nature } from "./nature";
import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon";
import { pokemonStat } from "./pokemon-stat";
@ -26,5 +27,6 @@ export const esConfig = {
pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial,
nature: nature,
growth: growth
}

29
src/locales/es/nature.ts Normal file
View File

@ -0,0 +1,29 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const nature: SimpleTranslationEntries = {
"Hardy": "Fuerte",
"Lonely": "Huraña",
"Brave": "Audaz",
"Adamant": "Firme",
"Naughty": "Pícara",
"Bold": "Osada",
"Docile": "Dócil",
"Relaxed": "Plácida",
"Impish": "Agitada",
"Lax": "Floja",
"Timid": "Miedosa",
"Hasty": "Activa",
"Serious": "Seria",
"Jolly": "Alegre",
"Naive": "Ingenua",
"Modest": "Modesta",
"Mild": "Afable",
"Quiet": "Mansa",
"Bashful": "Tímida",
"Rash": "Alocada",
"Calm": "Serena",
"Gentle": "Amable",
"Sassy": "Grosera",
"Careful": "Cauta",
"Quirky": "Rara"
} as const;

View File

@ -6,6 +6,7 @@ import { growth } from "./growth";
import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler";
import { move } from "./move";
import { nature } from "./nature";
import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon";
import { pokemonStat } from "./pokemon-stat";
@ -26,5 +27,6 @@ export const frConfig = {
pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial,
nature: nature,
growth: growth
}

29
src/locales/fr/nature.ts Normal file
View File

@ -0,0 +1,29 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const nature: SimpleTranslationEntries = {
"Hardy": "Hardi",
"Lonely": "Solo",
"Brave": "Brave",
"Adamant": "Rigide",
"Naughty": "Mauvais",
"Bold": "Assuré",
"Docile": "Docile",
"Relaxed": "Relax",
"Impish": "Malin",
"Lax": "Lâche",
"Timid": "Timide",
"Hasty": "Pressé",
"Serious": "Sérieux",
"Jolly": "Jovial",
"Naive": "Naïf",
"Modest": "Modeste",
"Mild": "Doux",
"Quiet": "Discret",
"Bashful": "Pudique",
"Rash": "Foufou",
"Calm": "Calme",
"Gentle": "Gentil",
"Sassy": "Malpoli",
"Careful": "Prudent",
"Quirky": "Bizarre"
} as const;

View File

@ -6,6 +6,7 @@ import { growth } from "./growth";
import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler";
import { move } from "./move";
import { nature } from "./nature";
import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon";
import { pokemonStat } from "./pokemon-stat";
@ -26,5 +27,6 @@ export const itConfig = {
pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial,
nature: nature,
growth: growth
}

29
src/locales/it/nature.ts Normal file
View File

@ -0,0 +1,29 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const nature: SimpleTranslationEntries = {
"Hardy": "Hardy",
"Lonely": "Lonely",
"Brave": "Brave",
"Adamant": "Adamant",
"Naughty": "Naughty",
"Bold": "Bold",
"Docile": "Docile",
"Relaxed": "Relaxed",
"Impish": "Impish",
"Lax": "Lax",
"Timid": "Timid",
"Hasty": "Hasty",
"Serious": "Serious",
"Jolly": "Jolly",
"Naive": "Naive",
"Modest": "Modest",
"Mild": "Mild",
"Quiet": "Quiet",
"Bashful": "Bashful",
"Rash": "Rash",
"Calm": "Calm",
"Gentle": "Gentle",
"Sassy": "Sassy",
"Careful": "Careful",
"Quirky": "Quirky"
} as const;

View File

@ -10,6 +10,7 @@ import { pokemon } from "./pokemon";
import { pokemonStat } from "./pokemon-stat";
import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { tutorial } from "./tutorial";
import { nature } from "./nature";
export const zhCnConfig = {
@ -24,5 +25,7 @@ export const zhCnConfig = {
pokemonStat: pokemonStat,
pokemon: pokemon,
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial
tutorial: tutorial,
nature: nature
}

View File

@ -0,0 +1,29 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const nature: SimpleTranslationEntries = {
"Hardy": "Hardy",
"Lonely": "Lonely",
"Brave": "Brave",
"Adamant": "Adamant",
"Naughty": "Naughty",
"Bold": "Bold",
"Docile": "Docile",
"Relaxed": "Relaxed",
"Impish": "Impish",
"Lax": "Lax",
"Timid": "Timid",
"Hasty": "Hasty",
"Serious": "Serious",
"Jolly": "Jolly",
"Naive": "Naive",
"Modest": "Modest",
"Mild": "Mild",
"Quiet": "Quiet",
"Bashful": "Bashful",
"Rash": "Rash",
"Calm": "Calm",
"Gentle": "Gentle",
"Sassy": "Sassy",
"Careful": "Careful",
"Quirky": "Quirky"
} as const;

View File

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