[Localization] Add localization in party-ui-handler (#1712)

* [Localization] Add localization in party-ui-handler

* [Localization] Add "Release", "Apply", "Teach" localization, changed translation of Korean

* [Localization] Translated party-ui-handler's localization to Deutsch
This commit is contained in:
Lee ByungHoon 2024-06-08 04:08:34 +09:00 committed by GitHub
parent a224f5e822
commit d592187f2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 126 additions and 10 deletions

View File

@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial";
import { voucher } from "./voucher";
import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler";
export const deConfig = {
ability: ability,
@ -73,5 +74,6 @@ export const deConfig = {
trainerNames: trainerNames,
tutorial: tutorial,
voucher: voucher,
weather: weather
weather: weather,
partyUiHandler: partyUiHandler
};

View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const partyUiHandler: SimpleTranslationEntries = {
"SEND_OUT": "Einwechseln",
"SUMMARY": "Bericht",
"CANCEL": "Abbrechen",
"RELEASE": "Freilassen",
"APPLY": "Anwenden",
"TEACH": "Erlernen"
} as const;

View File

@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial";
import { voucher } from "./voucher";
import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler";
export const enConfig = {
ability: ability,
@ -73,5 +74,6 @@ export const enConfig = {
trainerNames: trainerNames,
tutorial: tutorial,
voucher: voucher,
weather: weather
weather: weather,
partyUiHandler: partyUiHandler
};

View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const partyUiHandler: SimpleTranslationEntries = {
"SEND_OUT": "Send Out",
"SUMMARY": "Summary",
"CANCEL": "Cancel",
"RELEASE": "Release",
"APPLY": "Apply",
"TEACH": "Teach"
} as const;

View File

@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial";
import { voucher } from "./voucher";
import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler";
export const esConfig = {
ability: ability,
@ -73,5 +74,6 @@ export const esConfig = {
trainerNames: trainerNames,
tutorial: tutorial,
voucher: voucher,
weather: weather
weather: weather,
partyUiHandler: partyUiHandler
};

View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const partyUiHandler: SimpleTranslationEntries = {
"SEND_OUT": "Send Out",
"SUMMARY": "Summary",
"CANCEL": "Cancel",
"RELEASE": "Release",
"APPLY": "Apply",
"TEACH": "Teach"
} as const;

View File

@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial";
import { voucher } from "./voucher";
import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler";
export const frConfig = {
ability: ability,
@ -73,5 +74,6 @@ export const frConfig = {
trainerNames: trainerNames,
tutorial: tutorial,
voucher: voucher,
weather: weather
weather: weather,
partyUiHandler: partyUiHandler
};

View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const partyUiHandler: SimpleTranslationEntries = {
"SEND_OUT": "Send Out",
"SUMMARY": "Summary",
"CANCEL": "Cancel",
"RELEASE": "Release",
"APPLY": "Apply",
"TEACH": "Teach"
} as const;

View File

@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial";
import { voucher } from "./voucher";
import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler";
export const itConfig = {
ability: ability,
@ -73,5 +74,6 @@ export const itConfig = {
trainerNames: trainerNames,
tutorial: tutorial,
voucher: voucher,
weather: weather
weather: weather,
partyUiHandler: partyUiHandler
};

View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const partyUiHandler: SimpleTranslationEntries = {
"SEND_OUT": "Send Out",
"SUMMARY": "Summary",
"CANCEL": "Cancel",
"RELEASE": "Release",
"APPLY": "Apply",
"TEACH": "Teach"
} as const;

View File

@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial";
import { voucher } from "./voucher";
import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler";
export const koConfig = {
ability: ability,
@ -73,5 +74,6 @@ export const koConfig = {
trainerNames: trainerNames,
tutorial: tutorial,
voucher: voucher,
weather: weather
weather: weather,
partyUiHandler: partyUiHandler
};

View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const partyUiHandler: SimpleTranslationEntries = {
"SEND_OUT": "교체한다",
"SUMMARY": "능력치를 본다",
"CANCEL": "그만둔다",
"RELEASE": "놓아준다",
"APPLY": "사용한다",
"TEACH": "가르친다"
} as const;

View File

@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial";
import { voucher } from "./voucher";
import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler";
export const ptBrConfig = {
ability: ability,
@ -73,5 +74,6 @@ export const ptBrConfig = {
trainerNames: trainerNames,
tutorial: tutorial,
voucher: voucher,
weather: weather
weather: weather,
partyUiHandler: partyUiHandler
};

View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const partyUiHandler: SimpleTranslationEntries = {
"SEND_OUT": "Send Out",
"SUMMARY": "Summary",
"CANCEL": "Cancel",
"RELEASE": "Release",
"APPLY": "Apply",
"TEACH": "Teach"
} as const;

View File

@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial";
import { voucher } from "./voucher";
import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler";
export const zhCnConfig = {
ability: ability,
@ -73,5 +74,6 @@ export const zhCnConfig = {
trainerNames: trainerNames,
tutorial: tutorial,
voucher: voucher,
weather: weather
weather: weather,
partyUiHandler: partyUiHandler
};

View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const partyUiHandler: SimpleTranslationEntries = {
"SEND_OUT": "Send Out",
"SUMMARY": "Summary",
"CANCEL": "Cancel",
"RELEASE": "Release",
"APPLY": "Apply",
"TEACH": "Teach"
} as const;

View File

@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial";
import { voucher } from "./voucher";
import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler";
export const zhTwConfig = {
ability: ability,
@ -73,5 +74,6 @@ export const zhTwConfig = {
trainerNames: trainerNames,
tutorial: tutorial,
voucher: voucher,
weather: weather
weather: weather,
partyUiHandler: partyUiHandler
};

View File

@ -0,0 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const partyUiHandler: SimpleTranslationEntries = {
"SEND_OUT": "Send Out",
"SUMMARY": "Summary",
"CANCEL": "Cancel",
"RELEASE": "Release",
"APPLY": "Apply",
"TEACH": "Teach"
} as const;

View File

@ -233,6 +233,7 @@ declare module "i18next" {
PGFbattleSpecDialogue: SimpleTranslationEntries;
PGFmiscDialogue: SimpleTranslationEntries;
PGFdoubleBattleDialogue: DialogueTranslationEntries;
partyUiHandler: SimpleTranslationEntries;
};
}
}

View File

@ -18,6 +18,7 @@ import { SpeciesFormChangeItemTrigger } from "../data/pokemon-forms";
import { getVariantTint } from "#app/data/variant";
import {Button} from "../enums/buttons";
import MoveInfoOverlay from "./move-info-overlay";
import i18next from "i18next";
const defaultMessage = "Choose a Pokémon.";
@ -131,6 +132,8 @@ export default class PartyUiHandler extends MessageUiHandler {
public static NoEffectMessage = "It won't have any effect.";
private localizedOptions = [PartyOption.SEND_OUT, PartyOption.SUMMARY, PartyOption.CANCEL, PartyOption.APPLY, PartyOption.RELEASE, PartyOption.TEACH];
constructor(scene: BattleScene) {
super(scene, Mode.PARTY);
}
@ -810,7 +813,11 @@ export default class PartyUiHandler extends MessageUiHandler {
const modifier = formChangeItemModifiers[option - PartyOption.FORM_CHANGE_ITEM];
optionName = `${modifier.active ? "Deactivate" : "Activate"} ${modifier.type.name}`;
} else {
optionName = Utils.toReadableString(PartyOption[option]);
if (this.localizedOptions.includes(option)) {
optionName = i18next.t(`partyUiHandler:${PartyOption[option]}`);
} else {
optionName = Utils.toReadableString(PartyOption[option]);
}
}
break;
}