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 { tutorial } from "./tutorial";
import { weather } from "./weather";
import { battleMessageUiHandler } from "./battle-message-ui-handler";
import { berry } from "./berry";
export const deConfig = {
ability: ability,
abilityTriggers: abilityTriggers,
@ -44,5 +44,6 @@ export const deConfig = {
trainerNames: trainerNames,
tutorial: tutorial,
weather: weather,
battleMessageUiHandler: battleMessageUiHandler,
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 { tutorial } from "./tutorial";
import { weather } from "./weather";
import { battleMessageUiHandler } from "./battle-message-ui-handler";
import { berry } from "./berry";
export const enConfig = {
ability: ability,
abilityTriggers: abilityTriggers,
@ -44,5 +44,6 @@ export const enConfig = {
trainerNames: trainerNames,
tutorial: tutorial,
weather: weather,
battleMessageUiHandler: battleMessageUiHandler,
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 { tutorial } from "./tutorial";
import { weather } from "./weather";
import { battleMessageUiHandler } from "./battle-message-ui-handler";
import { berry } from "./berry";
export const esConfig = {
ability: ability,
abilityTriggers: abilityTriggers,
@ -44,5 +44,6 @@ export const esConfig = {
trainerNames: trainerNames,
tutorial: tutorial,
weather: weather,
battleMessageUiHandler: battleMessageUiHandler,
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 { tutorial } from "./tutorial";
import { weather } from "./weather";
import { battleMessageUiHandler } from "./battle-message-ui-handler";
import { berry } from "./berry";
export const frConfig = {
ability: ability,
abilityTriggers: abilityTriggers,
@ -44,6 +44,6 @@ export const frConfig = {
trainerNames: trainerNames,
tutorial: tutorial,
weather: weather,
battleMessageUiHandler: battleMessageUiHandler,
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 { tutorial } from "./tutorial";
import { weather } from "./weather";
import { battleMessageUiHandler } from "./battle-message-ui-handler";
import { berry } from "./berry";
export const itConfig = {
ability: ability,
abilityTriggers: abilityTriggers,
@ -44,5 +44,6 @@ export const itConfig = {
trainerNames: trainerNames,
tutorial: tutorial,
weather: weather,
battleMessageUiHandler: battleMessageUiHandler,
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 { tutorial } from "./tutorial";
import { weather } from "./weather";
import { battleMessageUiHandler } from "./battle-message-ui-handler";
import { berry } from "./berry";
export const zhCnConfig = {
ability: ability,
abilityTriggers: abilityTriggers,
@ -44,5 +44,6 @@ export const zhCnConfig = {
trainerNames: trainerNames,
tutorial: tutorial,
weather: weather,
battleMessageUiHandler: battleMessageUiHandler,
berry: berry,
}

View File

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

View File

@ -7,6 +7,7 @@ import { getStatName, Stat } from "../data/pokemon-stat";
import { addWindow } from "./ui-theme";
import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
import {Button} from "../enums/buttons";
import i18next from '../plugins/i18n';
export default class BattleMessageUiHandler extends MessageUiHandler {
private levelUpStatsContainer: Phaser.GameObjects.Container;
@ -234,20 +235,20 @@ export default class BattleMessageUiHandler extends MessageUiHandler {
const textStyle: TextStyle = isBetter ? TextStyle.SUMMARY_GREEN : TextStyle.SUMMARY;
const color = getTextColor(textStyle, false, uiTheme);
return `[color=${color}][shadow=${getTextColor(textStyle, true, uiTheme)}]${text}[/shadow][/color]`;
};
};
if (value > 30)
return coloredText('Best', value > starterIvs[typeIv]);
if (value === 30)
return coloredText('Fantastic', value > starterIvs[typeIv]);
if (value > 20)
return coloredText('Very Good', value > starterIvs[typeIv]);
if (value > 10)
return coloredText('Pretty Good', value > starterIvs[typeIv]);
if (value > 0)
return coloredText('Decent', value > starterIvs[typeIv]);
if (value > 30)
return coloredText(i18next.t('battleMessageUiHandler:ivBest'), value > starterIvs[typeIv]);
if (value === 30)
return coloredText(i18next.t('battleMessageUiHandler:ivFantastic'), value > starterIvs[typeIv]);
if (value > 20)
return coloredText(i18next.t('battleMessageUiHandler:ivVeryGood'), value > starterIvs[typeIv]);
if (value > 10)
return coloredText(i18next.t('battleMessageUiHandler:ivPrettyGood'), value > starterIvs[typeIv]);
if (value > 0)
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 {