From 0d9dd1dfc8c5d2161c1f613e0aac5bff19bd359f Mon Sep 17 00:00:00 2001 From: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Date: Mon, 8 Jul 2024 22:25:46 +0800 Subject: [PATCH] Localized moneyPickedUp message (#2788) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Localized moneyPickedUp message * Update src/locales/ko/battle.ts Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com> * Update src/locales/fr/battle.ts Co-authored-by: Lugiad' * Update src/locales/de/battle.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/pt_BR/battle.ts Co-authored-by: José Ricardo Fleury Oliveira * Update battle.ts * Update battle.ts --------- Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com> Co-authored-by: Lugiad' Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira --- src/battle.ts | 6 +++++- src/locales/de/battle.ts | 1 + src/locales/en/battle.ts | 1 + src/locales/es/battle.ts | 1 + src/locales/fr/battle.ts | 1 + src/locales/it/battle.ts | 1 + src/locales/ko/battle.ts | 1 + src/locales/pt_BR/battle.ts | 1 + src/locales/zh_CN/battle.ts | 1 + src/locales/zh_TW/battle.ts | 1 + 10 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/battle.ts b/src/battle.ts index c3a481e9956..3f2519df3e8 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -13,6 +13,7 @@ import { Moves } from "#enums/moves"; import { PlayerGender } from "#enums/player-gender"; import { Species } from "#enums/species"; import { TrainerType } from "#enums/trainer-type"; +import i18next from "#app/plugins/i18n"; export enum BattleType { WILD, @@ -173,7 +174,10 @@ export default class Battle { scene.addMoney(moneyAmount.value); - scene.queueMessage(`You picked up ₽${moneyAmount.value.toLocaleString("en-US")}!`, null, true); + const userLocale = navigator.language || "en-US"; + const formattedMoneyAmount = moneyAmount.value.toLocaleString(userLocale); + const message = i18next.t("battle:moneyPickedUp", { moneyAmount: formattedMoneyAmount }); + scene.queueMessage(message, null, true); scene.currentBattle.moneyScattered = 0; } diff --git a/src/locales/de/battle.ts b/src/locales/de/battle.ts index 099020d46d5..06b9ec719ba 100644 --- a/src/locales/de/battle.ts +++ b/src/locales/de/battle.ts @@ -14,6 +14,7 @@ export const battle: SimpleTranslationEntries = { "switchQuestion": "Möchtest du\n{{pokemonName}} auswechseln?", "trainerDefeated": "{{trainerName}}\nwurde besiegt!", "moneyWon": "Du gewinnst\n{{moneyAmount}} ₽!", + "moneyPickedUp": "Du hebst {{moneyAmount}} ₽ auf!", "pokemonCaught": "{{pokemonName}} wurde gefangen!", "addedAsAStarter": "{{pokemonName}} wurde als Starterpokémon hinzugefügt!", "partyFull": "Dein Team ist voll.\nMöchtest du ein Pokémon durch {{pokemonName}} ersetzen?", diff --git a/src/locales/en/battle.ts b/src/locales/en/battle.ts index a42743ef254..c7e2ef96be4 100644 --- a/src/locales/en/battle.ts +++ b/src/locales/en/battle.ts @@ -14,6 +14,7 @@ export const battle: SimpleTranslationEntries = { "switchQuestion": "Will you switch\n{{pokemonName}}?", "trainerDefeated": "You defeated\n{{trainerName}}!", "moneyWon": "You got\n₽{{moneyAmount}} for winning!", + "moneyPickedUp": "You picked up ₽{{moneyAmount}}!", "pokemonCaught": "{{pokemonName}} was caught!", "addedAsAStarter": "{{pokemonName}} has been\nadded as a starter!", "partyFull": "Your party is full.\nRelease a Pokémon to make room for {{pokemonName}}?", diff --git a/src/locales/es/battle.ts b/src/locales/es/battle.ts index ddba5fab9a8..bc0dd1e4b78 100644 --- a/src/locales/es/battle.ts +++ b/src/locales/es/battle.ts @@ -14,6 +14,7 @@ export const battle: SimpleTranslationEntries = { "switchQuestion": "¿Quieres cambiar a\n{{pokemonName}}?", "trainerDefeated": "¡Has derrotado a\n{{trainerName}}!", "moneyWon": "¡Has ganado\n₽{{moneyAmount}} por vencer!", + "moneyPickedUp": "You picked up ₽{{moneyAmount}}!", "pokemonCaught": "¡{{pokemonName}} atrapado!", "addedAsAStarter": "{{pokemonName}} ha sido añadido\na tus iniciales!", "partyFull": "Tu equipo esta completo.\n¿Quieres liberar un Pokémon para meter a {{pokemonName}}?", diff --git a/src/locales/fr/battle.ts b/src/locales/fr/battle.ts index 5bcf0763ef0..fc155664aaa 100644 --- a/src/locales/fr/battle.ts +++ b/src/locales/fr/battle.ts @@ -14,6 +14,7 @@ export const battle: SimpleTranslationEntries = { "switchQuestion": "Voulez-vous changer\nvotre {{pokemonName}} ?", "trainerDefeated": "Vous avez battu\n{{trainerName}} !", "moneyWon": "Vous remportez\n{{moneyAmount}} ₽ !", + "moneyPickedUp": "Vous obtenez {{moneyAmount}} ₽ !", "pokemonCaught": "Vous avez attrapé {{pokemonName}} !", "addedAsAStarter": "{{pokemonName}} est ajouté\ncomme starter !", "partyFull": "Votre équipe est pleine.\nRelâcher un Pokémon pour {{pokemonName}} ?", diff --git a/src/locales/it/battle.ts b/src/locales/it/battle.ts index f44ca8e493c..787888e333b 100644 --- a/src/locales/it/battle.ts +++ b/src/locales/it/battle.ts @@ -14,6 +14,7 @@ export const battle: SimpleTranslationEntries = { "switchQuestion": "Vuoi cambiare\n{{pokemonName}}?", "trainerDefeated": "Hai sconfitto\n{{trainerName}}!", "moneyWon": "Hai vinto {{moneyAmount}}₽", + "moneyPickedUp": "You picked up ₽{{moneyAmount}}!", "pokemonCaught": "Preso! {{pokemonName}} è stato catturato!", "addedAsAStarter": "{{pokemonName}} has been\nadded as a starter!", "partyFull": "La tua squadra è al completo.\nVuoi liberare un Pokémon per far spazio a {{pokemonName}}?", diff --git a/src/locales/ko/battle.ts b/src/locales/ko/battle.ts index 25ff106946b..dbb425da63f 100644 --- a/src/locales/ko/battle.ts +++ b/src/locales/ko/battle.ts @@ -14,6 +14,7 @@ export const battle: SimpleTranslationEntries = { "switchQuestion": "{{pokemonName}}[[를]]\n교체하시겠습니까?", "trainerDefeated": "{{trainerName}}[[와]]의\n승부에서 이겼다!", "moneyWon": "상금으로\n₽{{moneyAmount}}을 손에 넣었다!", + "moneyPickedUp": "₽{{moneyAmount}}을 주웠다!", "pokemonCaught": "신난다-!\n{{pokemonName}}[[를]] 잡았다!", "addedAsAStarter": "{{pokemonName}}[[가]]\n스타팅 포켓몬에 추가되었다!", "partyFull": "지닌 포켓몬이 가득 찼습니다. {{pokemonName}}[[를]]\n대신해 포켓몬을 놓아주시겠습니까?", diff --git a/src/locales/pt_BR/battle.ts b/src/locales/pt_BR/battle.ts index b63a03b25cf..8c97d2be6de 100644 --- a/src/locales/pt_BR/battle.ts +++ b/src/locales/pt_BR/battle.ts @@ -14,6 +14,7 @@ export const battle: SimpleTranslationEntries = { "switchQuestion": "Quer trocar\nde {{pokemonName}}?", "trainerDefeated": "Você derrotou\n{{trainerName}}!", "moneyWon": "Você ganhou\n₽{{moneyAmount}} por ganhar!", + "moneyPickedUp": "Você pegou ₽{{moneyAmount}} do chão!", "pokemonCaught": "{{pokemonName}} foi capturado!", "addedAsAStarter": "{{pokemonName}} foi adicionado\naos seus iniciais!", "partyFull": "Sua equipe está cheia.\nSolte um Pokémon para ter espaço para {{pokemonName}}?", diff --git a/src/locales/zh_CN/battle.ts b/src/locales/zh_CN/battle.ts index d8388064bd7..ff2e90a2c59 100644 --- a/src/locales/zh_CN/battle.ts +++ b/src/locales/zh_CN/battle.ts @@ -14,6 +14,7 @@ export const battle: SimpleTranslationEntries = { "switchQuestion": "要更换\n{{pokemonName}}吗?", "trainerDefeated": "你击败了\n{{trainerName}}!", "moneyWon": "你赢得了\n₽{{moneyAmount}}!", + "moneyPickedUp": "捡到了 ₽{{moneyAmount}}!", "pokemonCaught": "{{pokemonName}}被抓住了!", "addedAsAStarter": "增加了{{pokemonName}}作为\n一个新的基础宝可梦!", "partyFull": "你的队伍已满员。是否放生其他宝可梦\n为{{pokemonName}}腾出空间?", diff --git a/src/locales/zh_TW/battle.ts b/src/locales/zh_TW/battle.ts index bfd3885ca31..bc7b712185a 100644 --- a/src/locales/zh_TW/battle.ts +++ b/src/locales/zh_TW/battle.ts @@ -12,6 +12,7 @@ export const battle: SimpleTranslationEntries = { "trainerGo": "{{trainerName}} 派出了 {{pokemonName}}!", "switchQuestion": "要更換\n{{pokemonName}}嗎?", "trainerDefeated": "你擊敗了\n{{trainerName}}!", + "moneyPickedUp": "撿到了 ₽{{moneyAmount}}!", "pokemonCaught": "{{pokemonName}} 被抓住了!", "addedAsAStarter": "{{pokemonName}} has been\nadded as a starter!", "pokemon": "寶可夢",