Localization: Localized Gacha Machine Names (#2645)
* Localization: Localized Gacha Machine Names * Update src/locales/zh_TW/egg.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/zh_TW/egg.ts Co-authored-by: Enoch <enoch.jwsong@gmail.com> * Update src/locales/de/egg.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/fr/egg.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/ko/egg.ts Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> * Update src/locales/zh_TW/egg.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/zh_CN/egg.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/es/egg.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update Brazilian Portuguese translation for egg.ts * added smaller text size option * update egg.ts translations for German and Brazilian Portuguese * some updates * update egg.ts translations for Spanish and Brazilian Portuguese * Update EggGachaUiHandler to use array.includes for language check * update German translation for legendary egg gatcha * Update src/locales/es/egg.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * update translations for egg.ts in Spanish and Brazilian Portuguese --------- 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: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
This commit is contained in:
parent
2bfefa630b
commit
04d456a60e
|
@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = {
|
|||
"hatchFromTheEgg": "Ein {{pokemonName}} ist aus dem Ei geschlüpft!",
|
||||
"eggMoveUnlock": "Ei-Attacke freigeschaltet: {{moveName}}",
|
||||
"rareEggMoveUnlock": "Seltene Ei-Attacke freigeschaltet: {{moveName}}",
|
||||
"moveUPGacha": "Mehr\nEi-Attacken!",
|
||||
"shinyUPGacha": "Mehr\nSchillernde!",
|
||||
"legendaryUPGacha": "erscheint\nöfter!",
|
||||
} as const;
|
||||
|
|
|
@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = {
|
|||
"hatchFromTheEgg": "{{pokemonName}} hatched from the egg!",
|
||||
"eggMoveUnlock": "Egg Move unlocked: {{moveName}}",
|
||||
"rareEggMoveUnlock": "Rare Egg Move unlocked: {{moveName}}",
|
||||
"moveUPGacha": "Move UP!",
|
||||
"shinyUPGacha": "Shiny UP!",
|
||||
"legendaryUPGacha": "UP!",
|
||||
} as const;
|
||||
|
|
|
@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = {
|
|||
"hatchFromTheEgg": "¡Ha salido un {{pokemonName}} del Huevo!",
|
||||
"eggMoveUnlock": "Mov. Huevo desbloqueado:\n{{moveName}}",
|
||||
"rareEggMoveUnlock": "Mov. Huevo Raro desbloqueado:\n{{moveName}}",
|
||||
"moveUPGacha": "¡Más Mov.\nHuevo Raro!",
|
||||
"shinyUPGacha": "¡Más Shiny!",
|
||||
"legendaryUPGacha": ", ¡mayor\nprob.!",
|
||||
} as const;
|
||||
|
|
|
@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = {
|
|||
"hatchFromTheEgg": "{{pokemonName}} sort de l’Œuf !",
|
||||
"eggMoveUnlock": "Capacité Œuf débloquée :\n{{moveName}}",
|
||||
"rareEggMoveUnlock": "Capacité Œuf Rare débloquée :\n{{moveName}}",
|
||||
"moveUPGacha": "Bonus Capacité\nŒuf Rare !",
|
||||
"shinyUPGacha": "Bonus\nChromatique !",
|
||||
"legendaryUPGacha": "Bonus !",
|
||||
} as const;
|
||||
|
|
|
@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = {
|
|||
"hatchFromTheEgg": "Dall’Uovo è nato {{pokemonName}}!",
|
||||
"eggMoveUnlock": "Egg Move unlocked: {{moveName}}",
|
||||
"rareEggMoveUnlock": "Rare Egg Move unlocked: {{moveName}}",
|
||||
"moveUPGacha": "Move UP!",
|
||||
"shinyUPGacha": "Shiny UP!",
|
||||
"legendaryUPGacha": "UP!",
|
||||
} as const;
|
||||
|
|
|
@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = {
|
|||
"hatchFromTheEgg": "알이 부화해서\n{{pokemonName}}[[가]] 태어났다!",
|
||||
"eggMoveUnlock": "알 기술 {{moveName}}[[를]]\n사용할 수 있게 되었다!",
|
||||
"rareEggMoveUnlock": "레어 알 기술 {{moveName}}[[를]]\n사용할 수 있게 되었다!",
|
||||
"moveUPGacha": "기술 UP!",
|
||||
"shinyUPGacha": "특별색 UP!",
|
||||
"legendaryUPGacha": "UP!",
|
||||
} as const;
|
||||
|
|
|
@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = {
|
|||
"hatchFromTheEgg": "{{pokemonName}} nasceu do ovo!",
|
||||
"eggMoveUnlock": "Movimento de Ovo desbloqueado: {{moveName}}",
|
||||
"rareEggMoveUnlock": "Movimento Raro de Ovo desbloqueado: {{moveName}}",
|
||||
"moveUPGacha": "Movimento\nde Ovo Bônus!",
|
||||
"shinyUPGacha": "Shiny Bônus!",
|
||||
"legendaryUPGacha": "Bônus!",
|
||||
} as const;
|
||||
|
|
|
@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = {
|
|||
"hatchFromTheEgg": "{{pokemonName}} 从蛋中孵化了!",
|
||||
"eggMoveUnlock": "蛋招式已解锁: {{moveName}}",
|
||||
"rareEggMoveUnlock": "稀有蛋招式已解锁: {{moveName}}",
|
||||
"moveUPGacha": "蛋招式UP!",
|
||||
"shinyUPGacha": "闪光UP!",
|
||||
"legendaryUPGacha": "UP!",
|
||||
} as const;
|
||||
|
|
|
@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = {
|
|||
"hatchFromTheEgg": "{{pokemonName}} 從蛋中孵化了!",
|
||||
"eggMoveUnlock": "蛋招式已解鎖: {{moveName}}",
|
||||
"rareEggMoveUnlock": "稀有蛋招式已解鎖: {{moveName}}",
|
||||
"moveUPGacha": "蛋招式UP!",
|
||||
"shinyUPGacha": "闪光UP!",
|
||||
"legendaryUPGacha": "UP!",
|
||||
} as const;
|
||||
|
|
|
@ -96,25 +96,71 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
|||
|
||||
const gachaInfoContainer = this.scene.add.container(160, 46);
|
||||
|
||||
const gachaUpLabel = addTextObject(this.scene, 4, 0, "UP!", TextStyle.WINDOW_ALT);
|
||||
const currentLanguage = i18next.resolvedLanguage;
|
||||
let gachaTextStyle = TextStyle.WINDOW_ALT;
|
||||
let gachaX = 4;
|
||||
let gachaY = 0;
|
||||
let pokemonIconX = -20;
|
||||
let pokemonIconY = 6;
|
||||
|
||||
if (["de", "es", "fr", "pt-BR"].includes(currentLanguage)) {
|
||||
gachaTextStyle = TextStyle.SMALLER_WINDOW_ALT;
|
||||
gachaX = 2;
|
||||
gachaY = 2;
|
||||
}
|
||||
|
||||
let legendaryLabelX = gachaX;
|
||||
let legendaryLabelY = gachaY;
|
||||
if (["de", "es"].includes(currentLanguage)) {
|
||||
pokemonIconX = -25;
|
||||
pokemonIconY = 10;
|
||||
legendaryLabelX = -6;
|
||||
legendaryLabelY = 0;
|
||||
}
|
||||
|
||||
const gachaUpLabel = addTextObject(this.scene, gachaX, gachaY, i18next.t("egg:legendaryUPGacha"), gachaTextStyle);
|
||||
gachaUpLabel.setOrigin(0, 0);
|
||||
gachaInfoContainer.add(gachaUpLabel);
|
||||
|
||||
switch (gachaType as GachaType) {
|
||||
case GachaType.LEGENDARY:
|
||||
const pokemonIcon = this.scene.add.sprite(-20, 6, "pokemon_icons_0");
|
||||
if (["de", "es"].includes(currentLanguage)) {
|
||||
gachaUpLabel.setAlign("center");
|
||||
gachaUpLabel.setY(0);
|
||||
}
|
||||
if (["pt-BR"].includes(currentLanguage)) {
|
||||
gachaUpLabel.setX(legendaryLabelX - 2);
|
||||
} else {
|
||||
gachaUpLabel.setX(legendaryLabelX);
|
||||
}
|
||||
gachaUpLabel.setY(legendaryLabelY);
|
||||
|
||||
const pokemonIcon = this.scene.add.sprite(pokemonIconX, pokemonIconY, "pokemon_icons_0");
|
||||
if (["pt-BR"].includes(currentLanguage)) {
|
||||
pokemonIcon.setX(pokemonIconX - 2);
|
||||
}
|
||||
pokemonIcon.setScale(0.5);
|
||||
pokemonIcon.setOrigin(0, 0.5);
|
||||
|
||||
gachaInfoContainer.add(pokemonIcon);
|
||||
break;
|
||||
case GachaType.MOVE:
|
||||
gachaUpLabel.setText("Move UP!");
|
||||
if (["de", "es", "fr", "pt-BR"].includes(currentLanguage)) {
|
||||
gachaUpLabel.setAlign("center");
|
||||
gachaUpLabel.setY(0);
|
||||
}
|
||||
|
||||
gachaUpLabel.setText(i18next.t("egg:moveUPGacha"));
|
||||
gachaUpLabel.setX(0);
|
||||
gachaUpLabel.setOrigin(0.5, 0);
|
||||
break;
|
||||
case GachaType.SHINY:
|
||||
gachaUpLabel.setText("Shiny UP!");
|
||||
if (["de", "fr"].includes(currentLanguage)) {
|
||||
gachaUpLabel.setAlign("center");
|
||||
gachaUpLabel.setY(0);
|
||||
}
|
||||
|
||||
gachaUpLabel.setText(i18next.t("egg:shinyUPGacha"));
|
||||
gachaUpLabel.setX(0);
|
||||
gachaUpLabel.setOrigin(0.5, 0);
|
||||
break;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { EggTier } from "#enums/egg-type";
|
||||
import { UiTheme } from "#enums/ui-theme";
|
||||
import Phaser from "phaser";
|
||||
import BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText";
|
||||
import InputText from "phaser3-rex-plugins/plugins/inputtext";
|
||||
import BattleScene from "../battle-scene";
|
||||
import { ModifierTier } from "../modifier/modifier-tier";
|
||||
import Phaser from "phaser";
|
||||
import { EggTier } from "#enums/egg-type";
|
||||
import { UiTheme } from "#enums/ui-theme";
|
||||
|
||||
export enum TextStyle {
|
||||
MESSAGE,
|
||||
|
@ -33,7 +33,8 @@ export enum TextStyle {
|
|||
MOVE_PP_FULL,
|
||||
MOVE_PP_HALF_FULL,
|
||||
MOVE_PP_NEAR_EMPTY,
|
||||
MOVE_PP_EMPTY
|
||||
MOVE_PP_EMPTY,
|
||||
SMALLER_WINDOW_ALT
|
||||
}
|
||||
|
||||
export function addTextObject(scene: Phaser.Scene, x: number, y: number, content: string, style: TextStyle, extraStyleOptions?: Phaser.Types.GameObjects.Text.TextStyle): Phaser.GameObjects.Text {
|
||||
|
@ -140,6 +141,11 @@ export function getTextStyleOptions(style: TextStyle, uiTheme: UiTheme, extraSty
|
|||
shadowXpos = 3;
|
||||
shadowYpos = 3;
|
||||
break;
|
||||
case TextStyle.SMALLER_WINDOW_ALT:
|
||||
styleOptions.fontSize = defaultFontSize - 36;
|
||||
shadowXpos = 3;
|
||||
shadowYpos = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
const shadowColor = getTextColor(style, true, uiTheme);
|
||||
|
@ -227,6 +233,8 @@ export function getTextColor(textStyle: TextStyle, shadow?: boolean, uiTheme: Ui
|
|||
return !shadow ? "#f8b050" : "#c07800";
|
||||
case TextStyle.SETTINGS_SELECTED:
|
||||
return !shadow ? "#f88880" : "#f83018";
|
||||
case TextStyle.SMALLER_WINDOW_ALT:
|
||||
return !shadow ? "#484848" : "#d0d0c8";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue