pokemon-info-container Locales (#1413)
* Update i18n.ts * Update pokemon-info-container.ts * Update config.ts * Update config.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 * Add files via upload * Update pokemon-info-container.ts
This commit is contained in:
parent
ec82ecd46d
commit
fb26b6d501
|
@ -31,6 +31,7 @@ import {
|
||||||
PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue
|
PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue
|
||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { biome } from "./biome";
|
import { biome } from "./biome";
|
||||||
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
|
||||||
export const deConfig = {
|
export const deConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
|
@ -60,6 +61,7 @@ export const deConfig = {
|
||||||
gameStatsUiHandler: gameStatsUiHandler,
|
gameStatsUiHandler: gameStatsUiHandler,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
biome: biome,
|
biome: biome,
|
||||||
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
PGMdialogue: PGMdialogue,
|
PGMdialogue: PGMdialogue,
|
||||||
PGFdialogue: PGFdialogue,
|
PGFdialogue: PGFdialogue,
|
||||||
PGMbattleSpecDialogue: PGMbattleSpecDialogue,
|
PGMbattleSpecDialogue: PGMbattleSpecDialogue,
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||||
|
"moveset": "Attacken",
|
||||||
|
"gender": "Geschlecht:",
|
||||||
|
"ability": "Fähigkeit:",
|
||||||
|
"nature": "Wesen:",
|
||||||
|
"epic": "Episch",
|
||||||
|
"rare": "Selten",
|
||||||
|
"common": "Gewöhnlich"
|
||||||
|
} as const;
|
|
@ -31,6 +31,7 @@ import {
|
||||||
PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue
|
PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue
|
||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { biome } from "./biome";
|
import { biome } from "./biome";
|
||||||
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
|
||||||
export const enConfig = {
|
export const enConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
|
@ -60,6 +61,7 @@ export const enConfig = {
|
||||||
gameStatsUiHandler: gameStatsUiHandler,
|
gameStatsUiHandler: gameStatsUiHandler,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
biome: biome,
|
biome: biome,
|
||||||
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
PGMdialogue: PGMdialogue,
|
PGMdialogue: PGMdialogue,
|
||||||
PGFdialogue: PGFdialogue,
|
PGFdialogue: PGFdialogue,
|
||||||
PGMbattleSpecDialogue: PGMbattleSpecDialogue,
|
PGMbattleSpecDialogue: PGMbattleSpecDialogue,
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||||
|
"moveset": "Moveset",
|
||||||
|
"gender": "Gender:",
|
||||||
|
"ability": "Ability:",
|
||||||
|
"nature": "Nature:",
|
||||||
|
"epic": "Epic",
|
||||||
|
"rare": "Rare",
|
||||||
|
"common": "Common"
|
||||||
|
} as const;
|
|
@ -31,6 +31,7 @@ import {
|
||||||
PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue
|
PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue
|
||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { biome } from "./biome";
|
import { biome } from "./biome";
|
||||||
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
|
||||||
export const esConfig = {
|
export const esConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
|
@ -60,6 +61,7 @@ export const esConfig = {
|
||||||
gameStatsUiHandler: gameStatsUiHandler,
|
gameStatsUiHandler: gameStatsUiHandler,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
biome: biome,
|
biome: biome,
|
||||||
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
PGMdialogue: PGMdialogue,
|
PGMdialogue: PGMdialogue,
|
||||||
PGFdialogue: PGFdialogue,
|
PGFdialogue: PGFdialogue,
|
||||||
PGMbattleSpecDialogue: PGMbattleSpecDialogue,
|
PGMbattleSpecDialogue: PGMbattleSpecDialogue,
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||||
|
"moveset": "Moveset",
|
||||||
|
"gender": "Gender:",
|
||||||
|
"ability": "Ability:",
|
||||||
|
"nature": "Nature:",
|
||||||
|
"epic": "Epic",
|
||||||
|
"rare": "Rare",
|
||||||
|
"common": "Common"
|
||||||
|
} as const;
|
|
@ -31,6 +31,7 @@ import {
|
||||||
PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue
|
PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue
|
||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { biome } from "./biome";
|
import { biome } from "./biome";
|
||||||
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
|
||||||
export const frConfig = {
|
export const frConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
|
@ -60,6 +61,7 @@ export const frConfig = {
|
||||||
gameStatsUiHandler: gameStatsUiHandler,
|
gameStatsUiHandler: gameStatsUiHandler,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
biome: biome,
|
biome: biome,
|
||||||
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
PGMdialogue: PGMdialogue,
|
PGMdialogue: PGMdialogue,
|
||||||
PGFdialogue: PGFdialogue,
|
PGFdialogue: PGFdialogue,
|
||||||
PGMbattleSpecDialogue: PGMbattleSpecDialogue,
|
PGMbattleSpecDialogue: PGMbattleSpecDialogue,
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||||
|
"moveset": "Capacités",
|
||||||
|
"gender": "Sexe :",
|
||||||
|
"ability": "Talent :",
|
||||||
|
"nature": "Nature :",
|
||||||
|
"epic": "Épique",
|
||||||
|
"rare": "Rare",
|
||||||
|
"common": "Commun"
|
||||||
|
} as const;
|
|
@ -31,6 +31,7 @@ import {
|
||||||
PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue
|
PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue
|
||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { biome } from "./biome";
|
import { biome } from "./biome";
|
||||||
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
|
||||||
export const itConfig = {
|
export const itConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
|
@ -60,6 +61,7 @@ export const itConfig = {
|
||||||
gameStatsUiHandler: gameStatsUiHandler,
|
gameStatsUiHandler: gameStatsUiHandler,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
biome: biome,
|
biome: biome,
|
||||||
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
PGMdialogue: PGMdialogue,
|
PGMdialogue: PGMdialogue,
|
||||||
PGFdialogue: PGFdialogue,
|
PGFdialogue: PGFdialogue,
|
||||||
PGMbattleSpecDialogue: PGMbattleSpecDialogue,
|
PGMbattleSpecDialogue: PGMbattleSpecDialogue,
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||||
|
"moveset": "Moveset",
|
||||||
|
"gender": "Gender:",
|
||||||
|
"ability": "Ability:",
|
||||||
|
"nature": "Nature:",
|
||||||
|
"epic": "Epic",
|
||||||
|
"rare": "Rare",
|
||||||
|
"common": "Common"
|
||||||
|
} as const;
|
|
@ -31,6 +31,7 @@ import {
|
||||||
PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue
|
PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue
|
||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { biome } from "./biome";
|
import { biome } from "./biome";
|
||||||
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
|
||||||
export const ptBrConfig = {
|
export const ptBrConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
|
@ -60,6 +61,7 @@ export const ptBrConfig = {
|
||||||
gameStatsUiHandler: gameStatsUiHandler,
|
gameStatsUiHandler: gameStatsUiHandler,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
biome: biome,
|
biome: biome,
|
||||||
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
PGMdialogue: PGMdialogue,
|
PGMdialogue: PGMdialogue,
|
||||||
PGFdialogue: PGFdialogue,
|
PGFdialogue: PGFdialogue,
|
||||||
PGMbattleSpecDialogue: PGMbattleSpecDialogue,
|
PGMbattleSpecDialogue: PGMbattleSpecDialogue,
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||||
|
"moveset": "Moveset",
|
||||||
|
"gender": "Gender:",
|
||||||
|
"ability": "Ability:",
|
||||||
|
"nature": "Nature:",
|
||||||
|
"epic": "Epic",
|
||||||
|
"rare": "Rare",
|
||||||
|
"common": "Common"
|
||||||
|
} as const;
|
|
@ -31,6 +31,7 @@ import {
|
||||||
PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue
|
PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue
|
||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { biome } from "./biome";
|
import { biome } from "./biome";
|
||||||
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
|
||||||
export const zhCnConfig = {
|
export const zhCnConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
|
@ -60,6 +61,7 @@ export const zhCnConfig = {
|
||||||
gameStatsUiHandler: gameStatsUiHandler,
|
gameStatsUiHandler: gameStatsUiHandler,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
biome: biome,
|
biome: biome,
|
||||||
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
PGMdialogue: PGMdialogue,
|
PGMdialogue: PGMdialogue,
|
||||||
PGFdialogue: PGFdialogue,
|
PGFdialogue: PGFdialogue,
|
||||||
PGMbattleSpecDialogue: PGMbattleSpecDialogue,
|
PGMbattleSpecDialogue: PGMbattleSpecDialogue,
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||||
|
"moveset": "Moveset",
|
||||||
|
"gender": "Gender:",
|
||||||
|
"ability": "Ability:",
|
||||||
|
"nature": "Nature:",
|
||||||
|
"epic": "Epic",
|
||||||
|
"rare": "Rare",
|
||||||
|
"common": "Common"
|
||||||
|
} as const;
|
|
@ -30,6 +30,7 @@ import {
|
||||||
PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue
|
PGFmiscDialogue, PGMdoubleBattleDialogue, PGFdoubleBattleDialogue
|
||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { biome } from "./biome";
|
import { biome } from "./biome";
|
||||||
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
|
||||||
export const zhTWConfig = {
|
export const zhTWConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
|
@ -58,6 +59,7 @@ export const zhTWConfig = {
|
||||||
berry: berry,
|
berry: berry,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
biome: biome,
|
biome: biome,
|
||||||
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
PGMdialogue: PGMdialogue,
|
PGMdialogue: PGMdialogue,
|
||||||
PGFdialogue: PGFdialogue,
|
PGFdialogue: PGFdialogue,
|
||||||
PGMbattleSpecDialogue: PGMbattleSpecDialogue,
|
PGMbattleSpecDialogue: PGMbattleSpecDialogue,
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const pokemonInfoContainer: SimpleTranslationEntries = {
|
||||||
|
"moveset": "Moveset",
|
||||||
|
"gender": "Gender:",
|
||||||
|
"ability": "Ability:",
|
||||||
|
"nature": "Nature:",
|
||||||
|
"epic": "Epic",
|
||||||
|
"rare": "Rare",
|
||||||
|
"common": "Common"
|
||||||
|
} as const;
|
|
@ -181,6 +181,7 @@ declare module "i18next" {
|
||||||
gameStatsUiHandler: SimpleTranslationEntries;
|
gameStatsUiHandler: SimpleTranslationEntries;
|
||||||
voucher: SimpleTranslationEntries;
|
voucher: SimpleTranslationEntries;
|
||||||
biome: SimpleTranslationEntries;
|
biome: SimpleTranslationEntries;
|
||||||
|
pokemonInfoContainer: SimpleTranslationEntries;
|
||||||
PGMdialogue: DialogueTranslationEntries;
|
PGMdialogue: DialogueTranslationEntries;
|
||||||
PGMbattleSpecDialogue: SimpleTranslationEntries;
|
PGMbattleSpecDialogue: SimpleTranslationEntries;
|
||||||
PGMmiscDialogue: SimpleTranslationEntries;
|
PGMmiscDialogue: SimpleTranslationEntries;
|
||||||
|
|
|
@ -10,6 +10,7 @@ import * as Utils from "../utils";
|
||||||
import { Type } from "../data/type";
|
import { Type } from "../data/type";
|
||||||
import { getVariantTint } from "#app/data/variant";
|
import { getVariantTint } from "#app/data/variant";
|
||||||
import ConfirmUiHandler from "./confirm-ui-handler";
|
import ConfirmUiHandler from "./confirm-ui-handler";
|
||||||
|
import i18next from "../plugins/i18n";
|
||||||
|
|
||||||
export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||||
private readonly infoWindowWidth = 104;
|
private readonly infoWindowWidth = 104;
|
||||||
|
@ -55,7 +56,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||||
movesBg.setOrigin(1, 0);
|
movesBg.setOrigin(1, 0);
|
||||||
this.pokemonMovesContainer.add(movesBg);
|
this.pokemonMovesContainer.add(movesBg);
|
||||||
|
|
||||||
const movesLabel = addTextObject(this.scene, -movesBg.width / 2, 6, "Moveset", TextStyle.WINDOW, { fontSize: "64px" });
|
const movesLabel = addTextObject(this.scene, -movesBg.width / 2, 6, i18next.t("pokemonInfoContainer:moveset"), TextStyle.WINDOW, { fontSize: "64px" });
|
||||||
movesLabel.setOrigin(0.5, 0);
|
movesLabel.setOrigin(0.5, 0);
|
||||||
this.pokemonMovesContainer.add(movesLabel);
|
this.pokemonMovesContainer.add(movesLabel);
|
||||||
|
|
||||||
|
@ -86,7 +87,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||||
this.add(infoBg);
|
this.add(infoBg);
|
||||||
this.add(this.statsContainer);
|
this.add(this.statsContainer);
|
||||||
|
|
||||||
this.pokemonGenderLabelText = addTextObject(this.scene, -18, 18, "Gender:", TextStyle.WINDOW, { fontSize: "64px" });
|
this.pokemonGenderLabelText = addTextObject(this.scene, -18, 18, i18next.t("pokemonInfoContainer:gender"), TextStyle.WINDOW, { fontSize: "64px" });
|
||||||
this.pokemonGenderLabelText.setOrigin(1, 0);
|
this.pokemonGenderLabelText.setOrigin(1, 0);
|
||||||
this.pokemonGenderLabelText.setVisible(false);
|
this.pokemonGenderLabelText.setVisible(false);
|
||||||
this.add(this.pokemonGenderLabelText);
|
this.add(this.pokemonGenderLabelText);
|
||||||
|
@ -96,7 +97,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||||
this.pokemonGenderText.setVisible(false);
|
this.pokemonGenderText.setVisible(false);
|
||||||
this.add(this.pokemonGenderText);
|
this.add(this.pokemonGenderText);
|
||||||
|
|
||||||
this.pokemonAbilityLabelText = addTextObject(this.scene, -18, 28, "Ability:", TextStyle.WINDOW, { fontSize: "64px" });
|
this.pokemonAbilityLabelText = addTextObject(this.scene, -18, 28, i18next.t("pokemonInfoContainer:ability"), TextStyle.WINDOW, { fontSize: "64px" });
|
||||||
this.pokemonAbilityLabelText.setOrigin(1, 0);
|
this.pokemonAbilityLabelText.setOrigin(1, 0);
|
||||||
this.add(this.pokemonAbilityLabelText);
|
this.add(this.pokemonAbilityLabelText);
|
||||||
|
|
||||||
|
@ -104,7 +105,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||||
this.pokemonAbilityText.setOrigin(0, 0);
|
this.pokemonAbilityText.setOrigin(0, 0);
|
||||||
this.add(this.pokemonAbilityText);
|
this.add(this.pokemonAbilityText);
|
||||||
|
|
||||||
this.pokemonNatureLabelText = addTextObject(this.scene, -18, 38, "Nature:", TextStyle.WINDOW, { fontSize: "64px" });
|
this.pokemonNatureLabelText = addTextObject(this.scene, -18, 38, i18next.t("pokemonInfoContainer:nature"), TextStyle.WINDOW, { fontSize: "64px" });
|
||||||
this.pokemonNatureLabelText.setOrigin(1, 0);
|
this.pokemonNatureLabelText.setOrigin(1, 0);
|
||||||
this.add(this.pokemonNatureLabelText);
|
this.add(this.pokemonNatureLabelText);
|
||||||
|
|
||||||
|
@ -154,7 +155,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||||
this.pokemonShinyIcon.setTint(getVariantTint(baseVariant));
|
this.pokemonShinyIcon.setTint(getVariantTint(baseVariant));
|
||||||
if (this.pokemonShinyIcon.visible) {
|
if (this.pokemonShinyIcon.visible) {
|
||||||
const shinyDescriptor = doubleShiny || baseVariant ?
|
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("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")}` : ""}`
|
||||||
: "";
|
: "";
|
||||||
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, `Shiny${shinyDescriptor ? ` (${shinyDescriptor})` : ""}`, true));
|
||||||
this.pokemonShinyIcon.on("pointerout", () => (this.scene as BattleScene).ui.hideTooltip());
|
this.pokemonShinyIcon.on("pointerout", () => (this.scene as BattleScene).ui.hideTooltip());
|
||||||
|
|
Loading…
Reference in New Issue