mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-29 12:17:13 +00:00
Localization: Localize luck indicator text and shiny labels (#2644)
* feat: localize luck indicator text * Localization: Localize luck indicator text and shiny labels * Update src/locales/zh_CN/common.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/ko/common.ts Co-authored-by: Enoch <enoch.jwsong@gmail.com> * Update src/locales/de/common.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/es/common.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/fr/common.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> --------- Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Enoch <enoch.jwsong@gmail.com> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
This commit is contained in:
parent
04d456a60e
commit
5ac5850082
@ -66,6 +66,7 @@ import { PlayerGender } from "#enums/player-gender";
|
||||
import { Species } from "#enums/species";
|
||||
import { UiTheme } from "#enums/ui-theme";
|
||||
import { TimedEventManager } from "#app/timed-event-manager.js";
|
||||
import i18next from "i18next";
|
||||
|
||||
export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";
|
||||
|
||||
@ -463,7 +464,7 @@ export default class BattleScene extends SceneBase {
|
||||
this.luckText.setVisible(false);
|
||||
this.fieldUI.add(this.luckText);
|
||||
|
||||
this.luckLabelText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, "Luck:", TextStyle.PARTY, { fontSize: "54px" });
|
||||
this.luckLabelText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, i18next.t("common:luckIndicator"), TextStyle.PARTY, { fontSize: "54px" });
|
||||
this.luckLabelText.setName("text-luck-label");
|
||||
this.luckLabelText.setOrigin(1, 0.5);
|
||||
this.luckLabelText.setVisible(false);
|
||||
|
@ -2,4 +2,9 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const common: SimpleTranslationEntries = {
|
||||
"start": "Start",
|
||||
"luckIndicator": "Glück:",
|
||||
"shinyOnHover": "Schillernd",
|
||||
"commonShiny": "Gewöhnlich",
|
||||
"rareShiny": "Selten",
|
||||
"epicShiny": "Episch",
|
||||
} as const;
|
||||
|
@ -5,7 +5,4 @@ export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||
"gender": "Geschlecht:",
|
||||
"ability": "Fähigkeit:",
|
||||
"nature": "Wesen:",
|
||||
"epic": "Episch",
|
||||
"rare": "Selten",
|
||||
"common": "Gewöhnlich"
|
||||
} as const;
|
||||
|
@ -2,4 +2,9 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const common: SimpleTranslationEntries = {
|
||||
"start": "Start",
|
||||
"luckIndicator": "Luck:",
|
||||
"shinyOnHover": "Shiny",
|
||||
"commonShiny": "Common",
|
||||
"rareShiny": "Rare",
|
||||
"epicShiny": "Epic",
|
||||
} as const;
|
||||
|
@ -5,8 +5,5 @@ export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||
"gender": "Gender:",
|
||||
"ability": "Ability:",
|
||||
"nature": "Nature:",
|
||||
"epic": "Epic",
|
||||
"rare": "Rare",
|
||||
"common": "Common",
|
||||
"form": "Form:"
|
||||
} as const;
|
||||
|
@ -2,4 +2,9 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const common: SimpleTranslationEntries = {
|
||||
"start": "Start",
|
||||
"luckIndicator": "Suerte:",
|
||||
"shinyOnHover": "Shiny",
|
||||
"commonShiny": "Común",
|
||||
"rareShiny": "Raro",
|
||||
"epicShiny": "Épico",
|
||||
} as const;
|
||||
|
@ -5,7 +5,4 @@ export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||
"gender": "Género:",
|
||||
"ability": "Habilid:",
|
||||
"nature": "Natur:",
|
||||
"epic": "Épico",
|
||||
"rare": "Raro",
|
||||
"common": "Común"
|
||||
} as const;
|
||||
|
@ -2,4 +2,9 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const common: SimpleTranslationEntries = {
|
||||
"start": "Lancer",
|
||||
"luckIndicator": "Chance :",
|
||||
"shinyOnHover": "Chromatique",
|
||||
"commonShiny": "Commun",
|
||||
"rareShiny": "Rare",
|
||||
"epicShiny": "Épique",
|
||||
} as const;
|
||||
|
@ -5,8 +5,5 @@ export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||
"gender": "Sexe :",
|
||||
"ability": "Talent :",
|
||||
"nature": "Nature :",
|
||||
"epic": "Épique",
|
||||
"rare": "Rare",
|
||||
"common": "Commun",
|
||||
"form": "Forme :"
|
||||
} as const;
|
||||
|
@ -2,4 +2,9 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const common: SimpleTranslationEntries = {
|
||||
"start": "Inizia",
|
||||
"luckIndicator": "Luck:",
|
||||
"shinyOnHover": "Shiny",
|
||||
"commonShiny": "Comune",
|
||||
"rareShiny": "Raro",
|
||||
"epicShiny": "Epico",
|
||||
} as const;
|
||||
|
@ -5,7 +5,4 @@ export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||
"gender": "Genere:",
|
||||
"ability": "Abilità:",
|
||||
"nature": "Natura:",
|
||||
"epic": "Epico",
|
||||
"rare": "Raro",
|
||||
"common": "Comune"
|
||||
} as const;
|
||||
|
@ -2,4 +2,9 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const common: SimpleTranslationEntries = {
|
||||
"start": "시작",
|
||||
"luckIndicator": "행운:",
|
||||
"shinyOnHover": "색이 다른",
|
||||
"commonShiny": "커먼",
|
||||
"rareShiny": "레어",
|
||||
"epicShiny": "에픽",
|
||||
} as const;
|
||||
|
@ -5,8 +5,5 @@ export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||
"gender": "성별:",
|
||||
"ability": "특성:",
|
||||
"nature": "성격:",
|
||||
"epic": "에픽",
|
||||
"rare": "레어",
|
||||
"common": "커먼",
|
||||
"form": "폼:"
|
||||
} as const;
|
||||
|
@ -2,4 +2,9 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const common: SimpleTranslationEntries = {
|
||||
"start": "Iniciar",
|
||||
"luckIndicator": "Sorte:",
|
||||
"shinyOnHover": "Shiny",
|
||||
"commonShiny": "Comum",
|
||||
"rareShiny": "Raro",
|
||||
"epicShiny": "Épico",
|
||||
} as const;
|
||||
|
@ -5,7 +5,5 @@ export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||
"gender": "Gênero:",
|
||||
"ability": "Habilidade:",
|
||||
"nature": "Natureza:",
|
||||
"epic": "Épico",
|
||||
"rare": "Raro",
|
||||
"common": "Comum",
|
||||
"form": "Forma:",
|
||||
} as const;
|
||||
|
@ -2,4 +2,9 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const common: SimpleTranslationEntries = {
|
||||
"start": "开始",
|
||||
"luckIndicator": "幸运:",
|
||||
"shinyOnHover": "闪光",
|
||||
"commonShiny": "常见",
|
||||
"rareShiny": "稀有",
|
||||
"epicShiny": "史诗",
|
||||
} as const;
|
||||
|
@ -5,7 +5,4 @@ export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||
"gender": "性别:",
|
||||
"ability": "特性:",
|
||||
"nature": "性格:",
|
||||
"epic": "史诗",
|
||||
"rare": "稀有",
|
||||
"common": "常见"
|
||||
} as const;
|
||||
|
@ -2,4 +2,9 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||
|
||||
export const common: SimpleTranslationEntries = {
|
||||
"start": "開始",
|
||||
"luckIndicator": "Luck:",
|
||||
"shinyOnHover": "Shiny",
|
||||
"commonShiny": "常見",
|
||||
"rareShiny": "稀有",
|
||||
"epicShiny": "史詩",
|
||||
} as const;
|
||||
|
@ -5,7 +5,4 @@ export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||
"gender": "性别:",
|
||||
"ability": "特性:",
|
||||
"nature": "性格:",
|
||||
"epic": "史詩",
|
||||
"rare": "稀有",
|
||||
"common": "常見"
|
||||
} as const;
|
||||
|
@ -10,6 +10,7 @@ import { getVariantTint } from "#app/data/variant";
|
||||
import { BattleStat } from "#app/data/battle-stat";
|
||||
import BattleFlyout from "./battle-flyout";
|
||||
import { WindowVariant, addWindow } from "./ui-theme";
|
||||
import i18next from "i18next";
|
||||
|
||||
const battleStatOrder = [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.ACC, BattleStat.EVA, BattleStat.SPD ];
|
||||
|
||||
@ -315,9 +316,9 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||
this.shinyIcon.setTint(getVariantTint(baseVariant));
|
||||
if (this.shinyIcon.visible) {
|
||||
const shinyDescriptor = doubleShiny || baseVariant ?
|
||||
`${baseVariant === 2 ? "Epic" : baseVariant === 1 ? "Rare" : "Common"}${doubleShiny ? `/${pokemon.fusionVariant === 2 ? "Epic" : pokemon.fusionVariant === 1 ? "Rare" : "Common"}` : ""}`
|
||||
`${baseVariant === 2 ? i18next.t("common:epicShiny") : baseVariant === 1 ? i18next.t("common:rareShiny") : i18next.t("common:commonShiny")}${doubleShiny ? `/${pokemon.fusionVariant === 2 ? i18next.t("common:epicShiny") : pokemon.fusionVariant === 1 ? i18next.t("common:rareShiny") : i18next.t("common:commonShiny")}` : ""}`
|
||||
: "";
|
||||
this.shinyIcon.on("pointerover", () => (this.scene as BattleScene).ui.showTooltip(null, `Shiny${shinyDescriptor ? ` (${shinyDescriptor})` : ""}`));
|
||||
this.shinyIcon.on("pointerover", () => (this.scene as BattleScene).ui.showTooltip(null, `${i18next.t("common:shinyOnHover")}${shinyDescriptor ? ` (${shinyDescriptor})` : ""}`));
|
||||
this.shinyIcon.on("pointerout", () => (this.scene as BattleScene).ui.hideTooltip());
|
||||
}
|
||||
|
||||
|
@ -300,9 +300,9 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||
this.pokemonShinyIcon.setTint(getVariantTint(baseVariant));
|
||||
if (this.pokemonShinyIcon.visible) {
|
||||
const shinyDescriptor = doubleShiny || baseVariant ?
|
||||
`${baseVariant === 2 ? i18next.t("pokemonInfoContainer:epic") : baseVariant === 1 ? i18next.t("pokemonInfoContainer:rare") : i18next.t("pokemonInfoContainer:common")}${doubleShiny ? `/${pokemon.fusionVariant === 2 ? i18next.t("pokemonInfoContainer:epic") : pokemon.fusionVariant === 1 ? i18next.t("pokemonInfoContainer:rare") : i18next.t("pokemonInfoContainer:common")}` : ""}`
|
||||
`${baseVariant === 2 ? i18next.t("common:epicShiny") : baseVariant === 1 ? i18next.t("common:rareShiny") : i18next.t("common:commonShiny")}${doubleShiny ? `/${pokemon.fusionVariant === 2 ? i18next.t("common:epicShiny") : pokemon.fusionVariant === 1 ? i18next.t("common:rareShiny") : i18next.t("common:commonShiny")}` : ""}`
|
||||
: "";
|
||||
this.pokemonShinyIcon.on("pointerover", () => (this.scene as BattleScene).ui.showTooltip(null, `Shiny${shinyDescriptor ? ` (${shinyDescriptor})` : ""}`, true));
|
||||
this.pokemonShinyIcon.on("pointerover", () => (this.scene as BattleScene).ui.showTooltip(null, `${i18next.t("common:shinyOnHover")}${shinyDescriptor ? ` (${shinyDescriptor})` : ""}`, true));
|
||||
this.pokemonShinyIcon.on("pointerout", () => (this.scene as BattleScene).ui.hideTooltip());
|
||||
|
||||
const newShiny = BigInt(Math.pow(2, (pokemon.shiny ? 1 : 0)));
|
||||
|
@ -565,7 +565,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.type2Icon.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.type2Icon);
|
||||
|
||||
this.pokemonLuckLabelText = addTextObject(this.scene, 8, 89, "Luck:", TextStyle.WINDOW_ALT, { fontSize: "56px" });
|
||||
this.pokemonLuckLabelText = addTextObject(this.scene, 8, 89, i18next.t("common:luckIndicator"), TextStyle.WINDOW_ALT, { fontSize: "56px" });
|
||||
this.pokemonLuckLabelText.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.pokemonLuckLabelText);
|
||||
|
||||
|
@ -345,9 +345,9 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
this.shinyIcon.setTint(getVariantTint(baseVariant));
|
||||
if (this.shinyIcon.visible) {
|
||||
const shinyDescriptor = doubleShiny || baseVariant ?
|
||||
`${baseVariant === 2 ? "Epic" : baseVariant === 1 ? "Rare" : "Common"}${doubleShiny ? `/${this.pokemon.fusionVariant === 2 ? "Epic" : this.pokemon.fusionVariant === 1 ? "Rare" : "Common"}` : ""}`
|
||||
`${baseVariant === 2 ? i18next.t("common:epicShiny") : baseVariant === 1 ? i18next.t("common:rareShiny") : i18next.t("common:commonShiny")}${doubleShiny ? `/${this.pokemon.fusionVariant === 2 ? i18next.t("common:epicShiny") : this.pokemon.fusionVariant === 1 ? i18next.t("common:rareShiny") : i18next.t("common:commonShiny")}` : ""}`
|
||||
: "";
|
||||
this.shinyIcon.on("pointerover", () => (this.scene as BattleScene).ui.showTooltip(null, `Shiny${shinyDescriptor ? ` (${shinyDescriptor})` : ""}`, true));
|
||||
this.shinyIcon.on("pointerover", () => (this.scene as BattleScene).ui.showTooltip(null, `${i18next.t("common:shinyOnHover")}${shinyDescriptor ? ` (${shinyDescriptor})` : ""}`, true));
|
||||
this.shinyIcon.on("pointerout", () => (this.scene as BattleScene).ui.hideTooltip());
|
||||
}
|
||||
|
||||
@ -717,7 +717,7 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
}
|
||||
|
||||
if (this.pokemon.getLuck()) {
|
||||
const luckLabelText = addTextObject(this.scene, 141, 28, "Luck:", TextStyle.SUMMARY_ALT);
|
||||
const luckLabelText = addTextObject(this.scene, 141, 28, i18next.t("common:luckIndicator"), TextStyle.SUMMARY_ALT);
|
||||
luckLabelText.setOrigin(0, 0);
|
||||
profileContainer.add(luckLabelText);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user