mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-15 12:52:20 +02:00
Add egg list localization for multiple languages
This commit is contained in:
parent
74ee3329f8
commit
0cd93caff1
@ -1,9 +1,9 @@
|
|||||||
import { Type } from "./type";
|
|
||||||
import * as Utils from "../utils";
|
|
||||||
import BattleScene from "../battle-scene";
|
import BattleScene from "../battle-scene";
|
||||||
|
import i18next from '../plugins/i18n';
|
||||||
|
import * as Utils from "../utils";
|
||||||
|
import { EggTier } from "./enums/egg-type";
|
||||||
import { Species } from "./enums/species";
|
import { Species } from "./enums/species";
|
||||||
import { getPokemonSpecies, speciesStarters } from "./pokemon-species";
|
import { getPokemonSpecies, speciesStarters } from "./pokemon-species";
|
||||||
import { EggTier } from "./enums/egg-type";
|
|
||||||
|
|
||||||
export const EGG_SEED = 1073741824;
|
export const EGG_SEED = 1073741824;
|
||||||
|
|
||||||
@ -54,36 +54,53 @@ export function getEggTierDefaultHatchWaves(tier: EggTier): integer {
|
|||||||
export function getEggDescriptor(egg: Egg): string {
|
export function getEggDescriptor(egg: Egg): string {
|
||||||
if (egg.isManaphyEgg())
|
if (egg.isManaphyEgg())
|
||||||
return 'Manaphy';
|
return 'Manaphy';
|
||||||
|
let ret: string;
|
||||||
switch (egg.tier) {
|
switch (egg.tier) {
|
||||||
case EggTier.GREAT:
|
case EggTier.GREAT:
|
||||||
return 'Rare';
|
ret = i18next.t('eggList:rare');
|
||||||
|
return ret;
|
||||||
case EggTier.ULTRA:
|
case EggTier.ULTRA:
|
||||||
return 'Epic';
|
ret = i18next.t('eggList:epic');
|
||||||
|
return ret;
|
||||||
case EggTier.MASTER:
|
case EggTier.MASTER:
|
||||||
return 'Legendary';
|
ret = i18next.t('eggList:legendary');
|
||||||
|
return ret;
|
||||||
default:
|
default:
|
||||||
return 'Common';
|
ret = i18next.t('eggList:common');
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getEggHatchWavesMessage(hatchWaves: integer): string {
|
export function getEggHatchWavesMessage(hatchWaves: integer): string {
|
||||||
if (hatchWaves <= 5)
|
let ret: string;
|
||||||
return 'Sounds can be heard coming from inside! It will hatch soon!';
|
switch (true) {
|
||||||
if (hatchWaves <= 15)
|
case hatchWaves <= 5:
|
||||||
return 'It appears to move occasionally. It may be close to hatching.';
|
ret = i18next.t('eggList:5waves');
|
||||||
if (hatchWaves <= 50)
|
return ret;
|
||||||
return 'What will hatch from this? It doesn\'t seem close to hatching.';
|
case hatchWaves <= 15:
|
||||||
return 'It looks like this Egg will take a long time to hatch.';
|
ret = i18next.t('eggList:15waves');
|
||||||
|
return ret;
|
||||||
|
case hatchWaves <= 50:
|
||||||
|
ret = i18next.t('eggList:50waves');
|
||||||
|
return ret;
|
||||||
|
default:
|
||||||
|
ret = i18next.t('eggList:>50waves');
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getEggGachaTypeDescriptor(scene: BattleScene, egg: Egg): string {
|
export function getEggGachaTypeDescriptor(scene: BattleScene, egg: Egg): string {
|
||||||
|
let ret: string;
|
||||||
switch (egg.gachaType) {
|
switch (egg.gachaType) {
|
||||||
case GachaType.LEGENDARY:
|
case GachaType.LEGENDARY:
|
||||||
return `Legendary Rate Up (${getPokemonSpecies(getLegendaryGachaSpeciesForTimestamp(scene, egg.timestamp)).getName()})`;
|
ret = `${i18next.t('eggList:legendaryRateUp')} (${getPokemonSpecies(getLegendaryGachaSpeciesForTimestamp(scene, egg.timestamp)).getName()})`
|
||||||
|
return ret;
|
||||||
case GachaType.MOVE:
|
case GachaType.MOVE:
|
||||||
return 'Rare Egg Move Rate Up';
|
ret = i18next.t('eggList:rareEggMoveRateUp');
|
||||||
|
return ret;
|
||||||
case GachaType.SHINY:
|
case GachaType.SHINY:
|
||||||
return 'Shiny Rate Up';
|
ret = i18next.t('eggList:shinyRateUp');
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { ability } from "./ability";
|
import { ability } from "./ability";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
|
import { eggList } from "./egg-list";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
import { growth } from "./growth";
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
@ -18,6 +19,7 @@ export const deConfig = {
|
|||||||
ability: ability,
|
ability: ability,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
commandUiHandler: commandUiHandler,
|
commandUiHandler: commandUiHandler,
|
||||||
|
eggList: eggList,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
menuUiHandler: menuUiHandler,
|
menuUiHandler: menuUiHandler,
|
||||||
menu: menu,
|
menu: menu,
|
||||||
|
16
src/locales/de/egg-list.ts
Normal file
16
src/locales/de/egg-list.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const eggList: SimpleTranslationEntries = {
|
||||||
|
"egg": "Egg",
|
||||||
|
"common": "Common",
|
||||||
|
"rare": "Rare",
|
||||||
|
"epic": "Epic",
|
||||||
|
"legendary": "Legendary",
|
||||||
|
"5waves": "Sounds can be heard coming from inside! It will hatch soon!",
|
||||||
|
"15waves": "It appears to move occasionally. It may be close to hatching.",
|
||||||
|
"50waves": "What will hatch from this? It doesn't seem close to hatching.",
|
||||||
|
">50waves": "It looks like this Egg will take a long time to hatch.",
|
||||||
|
"legendaryRateUp": "Legendary Rate Up",
|
||||||
|
"rareEggMoveRateUp": "Rare Egg Move Rate Up",
|
||||||
|
"shinyRateUp": "Shiny Rate Up",
|
||||||
|
} as const;
|
@ -1,6 +1,7 @@
|
|||||||
import { ability } from "./ability";
|
import { ability } from "./ability";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
|
import { eggList } from "./egg-list";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
import { growth } from "./growth";
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
@ -18,6 +19,7 @@ export const enConfig = {
|
|||||||
ability: ability,
|
ability: ability,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
commandUiHandler: commandUiHandler,
|
commandUiHandler: commandUiHandler,
|
||||||
|
eggList: eggList,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
menuUiHandler: menuUiHandler,
|
menuUiHandler: menuUiHandler,
|
||||||
menu: menu,
|
menu: menu,
|
||||||
|
16
src/locales/en/egg-list.ts
Normal file
16
src/locales/en/egg-list.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const eggList: SimpleTranslationEntries = {
|
||||||
|
"egg": "Egg",
|
||||||
|
"common": "Common",
|
||||||
|
"rare": "Rare",
|
||||||
|
"epic": "Epic",
|
||||||
|
"legendary": "Legendary",
|
||||||
|
"5waves": "Sounds can be heard coming from inside! It will hatch soon!",
|
||||||
|
"15waves": "It appears to move occasionally. It may be close to hatching.",
|
||||||
|
"50waves": "What will hatch from this? It doesn't seem close to hatching.",
|
||||||
|
">50waves": "It looks like this Egg will take a long time to hatch.",
|
||||||
|
"legendaryRateUp": "Legendary Rate Up",
|
||||||
|
"rareEggMoveRateUp": "Rare Egg Move Rate Up",
|
||||||
|
"shinyRateUp": "Shiny Rate Up",
|
||||||
|
} as const;
|
@ -1,6 +1,7 @@
|
|||||||
import { ability } from "./ability";
|
import { ability } from "./ability";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
|
import { eggList } from "./egg-list";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
import { growth } from "./growth";
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
@ -18,6 +19,7 @@ export const esConfig = {
|
|||||||
ability: ability,
|
ability: ability,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
commandUiHandler: commandUiHandler,
|
commandUiHandler: commandUiHandler,
|
||||||
|
eggList: eggList,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
menuUiHandler: menuUiHandler,
|
menuUiHandler: menuUiHandler,
|
||||||
menu: menu,
|
menu: menu,
|
||||||
|
16
src/locales/es/egg-list.ts
Normal file
16
src/locales/es/egg-list.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const eggList: SimpleTranslationEntries = {
|
||||||
|
"egg": "Egg",
|
||||||
|
"common": "Common",
|
||||||
|
"rare": "Rare",
|
||||||
|
"epic": "Epic",
|
||||||
|
"legendary": "Legendary",
|
||||||
|
"5waves": "Sounds can be heard coming from inside! It will hatch soon!",
|
||||||
|
"15waves": "It appears to move occasionally. It may be close to hatching.",
|
||||||
|
"50waves": "What will hatch from this? It doesn't seem close to hatching.",
|
||||||
|
">50waves": "It looks like this Egg will take a long time to hatch.",
|
||||||
|
"legendaryRateUp": "Legendary Rate Up",
|
||||||
|
"rareEggMoveRateUp": "Rare Egg Move Rate Up",
|
||||||
|
"shinyRateUp": "Shiny Rate Up",
|
||||||
|
} as const;
|
@ -1,6 +1,7 @@
|
|||||||
import { ability } from "./ability";
|
import { ability } from "./ability";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
|
import { eggList } from "./egg-list";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
import { growth } from "./growth";
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
@ -18,6 +19,7 @@ export const frConfig = {
|
|||||||
ability: ability,
|
ability: ability,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
commandUiHandler: commandUiHandler,
|
commandUiHandler: commandUiHandler,
|
||||||
|
eggList: eggList,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
menuUiHandler: menuUiHandler,
|
menuUiHandler: menuUiHandler,
|
||||||
menu: menu,
|
menu: menu,
|
||||||
|
16
src/locales/fr/egg-list.ts
Normal file
16
src/locales/fr/egg-list.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const eggList: SimpleTranslationEntries = {
|
||||||
|
"egg": "Egg",
|
||||||
|
"common": "Common",
|
||||||
|
"rare": "Rare",
|
||||||
|
"epic": "Epic",
|
||||||
|
"legendary": "Legendary",
|
||||||
|
"5waves": "Sounds can be heard coming from inside! It will hatch soon!",
|
||||||
|
"15waves": "It appears to move occasionally. It may be close to hatching.",
|
||||||
|
"50waves": "What will hatch from this? It doesn't seem close to hatching.",
|
||||||
|
">50waves": "It looks like this Egg will take a long time to hatch.",
|
||||||
|
"legendaryRateUp": "Legendary Rate Up",
|
||||||
|
"rareEggMoveRateUp": "Rare Egg Move Rate Up",
|
||||||
|
"shinyRateUp": "Shiny Rate Up",
|
||||||
|
} as const;
|
@ -1,6 +1,7 @@
|
|||||||
import { ability } from "./ability";
|
import { ability } from "./ability";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
|
import { eggList } from "./egg-list";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
import { growth } from "./growth";
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
@ -18,6 +19,7 @@ export const itConfig = {
|
|||||||
ability: ability,
|
ability: ability,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
commandUiHandler: commandUiHandler,
|
commandUiHandler: commandUiHandler,
|
||||||
|
eggList: eggList,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
menuUiHandler: menuUiHandler,
|
menuUiHandler: menuUiHandler,
|
||||||
menu: menu,
|
menu: menu,
|
||||||
|
16
src/locales/it/egg-list.ts
Normal file
16
src/locales/it/egg-list.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const eggList: SimpleTranslationEntries = {
|
||||||
|
"egg": "Egg",
|
||||||
|
"common": "Common",
|
||||||
|
"rare": "Rare",
|
||||||
|
"epic": "Epic",
|
||||||
|
"legendary": "Legendary",
|
||||||
|
"5waves": "Sounds can be heard coming from inside! It will hatch soon!",
|
||||||
|
"15waves": "It appears to move occasionally. It may be close to hatching.",
|
||||||
|
"50waves": "What will hatch from this? It doesn't seem close to hatching.",
|
||||||
|
">50waves": "It looks like this Egg will take a long time to hatch.",
|
||||||
|
"legendaryRateUp": "Legendary Rate Up",
|
||||||
|
"rareEggMoveRateUp": "Rare Egg Move Rate Up",
|
||||||
|
"shinyRateUp": "Shiny Rate Up",
|
||||||
|
} as const;
|
@ -1,6 +1,7 @@
|
|||||||
import { ability } from "./ability";
|
import { ability } from "./ability";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
|
import { eggList } from "./egg-list";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
import { growth } from "./growth";
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
@ -13,11 +14,11 @@ import { pokemonStat } from "./pokemon-stat";
|
|||||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||||
import { tutorial } from "./tutorial";
|
import { tutorial } from "./tutorial";
|
||||||
|
|
||||||
|
|
||||||
export const ptBrConfig = {
|
export const ptBrConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
commandUiHandler: commandUiHandler,
|
commandUiHandler: commandUiHandler,
|
||||||
|
eggList: eggList,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
menuUiHandler: menuUiHandler,
|
menuUiHandler: menuUiHandler,
|
||||||
menu: menu,
|
menu: menu,
|
||||||
|
16
src/locales/pt_BR/egg-list.ts
Normal file
16
src/locales/pt_BR/egg-list.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const eggList: SimpleTranslationEntries = {
|
||||||
|
"egg": "Ovo",
|
||||||
|
"common": "Comum",
|
||||||
|
"rare": "Raro",
|
||||||
|
"epic": "Épico",
|
||||||
|
"legendary": "Lendário",
|
||||||
|
"5waves": "Barulhos podem ser ouvidos vindo de dentro! Vai chocar em breve!",
|
||||||
|
"15waves": "Parece se mover ocasionalmente. Pode estar perto de chocar.",
|
||||||
|
"50waves": "O que vai nascer disso? Não parece estar perto de chocar.",
|
||||||
|
">50waves": "Parece que este ovo vai demorar bastante para chocar.",
|
||||||
|
"legendaryRateUp": "Taxa de Lendário Aumentada",
|
||||||
|
"rareEggMoveRateUp": "Taxa de Movimento de Ovo Raro Aumentada",
|
||||||
|
"shinyRateUp": "Taxa de Shiny Aumentada",
|
||||||
|
} as const;
|
@ -1,22 +1,24 @@
|
|||||||
import { ability } from "./ability";
|
import { ability } from "./ability";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
|
import { eggList } from "./egg-list";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
import { menuUiHandler } from "./menu-ui-handler";
|
import { menuUiHandler } from "./menu-ui-handler";
|
||||||
import { move } from "./move";
|
import { move } from "./move";
|
||||||
|
import { nature } from "./nature";
|
||||||
import { pokeball } from "./pokeball";
|
import { pokeball } from "./pokeball";
|
||||||
import { pokemon } from "./pokemon";
|
import { pokemon } from "./pokemon";
|
||||||
import { pokemonStat } from "./pokemon-stat";
|
import { pokemonStat } from "./pokemon-stat";
|
||||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||||
import { tutorial } from "./tutorial";
|
import { tutorial } from "./tutorial";
|
||||||
import { nature } from "./nature";
|
|
||||||
|
|
||||||
|
|
||||||
export const zhCnConfig = {
|
export const zhCnConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
commandUiHandler: commandUiHandler,
|
commandUiHandler: commandUiHandler,
|
||||||
|
eggList: eggList,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
menuUiHandler: menuUiHandler,
|
menuUiHandler: menuUiHandler,
|
||||||
menu: menu,
|
menu: menu,
|
||||||
|
16
src/locales/zh_CN/egg-list.ts
Normal file
16
src/locales/zh_CN/egg-list.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const eggList: SimpleTranslationEntries = {
|
||||||
|
"egg": "Egg",
|
||||||
|
"common": "Common",
|
||||||
|
"rare": "Rare",
|
||||||
|
"epic": "Epic",
|
||||||
|
"legendary": "Legendary",
|
||||||
|
"5waves": "Sounds can be heard coming from inside! It will hatch soon!",
|
||||||
|
"15waves": "It appears to move occasionally. It may be close to hatching.",
|
||||||
|
"50waves": "What will hatch from this? It doesn't seem close to hatching.",
|
||||||
|
">50waves": "It looks like this Egg will take a long time to hatch.",
|
||||||
|
"legendaryRateUp": "Legendary Rate Up",
|
||||||
|
"rareEggMoveRateUp": "Rare Egg Move Rate Up",
|
||||||
|
"shinyRateUp": "Shiny Rate Up",
|
||||||
|
} as const;
|
@ -109,6 +109,7 @@ declare module 'i18next' {
|
|||||||
starterSelectUiHandler: SimpleTranslationEntries;
|
starterSelectUiHandler: SimpleTranslationEntries;
|
||||||
nature: SimpleTranslationEntries;
|
nature: SimpleTranslationEntries;
|
||||||
growth: SimpleTranslationEntries;
|
growth: SimpleTranslationEntries;
|
||||||
|
eggList: SimpleTranslationEntries;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import BattleScene from "../battle-scene";
|
import BattleScene from "../battle-scene";
|
||||||
import { Mode } from "./ui";
|
import { Egg, getEggDescriptor, getEggGachaTypeDescriptor, getEggHatchWavesMessage } from "../data/egg";
|
||||||
|
import { Button } from "../enums/buttons";
|
||||||
|
import i18next from '../plugins/i18n';
|
||||||
|
import MessageUiHandler from "./message-ui-handler";
|
||||||
import PokemonIconAnimHandler, { PokemonIconAnimMode } from "./pokemon-icon-anim-handler";
|
import PokemonIconAnimHandler, { PokemonIconAnimMode } from "./pokemon-icon-anim-handler";
|
||||||
import { TextStyle, addTextObject } from "./text";
|
import { TextStyle, addTextObject } from "./text";
|
||||||
import MessageUiHandler from "./message-ui-handler";
|
import { Mode } from "./ui";
|
||||||
import { EGG_SEED, Egg, GachaType, getEggGachaTypeDescriptor, getEggHatchWavesMessage, getEggDescriptor } from "../data/egg";
|
|
||||||
import * as Utils from "../utils";
|
|
||||||
import { addWindow } from "./ui-theme";
|
import { addWindow } from "./ui-theme";
|
||||||
import {Button} from "../enums/buttons";
|
|
||||||
|
|
||||||
export default class EggListUiHandler extends MessageUiHandler {
|
export default class EggListUiHandler extends MessageUiHandler {
|
||||||
private eggListContainer: Phaser.GameObjects.Container;
|
private eggListContainer: Phaser.GameObjects.Container;
|
||||||
@ -165,7 +165,7 @@ export default class EggListUiHandler extends MessageUiHandler {
|
|||||||
|
|
||||||
setEggDetails(egg: Egg): void {
|
setEggDetails(egg: Egg): void {
|
||||||
this.eggSprite.setFrame(`egg_${egg.getKey()}`);
|
this.eggSprite.setFrame(`egg_${egg.getKey()}`);
|
||||||
this.eggNameText.setText(`Egg (${getEggDescriptor(egg)})`);
|
this.eggNameText.setText(`${i18next.t('eggList:egg')} (${getEggDescriptor(egg)})`);
|
||||||
this.eggDateText.setText(
|
this.eggDateText.setText(
|
||||||
new Date(egg.timestamp).toLocaleString(undefined, {
|
new Date(egg.timestamp).toLocaleString(undefined, {
|
||||||
weekday: 'short',
|
weekday: 'short',
|
||||||
|
Loading…
Reference in New Issue
Block a user