[Localization] Localize pokemon form change message and translate (#3275)

* localize form change message (test required)

* Update src/locales/fr/pokemon-form.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

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

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

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

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Update src/locales/zh_TW/pokemon-form.ts

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Update src/locales/de/pokemon-form.ts

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Update src/locales/it/pokemon-form.ts

Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>

---------

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
This commit is contained in:
Enoch 2024-08-02 11:45:02 +09:00 committed by GitHub
parent aeafe0fddd
commit 5d3458b38e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 108 additions and 34 deletions

View File

@ -9,6 +9,7 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { TimeOfDay } from "#enums/time-of-day";
import { getPokemonNameWithAffix } from "#app/messages.js";
import i18next from "i18next";
export enum FormChangeItem {
NONE,
@ -357,22 +358,21 @@ export class SpeciesDefaultFormMatchTrigger extends SpeciesFormChangeTrigger {
export function getSpeciesFormChangeMessage(pokemon: Pokemon, formChange: SpeciesFormChange, preName: string): string {
const isMega = formChange.formKey.indexOf(SpeciesFormKey.MEGA) > -1;
const isGmax = formChange.formKey.indexOf(SpeciesFormKey.GIGANTAMAX) > -1;
const isEmax = formChange.formKey.indexOf("eternamax") > -1;
const isEmax = formChange.formKey.indexOf(SpeciesFormKey.ETERNAMAX) > -1;
const isRevert = !isMega && formChange.formKey === pokemon.species.forms[0].formKey;
const prefix = !pokemon.isPlayer() ? pokemon.hasTrainer() ? "Foe " : "Wild " : "Your ";
if (isMega) {
return `${prefix}${preName} Mega Evolved\ninto ${pokemon.name}!`;
return i18next.t("battlePokemonForm:megaChange", { preName, pokemonName: pokemon.name });
}
if (isGmax) {
return `${prefix}${preName} Gigantamaxed\ninto ${pokemon.name}!`;
return i18next.t("battlePokemonForm:gigantamaxChange", { preName, pokemonName: pokemon.name });
}
if (isEmax) {
return `${prefix}${preName} Eternamaxed\ninto ${pokemon.name}!`;
return i18next.t("battlePokemonForm:eternamaxChange", { preName, pokemonName: pokemon.name });
}
if (isRevert) {
return `${prefix}${getPokemonNameWithAffix(pokemon)} reverted\nto its original form!`;
return i18next.t("battlePokemonForm:revertChange", { pokemonName: getPokemonNameWithAffix(pokemon) });
}
return `${prefix}${preName} changed form!`;
return i18next.t("battlePokemonForm:formChange", { preName });
}
/**

View File

@ -630,7 +630,7 @@ export default class PokemonSpecies extends PokemonSpeciesForm implements Locali
}
if (key) {
return i18next.t(`pokemonForm:${key}`, {pokemonName: this.name});
return i18next.t(`battlePokemonForm:${key}`, {pokemonName: this.name});
}
}
return this.name;

View File

@ -36,7 +36,7 @@ import { move } from "./move";
import { nature } from "./nature";
import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon";
import { pokemonForm } from "./pokemon-form";
import { pokemonForm, battlePokemonForm } from "./pokemon-form";
import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
@ -62,6 +62,7 @@ export const deConfig = {
battle: battle,
battleInfo: battleInfo,
battleMessageUiHandler: battleMessageUiHandler,
battlePokemonForm: battlePokemonForm,
battlerTags: battlerTags,
berry: berry,
bgmName: bgmName,

View File

@ -1,6 +1,6 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const pokemonForm: SimpleTranslationEntries = {
export const battlePokemonForm: SimpleTranslationEntries = {
// Battle forms
"mega": "Mega-{{pokemonName}}",
"mega-x": "Mega-{{pokemonName}} X",
@ -9,6 +9,14 @@ export const pokemonForm: SimpleTranslationEntries = {
"gigantamax": "G-Dyna-{{pokemonName}}",
"eternamax": "U-Dyna-{{pokemonName}}",
"megaChange": "{{preName}} hat sich zu {{pokemonName}} mega-entwickelt!",
"gigantamaxChange": "{{preName}} hat sich zu {{pokemonName}} gigadynamaximiert!",
"eternamaxChange": "{{preName}} hat sich zu {{pokemonName}} unendynamaximiert!",
"revertChange": "{{pokemonName}} hat seine ursprüngliche Form zurückerlangt!",
"formChange": "{{preName}} hat seine Form geändert!",
} as const;
export const pokemonForm: SimpleTranslationEntries = {
// Starters forms
// 1G
"pikachuCosplay": "Cosplay",

View File

@ -39,7 +39,7 @@ import { nature } from "./nature";
import { partyUiHandler } from "./party-ui-handler";
import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon";
import { pokemonForm } from "./pokemon-form";
import { pokemonForm, battlePokemonForm } from "./pokemon-form";
import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
@ -62,6 +62,7 @@ export const enConfig = {
battle: battle,
battleInfo: battleInfo,
battleMessageUiHandler: battleMessageUiHandler,
battlePokemonForm: battlePokemonForm,
battlerTags: battlerTags,
berry: berry,
bgmName: bgmName,

View File

@ -1,7 +1,6 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const pokemonForm: SimpleTranslationEntries = {
// Battle forms
export const battlePokemonForm: SimpleTranslationEntries = {
"mega": "Mega {{pokemonName}}",
"mega-x": "Mega {{pokemonName}} X",
"mega-y": "Mega {{pokemonName}} Y",
@ -9,6 +8,14 @@ export const pokemonForm: SimpleTranslationEntries = {
"gigantamax": "G-Max {{pokemonName}}",
"eternamax": "E-Max {{pokemonName}}",
"megaChange": "{{preName}} Mega Evolved\ninto {{pokemonName}}!",
"gigantamaxChange": "{{preName}} Gigantamaxed\ninto {{pokemonName}}!",
"eternamaxChange": "{{preName}} Eternamaxed\ninto {{pokemonName}}!",
"revertChange": "{{pokemonName}} reverted\nto its original form!",
"formChange": "{{preName}} changed form!",
} as const;
export const pokemonForm: SimpleTranslationEntries = {
// Starters forms
// 1G
"pikachuCosplay": "Cosplay",

View File

@ -36,7 +36,7 @@ import { move } from "./move";
import { nature } from "./nature";
import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon";
import { pokemonForm } from "./pokemon-form";
import { pokemonForm, battlePokemonForm } from "./pokemon-form";
import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
@ -62,6 +62,7 @@ export const esConfig = {
battle: battle,
battleInfo: battleInfo,
battleMessageUiHandler: battleMessageUiHandler,
battlePokemonForm: battlePokemonForm,
battlerTags: battlerTags,
berry: berry,
bgmName: bgmName,

View File

@ -1,7 +1,6 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const pokemonForm: SimpleTranslationEntries = {
// Battle forms
export const battlePokemonForm: SimpleTranslationEntries = {
"mega": "Mega {{pokemonName}}",
"mega-x": "Mega {{pokemonName}} X",
"mega-y": "Mega {{pokemonName}} Y",
@ -9,6 +8,14 @@ export const pokemonForm: SimpleTranslationEntries = {
"gigantamax": "G-Max {{pokemonName}}",
"eternamax": "E-Max {{pokemonName}}",
"megaChange": "{{preName}} Mega Evolved\ninto {{pokemonName}}!",
"gigantamaxChange": "{{preName}} Gigantamaxed\ninto {{pokemonName}}!",
"eternamaxChange": "{{preName}} Eternamaxed\ninto {{pokemonName}}!",
"revertChange": "{{pokemonName}} reverted\nto its original form!",
"formChange": "{{preName}} changed form!",
} as const;
export const pokemonForm: SimpleTranslationEntries = {
// Starters forms
// 1G
"pikachuCosplay": "Coqueta",

View File

@ -36,7 +36,7 @@ import { move } from "./move";
import { nature } from "./nature";
import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon";
import { pokemonForm } from "./pokemon-form";
import { pokemonForm, battlePokemonForm } from "./pokemon-form";
import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
@ -62,6 +62,7 @@ export const frConfig = {
battle: battle,
battleInfo: battleInfo,
battleMessageUiHandler: battleMessageUiHandler,
battlePokemonForm: battlePokemonForm,
battlerTags: battlerTags,
berry: berry,
bgmName: bgmName,

View File

@ -1,7 +1,6 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const pokemonForm: SimpleTranslationEntries = {
// Battle forms
export const battlePokemonForm: SimpleTranslationEntries = {
"mega": "Méga-{{pokemonName}}",
"mega-x": "Méga-{{pokemonName}} X",
"mega-y": "Méga-{{pokemonName}} Y",
@ -9,6 +8,14 @@ export const pokemonForm: SimpleTranslationEntries = {
"gigantamax": "{{pokemonName}} Gigamax",
"eternamax": "{{pokemonName}} Infinimax",
"megaChange": "{{preName}} méga-évolue\nen {{pokemonName}} !",
"gigantamaxChange": "{{preName}} se gigamaxe\nen {{pokemonName}} !",
"eternamaxChange": "{{preName}} devient\n{{pokemonName}} !",
"revertChange": "{{pokemonName}} retourne\nà sa forme initiale !",
"formChange": "{{preName}} change de forme !",
} as const;
export const pokemonForm: SimpleTranslationEntries = {
// Starters forms
// 1G
"pikachuCosplay": "Cosplayeur",

View File

@ -36,7 +36,7 @@ import { move } from "./move";
import { nature } from "./nature";
import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon";
import { pokemonForm } from "./pokemon-form";
import { pokemonForm, battlePokemonForm } from "./pokemon-form";
import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
@ -62,6 +62,7 @@ export const itConfig = {
battle: battle,
battleInfo: battleInfo,
battleMessageUiHandler: battleMessageUiHandler,
battlePokemonForm: battlePokemonForm,
battlerTags: battlerTags,
berry: berry,
bgmName: bgmName,

View File

@ -1,7 +1,6 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const pokemonForm: SimpleTranslationEntries = {
// Battle forms
export const battlePokemonForm: SimpleTranslationEntries = {
"mega": "Mega {{pokemonName}}",
"mega-x": "Mega {{pokemonName}} X",
"mega-y": "Mega {{pokemonName}} Y",
@ -9,6 +8,14 @@ export const pokemonForm: SimpleTranslationEntries = {
"gigantamax": "GigaMax {{pokemonName}}",
"eternamax": "EternaMax {{pokemonName}}",
"megaChange": "{{preName}} si evolve\nin {{pokemonName}}!",
"gigantamaxChange": "{{preName}} si Gigamaxxizza\nin {{pokemonName}}!",
"eternamaxChange": "{{preName}} si Dynamaxxa infinitamente\nin {{pokemonName}}!",
"revertChange": "{{pokemonName}} è tornato\nalla sua forma originaria!",
"formChange": "{{preName}} ha cambiato forma!",
} as const;
export const pokemonForm: SimpleTranslationEntries = {
// Starters forms
// 1G
"pikachuCosplay": "Cosplay",

View File

@ -1,4 +1,3 @@
import { pokemonForm } from "./pokemon-form";
import { ability } from "./ability";
import { abilityTriggers } from "./ability-trigger";
import { arenaFlyout } from "./arena-flyout";
@ -37,6 +36,7 @@ import { move } from "./move";
import { nature } from "./nature";
import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon";
import { pokemonForm, battlePokemonForm } from "./pokemon-form";
import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
@ -62,6 +62,7 @@ export const koConfig = {
battle: battle,
battleInfo: battleInfo,
battleMessageUiHandler: battleMessageUiHandler,
battlePokemonForm: battlePokemonForm,
battlerTags: battlerTags,
berry: berry,
bgmName: bgmName,

View File

@ -1,7 +1,6 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const pokemonForm: SimpleTranslationEntries = {
// Battle forms
export const battlePokemonForm: SimpleTranslationEntries = {
"mega": "메가{{pokemonName}}",
"mega-x": "메가{{pokemonName}}X",
"mega-y": "메가{{pokemonName}}Y",
@ -9,6 +8,14 @@ export const pokemonForm: SimpleTranslationEntries = {
"gigantamax": "거다이맥스 {{pokemonName}}",
"eternamax": "무한다이맥스 {{pokemonName}}",
"megaChange": "{{preName}}[[는]]\n{{pokemonName}}[[로]] 메가진화했다!",
"gigantamaxChange": "{{preName}}[[는]]\n{{pokemonName}}가 되었다!",
"eternamaxChange": "{{preName}}[[는]]\n{{pokemonName}}가 되었다!",
"revertChange": "{{pokemonName}}[[는]]\n원래 모습으로 되돌아왔다!",
"formChange": "{{preName}}[[는]]\n다른 모습으로 변화했다!",
} as const;
export const pokemonForm: SimpleTranslationEntries = {
// Starters forms
// 1G
"pikachuCosplay": "옷갈아입기",

View File

@ -39,7 +39,7 @@ import { nature } from "./nature";
import { partyUiHandler } from "./party-ui-handler";
import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon";
import { pokemonForm } from "./pokemon-form";
import { pokemonForm, battlePokemonForm } from "./pokemon-form";
import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
@ -62,6 +62,7 @@ export const ptBrConfig = {
battle: battle,
battleInfo: battleInfo,
battleMessageUiHandler: battleMessageUiHandler,
battlePokemonForm: battlePokemonForm,
battlerTags: battlerTags,
berry: berry,
bgmName: bgmName,

View File

@ -1,7 +1,6 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const pokemonForm: SimpleTranslationEntries = {
// Battle forms
export const battlePokemonForm: SimpleTranslationEntries = {
"mega": "Mega {{pokemonName}}",
"mega-x": "Mega {{pokemonName}} X",
"mega-y": "Mega {{pokemonName}} Y",
@ -9,6 +8,15 @@ export const pokemonForm: SimpleTranslationEntries = {
"gigantamax": "G-Max {{pokemonName}}",
"eternamax": "E-Max {{pokemonName}}",
"megaChange": "{{preName}} Mega Evoluiu\npara {{pokemonName}}!",
"gigantamaxChange": "{{preName}} Gigantamaxou\npara {{pokemonName}}!",
"eternamaxChange": "{{preName}} Eternamaxou\npara {{pokemonName}}!",
"revertChange": "{{pokemonName}} voltou\npara sua forma original!",
"formChange": "{{preName}} mudou de forma!",
} as const;
export const pokemonForm: SimpleTranslationEntries = {
// Starters forms
// 1G
"pikachuCosplay": "Cosplay",

View File

@ -36,7 +36,7 @@ import { move } from "./move";
import { nature } from "./nature";
import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon";
import { pokemonForm } from "./pokemon-form";
import { pokemonForm, battlePokemonForm } from "./pokemon-form";
import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
@ -62,6 +62,7 @@ export const zhCnConfig = {
battle: battle,
battleInfo: battleInfo,
battleMessageUiHandler: battleMessageUiHandler,
battlePokemonForm: battlePokemonForm,
battlerTags: battlerTags,
berry: berry,
bgmName: bgmName,

View File

@ -1,7 +1,6 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const pokemonForm: SimpleTranslationEntries = {
// Battle forms
export const battlePokemonForm: SimpleTranslationEntries = {
"mega": "Mega {{pokemonName}}",
"mega-x": "Mega {{pokemonName}} X",
"mega-y": "Mega {{pokemonName}} Y",
@ -9,6 +8,14 @@ export const pokemonForm: SimpleTranslationEntries = {
"gigantamax": "超极巨{{pokemonName}}",
"eternamax": "无极巨{{pokemonName}}",
"megaChange": "{{preName}}超级进化成了\n{{pokemonName}}",
"gigantamaxChange": "{{preName}}超极巨化成了\n{{pokemonName}}",
"eternamaxChange": "{{preName}}无极巨化成了\n{{pokemonName}}",
"revertChange": "{{pokemonName}}变回了\n原本的样子",
"formChange": "{{preName}}变成其他样子了。",
} as const;
export const pokemonForm: SimpleTranslationEntries = {
// Starters forms
// 1G
"pikachuCosplay": "服装",

View File

@ -36,7 +36,7 @@ import { move } from "./move";
import { nature } from "./nature";
import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon";
import { pokemonForm } from "./pokemon-form";
import { pokemonForm, battlePokemonForm } from "./pokemon-form";
import { pokemonInfo } from "./pokemon-info";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { pokemonSummary } from "./pokemon-summary";
@ -62,6 +62,7 @@ export const zhTwConfig = {
battle: battle,
battleInfo: battleInfo,
battleMessageUiHandler: battleMessageUiHandler,
battlePokemonForm: battlePokemonForm,
battlerTags: battlerTags,
berry: berry,
bgmName: bgmName,

View File

@ -1,7 +1,6 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const pokemonForm: SimpleTranslationEntries = {
// Battle forms
export const battlePokemonForm: SimpleTranslationEntries = {
"mega": "Mega {{pokemonName}}",
"mega-x": "Mega {{pokemonName}} X",
"mega-y": "Mega {{pokemonName}} Y",
@ -9,6 +8,14 @@ export const pokemonForm: SimpleTranslationEntries = {
"gigantamax": "G-Max {{pokemonName}}",
"eternamax": "E-Max {{pokemonName}}",
"megaChange": "{{preName}}超級進化成了\n{{pokemonName}}",
"gigantamaxChange": "{{preName}}超極巨化成了\n{{pokemonName}}",
"eternamaxChange": "{{preName}}無極巨化成了\n{{pokemonName}}",
"revertChange": "{{pokemonName}}變回了\n原本的樣子",
"formChange": "{{preName}}變為其他樣子了。",
} as const;
export const pokemonForm: SimpleTranslationEntries = {
// Starters forms
// 1G
"pikachuCosplay": "Cosplay",