IV Scanner Results Translation (#990)

* Update battle-message-ui-handler.ts

* Update i18n.ts

* Update config.ts

* Update config.ts

* Update config.ts

* Update config.ts

* Update config.ts

* Update config.ts

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Update battle-message-ui-handler.ts

* German battle-message-ui-handler.ts

* Update config.ts

---------

Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
This commit is contained in:
Lugiad 2024-05-17 12:21:35 +02:00 committed by GitHub
parent a44c1587d4
commit 96af567cd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 103 additions and 26 deletions

View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const battleMessageUiHandler: SimpleTranslationEntries = {
"ivBest": "Sensationell",
"ivFantastic": "Fantastisch",
"ivVeryGood": "Sehr Gut",
"ivPrettyGood": "Gut",
"ivDecent": "Nicht Übel",
"ivNoGood": "Schlecht",
} as const;

View File

@ -18,9 +18,9 @@ import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { weather } from "./weather"; import { weather } from "./weather";
import { battleMessageUiHandler } from "./battle-message-ui-handler";
import { berry } from "./berry"; import { berry } from "./berry";
export const deConfig = { export const deConfig = {
ability: ability, ability: ability,
abilityTriggers: abilityTriggers, abilityTriggers: abilityTriggers,
@ -44,5 +44,6 @@ export const deConfig = {
trainerNames: trainerNames, trainerNames: trainerNames,
tutorial: tutorial, tutorial: tutorial,
weather: weather, weather: weather,
battleMessageUiHandler: battleMessageUiHandler,
berry: berry, berry: berry,
} }

View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const battleMessageUiHandler: SimpleTranslationEntries = {
"ivBest": "Best",
"ivFantastic": "Fantastic",
"ivVeryGood": "Very Good",
"ivPrettyGood": "Pretty Good",
"ivDecent": "Decent",
"ivNoGood": "No Good",
} as const;

View File

@ -18,9 +18,9 @@ import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { weather } from "./weather"; import { weather } from "./weather";
import { battleMessageUiHandler } from "./battle-message-ui-handler";
import { berry } from "./berry"; import { berry } from "./berry";
export const enConfig = { export const enConfig = {
ability: ability, ability: ability,
abilityTriggers: abilityTriggers, abilityTriggers: abilityTriggers,
@ -44,5 +44,6 @@ export const enConfig = {
trainerNames: trainerNames, trainerNames: trainerNames,
tutorial: tutorial, tutorial: tutorial,
weather: weather, weather: weather,
battleMessageUiHandler: battleMessageUiHandler,
berry: berry, berry: berry,
} }

View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const battleMessageUiHandler: SimpleTranslationEntries = {
"ivBest": "Best",
"ivFantastic": "Fantastic",
"ivVeryGood": "Very Good",
"ivPrettyGood": "Pretty Good",
"ivDecent": "Decent",
"ivNoGood": "No Good",
} as const;

View File

@ -18,9 +18,9 @@ import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { weather } from "./weather"; import { weather } from "./weather";
import { battleMessageUiHandler } from "./battle-message-ui-handler";
import { berry } from "./berry"; import { berry } from "./berry";
export const esConfig = { export const esConfig = {
ability: ability, ability: ability,
abilityTriggers: abilityTriggers, abilityTriggers: abilityTriggers,
@ -44,5 +44,6 @@ export const esConfig = {
trainerNames: trainerNames, trainerNames: trainerNames,
tutorial: tutorial, tutorial: tutorial,
weather: weather, weather: weather,
battleMessageUiHandler: battleMessageUiHandler,
berry: berry, berry: berry,
} }

View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const battleMessageUiHandler: SimpleTranslationEntries = {
"ivBest": "Exceptionnel",
"ivFantastic": "Fantastique",
"ivVeryGood": "Très bon",
"ivPrettyGood": "Bon",
"ivDecent": "Passable…",
"ivNoGood": "Pas top…",
} as const;

View File

@ -18,9 +18,9 @@ import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { weather } from "./weather"; import { weather } from "./weather";
import { battleMessageUiHandler } from "./battle-message-ui-handler";
import { berry } from "./berry"; import { berry } from "./berry";
export const frConfig = { export const frConfig = {
ability: ability, ability: ability,
abilityTriggers: abilityTriggers, abilityTriggers: abilityTriggers,
@ -44,6 +44,6 @@ export const frConfig = {
trainerNames: trainerNames, trainerNames: trainerNames,
tutorial: tutorial, tutorial: tutorial,
weather: weather, weather: weather,
battleMessageUiHandler: battleMessageUiHandler,
berry: berry, berry: berry,
} }

View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const battleMessageUiHandler: SimpleTranslationEntries = {
"ivBest": "Best",
"ivFantastic": "Fantastic",
"ivVeryGood": "Very Good",
"ivPrettyGood": "Pretty Good",
"ivDecent": "Decent",
"ivNoGood": "No Good",
} as const;

View File

@ -18,9 +18,9 @@ import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { weather } from "./weather"; import { weather } from "./weather";
import { battleMessageUiHandler } from "./battle-message-ui-handler";
import { berry } from "./berry"; import { berry } from "./berry";
export const itConfig = { export const itConfig = {
ability: ability, ability: ability,
abilityTriggers: abilityTriggers, abilityTriggers: abilityTriggers,
@ -44,5 +44,6 @@ export const itConfig = {
trainerNames: trainerNames, trainerNames: trainerNames,
tutorial: tutorial, tutorial: tutorial,
weather: weather, weather: weather,
battleMessageUiHandler: battleMessageUiHandler,
berry: berry, berry: berry,
} }

View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const battleMessageUiHandler: SimpleTranslationEntries = {
"ivBest": "Best",
"ivFantastic": "Fantastic",
"ivVeryGood": "Very Good",
"ivPrettyGood": "Pretty Good",
"ivDecent": "Decent",
"ivNoGood": "No Good",
} as const;

View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const battleMessageUiHandler: SimpleTranslationEntries = {
"ivBest": "Best",
"ivFantastic": "Fantastic",
"ivVeryGood": "Very Good",
"ivPrettyGood": "Pretty Good",
"ivDecent": "Decent",
"ivNoGood": "No Good",
} as const;

View File

@ -18,9 +18,9 @@ import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { weather } from "./weather"; import { weather } from "./weather";
import { battleMessageUiHandler } from "./battle-message-ui-handler";
import { berry } from "./berry"; import { berry } from "./berry";
export const zhCnConfig = { export const zhCnConfig = {
ability: ability, ability: ability,
abilityTriggers: abilityTriggers, abilityTriggers: abilityTriggers,
@ -44,5 +44,6 @@ export const zhCnConfig = {
trainerNames: trainerNames, trainerNames: trainerNames,
tutorial: tutorial, tutorial: tutorial,
weather: weather, weather: weather,
battleMessageUiHandler: battleMessageUiHandler,
berry: berry, berry: berry,
} }

View File

@ -148,6 +148,7 @@ declare module 'i18next' {
egg: SimpleTranslationEntries; egg: SimpleTranslationEntries;
weather: SimpleTranslationEntries; weather: SimpleTranslationEntries;
modifierType: ModifierTypeTranslationEntries; modifierType: ModifierTypeTranslationEntries;
battleMessageUiHandler: SimpleTranslationEntries;
berry: BerryTranslationEntries; berry: BerryTranslationEntries;
}; };
} }

View File

@ -7,6 +7,7 @@ import { getStatName, Stat } from "../data/pokemon-stat";
import { addWindow } from "./ui-theme"; import { addWindow } from "./ui-theme";
import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
import {Button} from "../enums/buttons"; import {Button} from "../enums/buttons";
import i18next from '../plugins/i18n';
export default class BattleMessageUiHandler extends MessageUiHandler { export default class BattleMessageUiHandler extends MessageUiHandler {
private levelUpStatsContainer: Phaser.GameObjects.Container; private levelUpStatsContainer: Phaser.GameObjects.Container;
@ -237,17 +238,17 @@ export default class BattleMessageUiHandler extends MessageUiHandler {
}; };
if (value > 30) if (value > 30)
return coloredText('Best', value > starterIvs[typeIv]); return coloredText(i18next.t('battleMessageUiHandler:ivBest'), value > starterIvs[typeIv]);
if (value === 30) if (value === 30)
return coloredText('Fantastic', value > starterIvs[typeIv]); return coloredText(i18next.t('battleMessageUiHandler:ivFantastic'), value > starterIvs[typeIv]);
if (value > 20) if (value > 20)
return coloredText('Very Good', value > starterIvs[typeIv]); return coloredText(i18next.t('battleMessageUiHandler:ivVeryGood'), value > starterIvs[typeIv]);
if (value > 10) if (value > 10)
return coloredText('Pretty Good', value > starterIvs[typeIv]); return coloredText(i18next.t('battleMessageUiHandler:ivPrettyGood'), value > starterIvs[typeIv]);
if (value > 0) if (value > 0)
return coloredText('Decent', value > starterIvs[typeIv]); return coloredText(i18next.t('battleMessageUiHandler:ivDecent'), value > starterIvs[typeIv]);
return coloredText('No Good', value > starterIvs[typeIv]); return coloredText(i18next.t('battleMessageUiHandler:ivNoGood'), value > starterIvs[typeIv]);
} }
showNameText(name: string): void { showNameText(name: string): void {