[Mirror][Localization] Translate summary #2336 (#2907)

* Translate pokemon summary

* Translate pokemon summary to fr

* Translate pokemon summary to de

* Translate pokemon summary to es

* Translate pokemon summary to it

* Translate pokemon summary to ko

* Translate pokemon summary to pt br

* Translate pokemon summary to zh cn

* Translate pokemon summary to zh tw

* Fix import

* Update partially for en and ko

* Update interface name for en

* Merge trainerLabel&Text and calculate typeLabel width

* Update src/locales/es/pokemon-summary.ts

Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com>

* Apply translations key to all languages with interface TranslationEtries

* Update ko/translationKey of status

* Update ko/translationKey of pokemonInfo

* Update de/translationKeys of memostring and metFragment

* Update de/translationKeys of memostring and metFragment 2

* Update src/locales/ko/pokemon-summary.ts

Co-authored-by: Enoch <enoch.jwsong@gmail.com>

* Update src/locales/ko/pokemon-summary.ts

Co-authored-by: returntoice <dieandbecome@gmail.com>

* Update src/locales/pt_BR/pokemon-summary.ts

Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* Update src/locales/ko/pokemon-summary.ts

* Update src/locales/pt_BR/pokemon-summary.ts

Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* Update pokemon-summary.ts [Localization(it)]

* remove unused code

* Update src/locales/zh_CN/pokemon-summary.ts

Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>

* Update src/locales/zh_CN/pokemon-summary.ts

Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>

* Update src/locales/zh_CN/pokemon-summary.ts

Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>

* Update src/locales/es/pokemon-summary.ts

Co-authored-by: Arxxer <javiptn7@gmail.com>

* Update src/locales/es/pokemon-summary.ts

Co-authored-by: Arxxer <javiptn7@gmail.com>

---------

Co-authored-by: Alexis <alexis.faizeau@animedigitalnetwork.fr>
Co-authored-by: Mr.WaterT <water.t.works@gmail.com>
Co-authored-by: Alexis Faizeau <faizeau.alexis@gmail.com>
Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com>
Co-authored-by: returntoice <dieandbecome@gmail.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: 송지원 <jiwsong@gmarket.com>
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>
Co-authored-by: Arxxer <javiptn7@gmail.com>
This commit is contained in:
Enoch 2024-07-12 00:28:01 +09:00 committed by GitHub
parent caf541ba89
commit 74941bd7f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 250 additions and 20 deletions

View File

@ -10,7 +10,7 @@ export enum Stat {
} }
export function getStatName(stat: Stat, shorten: boolean = false) { export function getStatName(stat: Stat, shorten: boolean = false) {
let ret: string; let ret: string = "";
switch (stat) { switch (stat) {
case Stat.HP: case Stat.HP:
ret = !shorten ? i18next.t("pokemonInfo:Stat.HP") : i18next.t("pokemonInfo:Stat.HPshortened"); ret = !shorten ? i18next.t("pokemonInfo:Stat.HP") : i18next.t("pokemonInfo:Stat.HPshortened");

View File

@ -33,6 +33,7 @@ import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon"; import { pokemon } from "./pokemon";
import { pokemonInfo } from "./pokemon-info"; import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container"; import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
@ -82,6 +83,7 @@ export const deConfig = {
pokemon: pokemon, pokemon: pokemon,
pokemonInfo: pokemonInfo, pokemonInfo: pokemonInfo,
pokemonInfoContainer: pokemonInfoContainer, pokemonInfoContainer: pokemonInfoContainer,
pokemonSummary: pokemonSummary,
saveSlotSelectUiHandler: saveSlotSelectUiHandler, saveSlotSelectUiHandler: saveSlotSelectUiHandler,
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,

View File

@ -0,0 +1,20 @@
import { TranslationEntries } from "#app/interfaces/locales";
export const pokemonSummary: TranslationEntries = {
"pokemonInfo": "Pokémon Info",
"status": "Status",
"powerAccuracyCategory": "Stärke\nGenauigkeit\nKategorie",
"type": "Typ",
"unknownTrainer": "Unbekannt",
"ot": "OT",
"nature": "Wesen",
"expPoints": "Erf. Punkte",
"nextLv": "Nächstes Lvl.",
"cancel": "Abbrechen",
"memoString": "Wesen: {{natureFragment}}\n{{metFragment}}",
"metFragment": {
"normal": "Herkunft: {{biome}}\nMit Lv. {{level}} erhalten.",
"apparently": "Herkunft: {{biome}}\nOffenbar mit Lv. {{level}} erhalten.",
},
} as const;

View File

@ -36,6 +36,7 @@ import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon"; import { pokemon } from "./pokemon";
import { pokemonInfo } from "./pokemon-info"; import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container"; import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
@ -82,6 +83,7 @@ export const enConfig = {
pokemon: pokemon, pokemon: pokemon,
pokemonInfo: pokemonInfo, pokemonInfo: pokemonInfo,
pokemonInfoContainer: pokemonInfoContainer, pokemonInfoContainer: pokemonInfoContainer,
pokemonSummary: pokemonSummary,
saveSlotSelectUiHandler: saveSlotSelectUiHandler, saveSlotSelectUiHandler: saveSlotSelectUiHandler,
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,

View File

@ -0,0 +1,20 @@
import { TranslationEntries } from "#app/interfaces/locales";
export const pokemonSummary: TranslationEntries = {
"pokemonInfo": "Pokémon Info",
"status": "Status",
"powerAccuracyCategory": "Power\nAccuracy\nCategory",
"type": "Type",
"unknownTrainer": "Unknown",
"ot": "OT",
"nature": "nature",
"expPoints": "Exp. Points",
"nextLv": "Next Lv.",
"cancel": "Cancel",
"memoString": "{{natureFragment}} nature,\n{{metFragment}}",
"metFragment": {
"normal": "met at Lv{{level}},\n{{biome}}.",
"apparently": "apparently met at Lv{{level}},\n{{biome}}.",
},
} as const;

View File

@ -33,6 +33,7 @@ import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon"; import { pokemon } from "./pokemon";
import { pokemonInfo } from "./pokemon-info"; import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container"; import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
@ -82,6 +83,7 @@ export const esConfig = {
pokemon: pokemon, pokemon: pokemon,
pokemonInfo: pokemonInfo, pokemonInfo: pokemonInfo,
pokemonInfoContainer: pokemonInfoContainer, pokemonInfoContainer: pokemonInfoContainer,
pokemonSummary: pokemonSummary,
saveSlotSelectUiHandler: saveSlotSelectUiHandler, saveSlotSelectUiHandler: saveSlotSelectUiHandler,
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,

View File

@ -0,0 +1,20 @@
import { TranslationEntries } from "#app/interfaces/locales";
export const pokemonSummary: TranslationEntries = {
"pokemonInfo": "Info. Pokémon",
"status": "Estado",
"powerAccuracyCategory": "Potencia\nPrecisión\nCategoría",
"type": "Tipo",
"unknownTrainer": "Desconocido",
"ot": "EO",
"nature": "Naturaleza",
"expPoints": "Puntos Exp.",
"nextLv": "Nv. siguiente",
"cancel": "Salir",
"memoString": "Naturaleza {{natureFragment}},\n{{metFragment}}",
"metFragment": {
"normal": "encontrado al Nv. {{level}},\n{{biome}}.",
"apparently": "aparentemente encontrado al Nv. {{level}},\n{{biome}}.",
},
} as const;

View File

@ -33,6 +33,7 @@ import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon"; import { pokemon } from "./pokemon";
import { pokemonInfo } from "./pokemon-info"; import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container"; import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
@ -82,6 +83,7 @@ export const frConfig = {
pokemon: pokemon, pokemon: pokemon,
pokemonInfo: pokemonInfo, pokemonInfo: pokemonInfo,
pokemonInfoContainer: pokemonInfoContainer, pokemonInfoContainer: pokemonInfoContainer,
pokemonSummary: pokemonSummary,
saveSlotSelectUiHandler: saveSlotSelectUiHandler, saveSlotSelectUiHandler: saveSlotSelectUiHandler,
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,

View File

@ -0,0 +1,20 @@
import { TranslationEntries } from "#app/interfaces/locales";
export const pokemonSummary: TranslationEntries = {
"pokemonInfo": "Info Pokémon",
"status": "Résumé",
"powerAccuracyCategory": "Puissance\nPrécision\nCatégorie",
"type": "Type",
"unknownTrainer": "Inconnu",
"ot": "D.O.",
"nature": "de nature",
"expPoints": "Points Exp.",
"nextLv": "N. suivant",
"cancel": "Annuler",
"memoString": "{{natureFragment}} de nature,\n{{metFragment}}",
"metFragment": {
"normal": "rencontré au N.{{level}},\n{{biome}}.",
"apparently": "apparemment rencontré au N.{{level}},\n{{biome}}.",
},
} as const;

View File

@ -33,6 +33,7 @@ import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon"; import { pokemon } from "./pokemon";
import { pokemonInfo } from "./pokemon-info"; import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container"; import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
@ -82,6 +83,7 @@ export const itConfig = {
pokemon: pokemon, pokemon: pokemon,
pokemonInfo: pokemonInfo, pokemonInfo: pokemonInfo,
pokemonInfoContainer: pokemonInfoContainer, pokemonInfoContainer: pokemonInfoContainer,
pokemonSummary: pokemonSummary,
saveSlotSelectUiHandler: saveSlotSelectUiHandler, saveSlotSelectUiHandler: saveSlotSelectUiHandler,
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,

View File

@ -0,0 +1,20 @@
import { TranslationEntries } from "#app/interfaces/locales";
export const pokemonSummary: TranslationEntries = {
"pokemonInfo": "Info Pokémon",
"status": "Stato",
"powerAccuracyCategory": "Potenza\nPrecisione\nCategoria",
"type": "Tipo",
"unknownTrainer": "Sconosciuto",
"ot": "AO",
"nature": "natura",
"expPoints": "Punti Esp.",
"nextLv": "Prossimo Lv.",
"cancel": "Annulla",
"memoString": "Natura {{natureFragment}},\n{{metFragment}}",
"metFragment": {
"normal": "incontrato al Lv.{{level}},\n{{biome}}.",
"apparently": "apparentemente incontrato al Lv.{{level}},\n{{biome}}.",
},
} as const;

View File

@ -33,6 +33,7 @@ import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon"; import { pokemon } from "./pokemon";
import { pokemonInfo } from "./pokemon-info"; import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container"; import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
@ -82,6 +83,7 @@ export const koConfig = {
pokemon: pokemon, pokemon: pokemon,
pokemonInfo: pokemonInfo, pokemonInfo: pokemonInfo,
pokemonInfoContainer: pokemonInfoContainer, pokemonInfoContainer: pokemonInfoContainer,
pokemonSummary: pokemonSummary,
saveSlotSelectUiHandler: saveSlotSelectUiHandler, saveSlotSelectUiHandler: saveSlotSelectUiHandler,
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,

View File

@ -0,0 +1,47 @@
import { TranslationEntries } from "#app/interfaces/locales";
export const pokemonSummary: TranslationEntries = {
"pokemonInfo": "스테이터스",
"status": "상태 이상",
"powerAccuracyCategory": "위력\n명중\n분류",
"type": "타입",
"unknownTrainer": "알수없음",
"ot": "어버이",
"nature": "성격",
"expPoints": "현재 경험치",
"nextLv": "다음 레벨까지",
"cancel": "그만둔다",
"memoString": "{{natureFragment}}.\n{{metFragment}}",
"metFragment": {
"normal": "{{biome}}에서\nLv{{level}}일 때 만났다.",
"apparently": "{{biome}}에서\nLv{{level}}일 때 만난 것 같다.",
},
"natureFragment": {
"Hardy": "{{nature}}하는 성격",
"Lonely": "{{nature}}을 타는 성격",
"Brave": "{{nature}}한 성격",
"Adamant": "{{nature}}스러운 성격",
"Naughty" : "{{nature}}같은 성격",
"Bold" : "{{nature}}한 성격",
"Docile" : "{{nature}}한 성격",
"Relaxed" : "{{nature}}한 성격",
"Impish" : "{{nature}}같은 성격",
"Lax" : "{{nature}}거리는 성격",
"Timid" : "{{nature}}같은 성격",
"Hasty" : "{{nature}}한 성격",
"Serious" : "{{nature}}한 성격",
"Jolly" : "{{nature}}한 성격",
"Naive" : "{{nature}}한 성격",
"Modest" : "{{nature}}스러운 성격",
"Mild" : "{{nature}}한 성격",
"Quiet" : "{{nature}}한 성격",
"Bashful" : "{{nature}}을 타는 성격",
"Rash" : "{{nature}}거리는 성격",
"Calm" : "{{nature}}한 성격",
"Gentle" : "{{nature}}한 성격",
"Sassy" : "{{nature}}진 성격",
"Careful" : "{{nature}}한 성격",
"Quirky": "{{nature}}스러운 성격",
},
} as const;

View File

@ -33,6 +33,7 @@ import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon"; import { pokemon } from "./pokemon";
import { pokemonInfo } from "./pokemon-info"; import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container"; import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
@ -82,6 +83,7 @@ export const ptBrConfig = {
pokemon: pokemon, pokemon: pokemon,
pokemonInfo: pokemonInfo, pokemonInfo: pokemonInfo,
pokemonInfoContainer: pokemonInfoContainer, pokemonInfoContainer: pokemonInfoContainer,
pokemonSummary: pokemonSummary,
saveSlotSelectUiHandler: saveSlotSelectUiHandler, saveSlotSelectUiHandler: saveSlotSelectUiHandler,
statusEffect: statusEffect, statusEffect: statusEffect,
terrain: terrain, terrain: terrain,

View File

@ -0,0 +1,20 @@
import { TranslationEntries } from "#app/interfaces/locales";
export const pokemonSummary: TranslationEntries = {
"pokemonInfo": "Info. Pokémon",
"status": "Status",
"powerAccuracyCategory": "Poder\nPrecisão\nCategoria",
"type": "Tipo",
"unknownTrainer": "Desconhecido",
"ot": "TO",
"nature": "natureza",
"expPoints": "Pontos EXP.",
"nextLv": "Próx. Nv.",
"cancel": "Cancelar",
"memoString": "Natureza {{natureFragment}},\n{{metFragment}}",
"metFragment": {
"normal": "encontrado no Nv.{{level}},\n{{biome}}.",
"apparently": "aparentemente encontrado no Nv.{{level}},\n{{biome}}.",
},
} as const;

View File

@ -33,6 +33,7 @@ import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon"; import { pokemon } from "./pokemon";
import { pokemonInfo } from "./pokemon-info"; import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container"; import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
@ -82,6 +83,7 @@ export const zhCnConfig = {
pokemon: pokemon, pokemon: pokemon,
pokemonInfo: pokemonInfo, pokemonInfo: pokemonInfo,
pokemonInfoContainer: pokemonInfoContainer, pokemonInfoContainer: pokemonInfoContainer,
pokemonSummary: pokemonSummary,
saveSlotSelectUiHandler: saveSlotSelectUiHandler, saveSlotSelectUiHandler: saveSlotSelectUiHandler,
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,

View File

@ -0,0 +1,19 @@
import { TranslationEntries } from "#app/interfaces/locales";
export const pokemonSummary: TranslationEntries = {
"pokemonInfo": "宝可梦信息",
"status": "状态",
"powerAccuracyCategory": "威力\n命中率\n类别",
"type": "属性",
"unknownTrainer": "未知",
"ot": "训练师",
"nature": "性格",
"expPoints": "经验值",
"nextLv": "下一级",
"cancel": "取消",
"memoString": "{{natureFragment}} 性格,\n{{metFragment}}",
"metFragment": {
"apparently": "命中注定般地相遇于Lv.{{level}}\n{{biome}}。",
},
} as const;

View File

@ -33,6 +33,7 @@ import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon"; import { pokemon } from "./pokemon";
import { pokemonInfo } from "./pokemon-info"; import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container"; import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
@ -82,6 +83,7 @@ export const zhTwConfig = {
pokemon: pokemon, pokemon: pokemon,
pokemonInfo: pokemonInfo, pokemonInfo: pokemonInfo,
pokemonInfoContainer: pokemonInfoContainer, pokemonInfoContainer: pokemonInfoContainer,
pokemonSummary: pokemonSummary,
saveSlotSelectUiHandler: saveSlotSelectUiHandler, saveSlotSelectUiHandler: saveSlotSelectUiHandler,
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,

View File

@ -0,0 +1,20 @@
import { TranslationEntries } from "#app/interfaces/locales";
export const pokemonSummary: TranslationEntries = {
"pokemonInfo": "Pokémon Info",
"status": "Status",
"powerAccuracyCategory": "Power\nAccuracy\nCategory",
"type": "Type",
"unknownTrainer": "Unknown",
"ot": "OT",
"nature": "nature",
"expPoints": "Exp. Points",
"nextLv": "Next Lv.",
"cancel": "Cancel",
"memoString": "{{natureFragment}} nature,\n{{metFragment}}",
"metFragment": {
"normal": "met at Lv{{level}},\n{{biome}}.",
"apparently": "apparently met at Lv{{level}},\n{{biome}}.",
},
} as const;

View File

@ -15,7 +15,7 @@ import { Stat, getStatName } from "../data/pokemon-stat";
import { PokemonHeldItemModifier } from "../modifier/modifier"; import { PokemonHeldItemModifier } from "../modifier/modifier";
import { StatusEffect } from "../data/status-effect"; import { StatusEffect } from "../data/status-effect";
import { getBiomeName } from "../data/biomes"; import { getBiomeName } from "../data/biomes";
import { getNatureName, getNatureStatMultiplier } from "../data/nature"; import { Nature, getNatureName, getNatureStatMultiplier } from "../data/nature";
import { loggedInUser } from "../account"; import { loggedInUser } from "../account";
import { Variant, getVariantTint } from "#app/data/variant"; import { Variant, getVariantTint } from "#app/data/variant";
import {Button} from "#enums/buttons"; import {Button} from "#enums/buttons";
@ -122,7 +122,7 @@ export default class SummaryUiHandler extends UiHandler {
this.tabSprite.setOrigin(1, 1); this.tabSprite.setOrigin(1, 1);
this.summaryContainer.add(this.tabSprite); this.summaryContainer.add(this.tabSprite);
const summaryLabel = addTextObject(this.scene, 4, -165, "Pokémon Info", TextStyle.SUMMARY); const summaryLabel = addTextObject(this.scene, 4, -165, i18next.t("pokemonSummary:pokemonInfo"), TextStyle.SUMMARY);
summaryLabel.setOrigin(0, 1); summaryLabel.setOrigin(0, 1);
this.summaryContainer.add(summaryLabel); this.summaryContainer.add(summaryLabel);
@ -207,7 +207,7 @@ export default class SummaryUiHandler extends UiHandler {
this.statusContainer.add(statusBg); this.statusContainer.add(statusBg);
const statusLabel = addTextObject(this.scene, 3, 0, "Status", TextStyle.SUMMARY); const statusLabel = addTextObject(this.scene, 3, 0, i18next.t("pokemonSummary:status"), TextStyle.SUMMARY);
statusLabel.setOrigin(0, 0); statusLabel.setOrigin(0, 0);
this.statusContainer.add(statusLabel); this.statusContainer.add(statusLabel);
@ -227,7 +227,7 @@ export default class SummaryUiHandler extends UiHandler {
moveEffectBg.setOrigin(0, 0); moveEffectBg.setOrigin(0, 0);
this.moveEffectContainer.add(moveEffectBg); this.moveEffectContainer.add(moveEffectBg);
const moveEffectLabels = addTextObject(this.scene, 8, 12, "Power\nAccuracy\nCategory", TextStyle.SUMMARY); const moveEffectLabels = addTextObject(this.scene, 8, 12, i18next.t("pokemonSummary:powerAccuracyCategory"), TextStyle.SUMMARY);
moveEffectLabels.setLineSpacing(9); moveEffectLabels.setLineSpacing(9);
moveEffectLabels.setOrigin(0, 0); moveEffectLabels.setOrigin(0, 0);
@ -677,12 +677,7 @@ export default class SummaryUiHandler extends UiHandler {
const profileContainer = this.scene.add.container(0, -pageBg.height); const profileContainer = this.scene.add.container(0, -pageBg.height);
pageContainer.add(profileContainer); pageContainer.add(profileContainer);
const trainerLabel = addTextObject(this.scene, 7, 12, "OT/", TextStyle.SUMMARY_ALT); const trainerText = addBBCodeTextObject(this.scene, 7, 12, `${i18next.t("pokemonSummary:ot")}/${getBBCodeFrag(loggedInUser?.username || i18next.t("pokemonSummary:unknown"), this.scene.gameData.gender === PlayerGender.FEMALE ? TextStyle.SUMMARY_PINK : TextStyle.SUMMARY_BLUE)}`, TextStyle.SUMMARY_ALT);
trainerLabel.setOrigin(0, 0);
profileContainer.add(trainerLabel);
const trainerText = addTextObject(this.scene, 25, 12, loggedInUser?.username || "Unknown",
this.scene.gameData.gender === PlayerGender.FEMALE ? TextStyle.SUMMARY_PINK : TextStyle.SUMMARY_BLUE);
trainerText.setOrigin(0, 0); trainerText.setOrigin(0, 0);
profileContainer.add(trainerText); profileContainer.add(trainerText);
@ -690,12 +685,12 @@ export default class SummaryUiHandler extends UiHandler {
trainerIdText.setOrigin(0, 0); trainerIdText.setOrigin(0, 0);
profileContainer.add(trainerIdText); profileContainer.add(trainerIdText);
const typeLabel = addTextObject(this.scene, 7, 28, "Type/", TextStyle.WINDOW_ALT); const typeLabel = addTextObject(this.scene, 7, 28, `${i18next.t("pokemonSummary:type")}/`, TextStyle.WINDOW_ALT);
typeLabel.setOrigin(0, 0); typeLabel.setOrigin(0, 0);
profileContainer.add(typeLabel); profileContainer.add(typeLabel);
const getTypeIcon = (index: integer, type: Type, tera: boolean = false) => { const getTypeIcon = (index: integer, type: Type, tera: boolean = false) => {
const xCoord = 39 + 34 * index; const xCoord = typeLabel.width * typeLabel.scale + 9 + 34 * index;
const typeIcon = !tera const typeIcon = !tera
? this.scene.add.sprite(xCoord, 42, `types${Utils.verifyLang(i18next.resolvedLanguage) ? `_${i18next.resolvedLanguage}` : ""}`, Type[type].toLowerCase()) : this.scene.add.sprite(xCoord, 42, "type_tera"); ? this.scene.add.sprite(xCoord, 42, `types${Utils.verifyLang(i18next.resolvedLanguage) ? `_${i18next.resolvedLanguage}` : ""}`, Type[type].toLowerCase()) : this.scene.add.sprite(xCoord, 42, "type_tera");
if (tera) { if (tera) {
@ -796,7 +791,20 @@ export default class SummaryUiHandler extends UiHandler {
this.passiveContainer?.nameText.setVisible(false); this.passiveContainer?.nameText.setVisible(false);
this.passiveContainer?.descriptionText.setVisible(false); this.passiveContainer?.descriptionText.setVisible(false);
const memoString = `${getBBCodeFrag(Utils.toReadableString(getNatureName(this.pokemon.getNature())), TextStyle.SUMMARY_RED)}${getBBCodeFrag(" nature,", TextStyle.WINDOW_ALT)}\n${getBBCodeFrag(`${this.pokemon.metBiome === -1 ? "apparently " : ""}met at Lv`, TextStyle.WINDOW_ALT)}${getBBCodeFrag(this.pokemon.metLevel.toString(), TextStyle.SUMMARY_RED)}${getBBCodeFrag(",", TextStyle.WINDOW_ALT)}\n${getBBCodeFrag(getBiomeName(this.pokemon.metBiome), TextStyle.SUMMARY_RED)}${getBBCodeFrag(".", TextStyle.WINDOW_ALT)}`; const closeFragment = getBBCodeFrag("", TextStyle.WINDOW_ALT);
const rawNature = Utils.toReadableString(Nature[this.pokemon.getNature()]);
const nature = `${getBBCodeFrag(Utils.toReadableString(getNatureName(this.pokemon.getNature())), TextStyle.SUMMARY_RED)}${closeFragment}`;
const memoString = i18next.t("pokemonSummary:memoString", {
metFragment: i18next.t(`pokemonSummary:metFragment.${this.pokemon.metBiome === -1? "apparently": "normal"}`, {
biome: `${getBBCodeFrag(getBiomeName(this.pokemon.metBiome), TextStyle.SUMMARY_RED)}${closeFragment}`,
level: `${getBBCodeFrag(this.pokemon.metLevel.toString(), TextStyle.SUMMARY_RED)}${closeFragment}`,
}),
natureFragment:
i18next.exists(`pokemonSummary:natureFragment.${rawNature}`) ?
i18next.t(`pokemonSummary:natureFragment.${rawNature}`, { nature: nature }) :
nature,
});
const memoText = addBBCodeTextObject(this.scene, 7, 113, memoString, TextStyle.WINDOW_ALT); const memoText = addBBCodeTextObject(this.scene, 7, 113, memoString, TextStyle.WINDOW_ALT);
memoText.setOrigin(0, 0); memoText.setOrigin(0, 0);
@ -809,9 +817,7 @@ export default class SummaryUiHandler extends UiHandler {
const stats = Utils.getEnumValues(Stat) as Stat[]; const stats = Utils.getEnumValues(Stat) as Stat[];
stats.forEach((stat, s) => { stats.forEach((stat, s) => {
const statName = stat !== Stat.HP const statName = getStatName(stat);
? getStatName(stat)
: "HP";
const rowIndex = s % 3; const rowIndex = s % 3;
const colIndex = Math.floor(s / 3); const colIndex = Math.floor(s / 3);
@ -848,11 +854,11 @@ export default class SummaryUiHandler extends UiHandler {
const relLvExp = getLevelRelExp(this.pokemon.level + 1, this.pokemon.species.growthRate); const relLvExp = getLevelRelExp(this.pokemon.level + 1, this.pokemon.species.growthRate);
const expRatio = this.pokemon.level < this.scene.getMaxExpLevel() ? this.pokemon.levelExp / relLvExp : 0; const expRatio = this.pokemon.level < this.scene.getMaxExpLevel() ? this.pokemon.levelExp / relLvExp : 0;
const expLabel = addTextObject(this.scene, 6, 112, "EXP. Points", TextStyle.SUMMARY); const expLabel = addTextObject(this.scene, 6, 112, i18next.t("pokemonSummary:expPoints"), TextStyle.SUMMARY);
expLabel.setOrigin(0, 0); expLabel.setOrigin(0, 0);
statsContainer.add(expLabel); statsContainer.add(expLabel);
const nextLvExpLabel = addTextObject(this.scene, 6, 128, "Next Lv.", TextStyle.SUMMARY); const nextLvExpLabel = addTextObject(this.scene, 6, 128, i18next.t("pokemonSummary:nextLv"), TextStyle.SUMMARY);
nextLvExpLabel.setOrigin(0, 0); nextLvExpLabel.setOrigin(0, 0);
statsContainer.add(nextLvExpLabel); statsContainer.add(nextLvExpLabel);
@ -893,7 +899,7 @@ export default class SummaryUiHandler extends UiHandler {
extraRowOverlay.setOrigin(0, 1); extraRowOverlay.setOrigin(0, 1);
this.extraMoveRowContainer.add(extraRowOverlay); this.extraMoveRowContainer.add(extraRowOverlay);
const extraRowText = addTextObject(this.scene, 35, 0, this.summaryUiMode === SummaryUiMode.LEARN_MOVE ? this.newMove.name : "Cancel", const extraRowText = addTextObject(this.scene, 35, 0, this.summaryUiMode === SummaryUiMode.LEARN_MOVE ? this.newMove.name : i18next.t("pokemonSummary:cancel"),
this.summaryUiMode === SummaryUiMode.LEARN_MOVE ? TextStyle.SUMMARY_PINK : TextStyle.SUMMARY); this.summaryUiMode === SummaryUiMode.LEARN_MOVE ? TextStyle.SUMMARY_PINK : TextStyle.SUMMARY);
extraRowText.setOrigin(0, 1); extraRowText.setOrigin(0, 1);
this.extraMoveRowContainer.add(extraRowText); this.extraMoveRowContainer.add(extraRowText);