mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-01 05:52:17 +02:00
[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:
parent
a224f5e822
commit
d592187f2c
@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
|
|||||||
import { tutorial } from "./tutorial";
|
import { tutorial } from "./tutorial";
|
||||||
import { voucher } from "./voucher";
|
import { voucher } from "./voucher";
|
||||||
import { weather } from "./weather";
|
import { weather } from "./weather";
|
||||||
|
import { partyUiHandler } from "./party-ui-handler";
|
||||||
|
|
||||||
export const deConfig = {
|
export const deConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
@ -73,5 +74,6 @@ export const deConfig = {
|
|||||||
trainerNames: trainerNames,
|
trainerNames: trainerNames,
|
||||||
tutorial: tutorial,
|
tutorial: tutorial,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
weather: weather
|
weather: weather,
|
||||||
|
partyUiHandler: partyUiHandler
|
||||||
};
|
};
|
||||||
|
10
src/locales/de/party-ui-handler.ts
Normal file
10
src/locales/de/party-ui-handler.ts
Normal 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;
|
@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
|
|||||||
import { tutorial } from "./tutorial";
|
import { tutorial } from "./tutorial";
|
||||||
import { voucher } from "./voucher";
|
import { voucher } from "./voucher";
|
||||||
import { weather } from "./weather";
|
import { weather } from "./weather";
|
||||||
|
import { partyUiHandler } from "./party-ui-handler";
|
||||||
|
|
||||||
export const enConfig = {
|
export const enConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
@ -73,5 +74,6 @@ export const enConfig = {
|
|||||||
trainerNames: trainerNames,
|
trainerNames: trainerNames,
|
||||||
tutorial: tutorial,
|
tutorial: tutorial,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
weather: weather
|
weather: weather,
|
||||||
|
partyUiHandler: partyUiHandler
|
||||||
};
|
};
|
||||||
|
10
src/locales/en/party-ui-handler.ts
Normal file
10
src/locales/en/party-ui-handler.ts
Normal 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;
|
@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
|
|||||||
import { tutorial } from "./tutorial";
|
import { tutorial } from "./tutorial";
|
||||||
import { voucher } from "./voucher";
|
import { voucher } from "./voucher";
|
||||||
import { weather } from "./weather";
|
import { weather } from "./weather";
|
||||||
|
import { partyUiHandler } from "./party-ui-handler";
|
||||||
|
|
||||||
export const esConfig = {
|
export const esConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
@ -73,5 +74,6 @@ export const esConfig = {
|
|||||||
trainerNames: trainerNames,
|
trainerNames: trainerNames,
|
||||||
tutorial: tutorial,
|
tutorial: tutorial,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
weather: weather
|
weather: weather,
|
||||||
|
partyUiHandler: partyUiHandler
|
||||||
};
|
};
|
||||||
|
10
src/locales/es/party-ui-handler.ts
Normal file
10
src/locales/es/party-ui-handler.ts
Normal 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;
|
@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
|
|||||||
import { tutorial } from "./tutorial";
|
import { tutorial } from "./tutorial";
|
||||||
import { voucher } from "./voucher";
|
import { voucher } from "./voucher";
|
||||||
import { weather } from "./weather";
|
import { weather } from "./weather";
|
||||||
|
import { partyUiHandler } from "./party-ui-handler";
|
||||||
|
|
||||||
export const frConfig = {
|
export const frConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
@ -73,5 +74,6 @@ export const frConfig = {
|
|||||||
trainerNames: trainerNames,
|
trainerNames: trainerNames,
|
||||||
tutorial: tutorial,
|
tutorial: tutorial,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
weather: weather
|
weather: weather,
|
||||||
|
partyUiHandler: partyUiHandler
|
||||||
};
|
};
|
||||||
|
10
src/locales/fr/party-ui-handler.ts
Normal file
10
src/locales/fr/party-ui-handler.ts
Normal 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;
|
@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
|
|||||||
import { tutorial } from "./tutorial";
|
import { tutorial } from "./tutorial";
|
||||||
import { voucher } from "./voucher";
|
import { voucher } from "./voucher";
|
||||||
import { weather } from "./weather";
|
import { weather } from "./weather";
|
||||||
|
import { partyUiHandler } from "./party-ui-handler";
|
||||||
|
|
||||||
export const itConfig = {
|
export const itConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
@ -73,5 +74,6 @@ export const itConfig = {
|
|||||||
trainerNames: trainerNames,
|
trainerNames: trainerNames,
|
||||||
tutorial: tutorial,
|
tutorial: tutorial,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
weather: weather
|
weather: weather,
|
||||||
|
partyUiHandler: partyUiHandler
|
||||||
};
|
};
|
||||||
|
10
src/locales/it/party-ui-handler.ts
Normal file
10
src/locales/it/party-ui-handler.ts
Normal 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;
|
@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
|
|||||||
import { tutorial } from "./tutorial";
|
import { tutorial } from "./tutorial";
|
||||||
import { voucher } from "./voucher";
|
import { voucher } from "./voucher";
|
||||||
import { weather } from "./weather";
|
import { weather } from "./weather";
|
||||||
|
import { partyUiHandler } from "./party-ui-handler";
|
||||||
|
|
||||||
export const koConfig = {
|
export const koConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
@ -73,5 +74,6 @@ export const koConfig = {
|
|||||||
trainerNames: trainerNames,
|
trainerNames: trainerNames,
|
||||||
tutorial: tutorial,
|
tutorial: tutorial,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
weather: weather
|
weather: weather,
|
||||||
|
partyUiHandler: partyUiHandler
|
||||||
};
|
};
|
||||||
|
10
src/locales/ko/party-ui-handler.ts
Normal file
10
src/locales/ko/party-ui-handler.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const partyUiHandler: SimpleTranslationEntries = {
|
||||||
|
"SEND_OUT": "교체한다",
|
||||||
|
"SUMMARY": "능력치를 본다",
|
||||||
|
"CANCEL": "그만둔다",
|
||||||
|
"RELEASE": "놓아준다",
|
||||||
|
"APPLY": "사용한다",
|
||||||
|
"TEACH": "가르친다"
|
||||||
|
} as const;
|
@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
|
|||||||
import { tutorial } from "./tutorial";
|
import { tutorial } from "./tutorial";
|
||||||
import { voucher } from "./voucher";
|
import { voucher } from "./voucher";
|
||||||
import { weather } from "./weather";
|
import { weather } from "./weather";
|
||||||
|
import { partyUiHandler } from "./party-ui-handler";
|
||||||
|
|
||||||
export const ptBrConfig = {
|
export const ptBrConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
@ -73,5 +74,6 @@ export const ptBrConfig = {
|
|||||||
trainerNames: trainerNames,
|
trainerNames: trainerNames,
|
||||||
tutorial: tutorial,
|
tutorial: tutorial,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
weather: weather
|
weather: weather,
|
||||||
|
partyUiHandler: partyUiHandler
|
||||||
};
|
};
|
||||||
|
10
src/locales/pt_BR/party-ui-handler.ts
Normal file
10
src/locales/pt_BR/party-ui-handler.ts
Normal 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;
|
@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
|
|||||||
import { tutorial } from "./tutorial";
|
import { tutorial } from "./tutorial";
|
||||||
import { voucher } from "./voucher";
|
import { voucher } from "./voucher";
|
||||||
import { weather } from "./weather";
|
import { weather } from "./weather";
|
||||||
|
import { partyUiHandler } from "./party-ui-handler";
|
||||||
|
|
||||||
export const zhCnConfig = {
|
export const zhCnConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
@ -73,5 +74,6 @@ export const zhCnConfig = {
|
|||||||
trainerNames: trainerNames,
|
trainerNames: trainerNames,
|
||||||
tutorial: tutorial,
|
tutorial: tutorial,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
weather: weather
|
weather: weather,
|
||||||
|
partyUiHandler: partyUiHandler
|
||||||
};
|
};
|
||||||
|
10
src/locales/zh_CN/party-ui-handler.ts
Normal file
10
src/locales/zh_CN/party-ui-handler.ts
Normal 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;
|
@ -35,6 +35,7 @@ import { titles, trainerClasses, trainerNames } from "./trainers";
|
|||||||
import { tutorial } from "./tutorial";
|
import { tutorial } from "./tutorial";
|
||||||
import { voucher } from "./voucher";
|
import { voucher } from "./voucher";
|
||||||
import { weather } from "./weather";
|
import { weather } from "./weather";
|
||||||
|
import { partyUiHandler } from "./party-ui-handler";
|
||||||
|
|
||||||
export const zhTwConfig = {
|
export const zhTwConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
@ -73,5 +74,6 @@ export const zhTwConfig = {
|
|||||||
trainerNames: trainerNames,
|
trainerNames: trainerNames,
|
||||||
tutorial: tutorial,
|
tutorial: tutorial,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
weather: weather
|
weather: weather,
|
||||||
|
partyUiHandler: partyUiHandler
|
||||||
};
|
};
|
||||||
|
10
src/locales/zh_TW/party-ui-handler.ts
Normal file
10
src/locales/zh_TW/party-ui-handler.ts
Normal 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;
|
@ -233,6 +233,7 @@ declare module "i18next" {
|
|||||||
PGFbattleSpecDialogue: SimpleTranslationEntries;
|
PGFbattleSpecDialogue: SimpleTranslationEntries;
|
||||||
PGFmiscDialogue: SimpleTranslationEntries;
|
PGFmiscDialogue: SimpleTranslationEntries;
|
||||||
PGFdoubleBattleDialogue: DialogueTranslationEntries;
|
PGFdoubleBattleDialogue: DialogueTranslationEntries;
|
||||||
|
partyUiHandler: SimpleTranslationEntries;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ import { SpeciesFormChangeItemTrigger } from "../data/pokemon-forms";
|
|||||||
import { getVariantTint } from "#app/data/variant";
|
import { getVariantTint } from "#app/data/variant";
|
||||||
import {Button} from "../enums/buttons";
|
import {Button} from "../enums/buttons";
|
||||||
import MoveInfoOverlay from "./move-info-overlay";
|
import MoveInfoOverlay from "./move-info-overlay";
|
||||||
|
import i18next from "i18next";
|
||||||
|
|
||||||
const defaultMessage = "Choose a Pokémon.";
|
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.";
|
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) {
|
constructor(scene: BattleScene) {
|
||||||
super(scene, Mode.PARTY);
|
super(scene, Mode.PARTY);
|
||||||
}
|
}
|
||||||
@ -809,9 +812,13 @@ export default class PartyUiHandler extends MessageUiHandler {
|
|||||||
if (formChangeItemModifiers && option >= PartyOption.FORM_CHANGE_ITEM) {
|
if (formChangeItemModifiers && option >= PartyOption.FORM_CHANGE_ITEM) {
|
||||||
const modifier = formChangeItemModifiers[option - PartyOption.FORM_CHANGE_ITEM];
|
const modifier = formChangeItemModifiers[option - PartyOption.FORM_CHANGE_ITEM];
|
||||||
optionName = `${modifier.active ? "Deactivate" : "Activate"} ${modifier.type.name}`;
|
optionName = `${modifier.active ? "Deactivate" : "Activate"} ${modifier.type.name}`;
|
||||||
|
} else {
|
||||||
|
if (this.localizedOptions.includes(option)) {
|
||||||
|
optionName = i18next.t(`partyUiHandler:${PartyOption[option]}`);
|
||||||
} else {
|
} else {
|
||||||
optionName = Utils.toReadableString(PartyOption[option]);
|
optionName = Utils.toReadableString(PartyOption[option]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (this.partyUiMode === PartyUiMode.REMEMBER_MOVE_MODIFIER) {
|
} else if (this.partyUiMode === PartyUiMode.REMEMBER_MOVE_MODIFIER) {
|
||||||
|
Loading…
Reference in New Issue
Block a user