From 5ec8bf16207177e8f7e615cbaf20d62c006a3dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Ricardo=20Fleury=20Oliveira?= Date: Thu, 27 Jun 2024 16:33:58 -0300 Subject: [PATCH] Localization: Localized error message for server connection issue (#2598) * Localization: localized error message for server connection issue * forgor about the portuguese translation * Update src/locales/fr/menu.ts Co-authored-by: Lugiad' * switched the chinese and portuguese translations * Update src/locales/de/menu.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/zh_CN/menu.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/ko/menu.ts Co-authored-by: Enoch * updated pt translation * last german fix * Update src/locales/es/menu.ts Co-authored-by: Arxxer --------- Co-authored-by: Lugiad' Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Enoch Co-authored-by: Arxxer --- src/locales/de/menu.ts | 1 + src/locales/en/menu.ts | 1 + src/locales/es/menu.ts | 1 + src/locales/fr/menu.ts | 1 + src/locales/it/menu.ts | 1 + src/locales/ko/menu.ts | 1 + src/locales/pt_BR/menu.ts | 1 + src/locales/zh_CN/menu.ts | 1 + src/locales/zh_TW/menu.ts | 1 + src/ui/unavailable-modal-ui-handler.ts | 3 ++- 10 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/locales/de/menu.ts b/src/locales/de/menu.ts index 8f8beffc2cb1..5bbd19be8513 100644 --- a/src/locales/de/menu.ts +++ b/src/locales/de/menu.ts @@ -54,4 +54,5 @@ export const menu: SimpleTranslationEntries = { "disclaimer": "HAFTUNGSAUSSCHLUSS", "disclaimerDescription": "Dieses Spiel ist ein unfertiges Produkt. Es kann spielbeinträchtigende Fehler (bis hin zum Verlust des Speicherstandes)\n aufweisen, sich ohne Vorankündigung ändern und es gibt keine Garantie dass es weiterentwickelt oder fertiggestellt wird.", "choosePokemon": "Choose a Pokémon.", + "errorServerDown": "Ups! Es gab einen Fehler beim Versuch\nden Server zu kontaktieren\nLasse dieses Fenster offen\nDu wirst automatisch neu verbunden.", } as const; diff --git a/src/locales/en/menu.ts b/src/locales/en/menu.ts index 9be87724ea83..47d19bd56b6f 100644 --- a/src/locales/en/menu.ts +++ b/src/locales/en/menu.ts @@ -54,4 +54,5 @@ export const menu: SimpleTranslationEntries = { "disclaimer": "DISCLAIMER", "disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed.", "choosePokemon": "Choose a Pokémon.", + "errorServerDown": "Oops! There was an issue contacting the server.\n\nYou may leave this window open,\nthe game will automatically reconnect.", } as const; diff --git a/src/locales/es/menu.ts b/src/locales/es/menu.ts index d5030c8d98ca..8176af456e11 100644 --- a/src/locales/es/menu.ts +++ b/src/locales/es/menu.ts @@ -54,4 +54,5 @@ export const menu: SimpleTranslationEntries = { "disclaimer": "AVISO", "disclaimerDescription": "Este juego es un producto inacabado; puede tener problemas de jugabilidad (incluyendo la posible pérdida\n de datos de guardado),cambiar sin avisar, y puede o no puede ser actualizado hasta ser completado.", "choosePokemon": "Choose a Pokémon.", + "errorServerDown": "¡Ups! Ha habido un problema al contactar con el servidor.\n\nPuedes mantener esta ventana abierta,\nel juego se reconectará automáticamente.", } as const; diff --git a/src/locales/fr/menu.ts b/src/locales/fr/menu.ts index 8ed1273d6f7a..0402bd4bfda8 100644 --- a/src/locales/fr/menu.ts +++ b/src/locales/fr/menu.ts @@ -49,4 +49,5 @@ export const menu: SimpleTranslationEntries = { "disclaimer": "AVERTISSEMENT", "disclaimerDescription": "Ce jeu n’est pas un produit fini et peut contenir des problèmes de jouabilité, dont de possibles pertes de sauvegardes,\ndes modifications sans avertissement et pourrait ou non encore être mis à jour ou terminé.", "choosePokemon": "Sélectionnez un Pokémon.", + "errorServerDown": "Oupsi ! Un problème de connexion au serveur est survenu.\n\nVous pouvez garder cette fenêtre ouverte,\nle jeu se reconnectera automatiquement.", } as const; diff --git a/src/locales/it/menu.ts b/src/locales/it/menu.ts index 91d2a0251ce6..3336373a6c3f 100644 --- a/src/locales/it/menu.ts +++ b/src/locales/it/menu.ts @@ -54,4 +54,5 @@ export const menu: SimpleTranslationEntries = { "disclaimer": "DISCLAIMER", "disclaimerDescription": "Questo gioco è un prodotto incompleto; si potrebbero riscontrare errori (inclusa la perdita dei dati di salvataggio),\ncambiamenti impercettibili, e non è detto che venga aggiornato nel tempo o mai completato del tutto.", "choosePokemon": "Choose a Pokémon.", + "errorServerDown": "Oops! There was an issue contacting the server.\n\nYou may leave this window open,\nthe game will automatically reconnect.", } as const; diff --git a/src/locales/ko/menu.ts b/src/locales/ko/menu.ts index 7e0b61ef9925..cf72dab8a376 100644 --- a/src/locales/ko/menu.ts +++ b/src/locales/ko/menu.ts @@ -54,4 +54,5 @@ export const menu: SimpleTranslationEntries = { "disclaimer": "면책 조항", "disclaimerDescription": "이 게임은 완전히 개발되지 않았습니다- (세이브 데이터 소실을 포함) 플레이에 지장을 주는 문제가 생길 수 있으며,\n공지 없이 업데이트가 진행 혹은 중지될 수 있습니다.", "choosePokemon": "포켓몬을 선택하세요.", + "errorServerDown": "서버 연결 중 문제가 발생했습니다.\n\n이 창을 종료하지 않고 두면,\n게임은 자동으로 재접속됩니다.", } as const; diff --git a/src/locales/pt_BR/menu.ts b/src/locales/pt_BR/menu.ts index ea6c94fe509a..a200f2c9abe2 100644 --- a/src/locales/pt_BR/menu.ts +++ b/src/locales/pt_BR/menu.ts @@ -54,4 +54,5 @@ export const menu: SimpleTranslationEntries = { "disclaimer": "AVISO", "disclaimerDescription": "Este jogo é um produto inacabado; ele pode ter problemas de jogabilidade (incluindo possíveis\n perdas de dados salvos), sofrer alterações sem aviso prévio e pode ou não ser atualizado ou concluído.", "choosePokemon": "Escolha um Pokémon.", + "errorServerDown": "Opa! Não foi possível conectar-se ao servidor.\n\nVocê pode deixar essa janela aberta,\npois o jogo irá se reconectar automaticamente.", } as const; diff --git a/src/locales/zh_CN/menu.ts b/src/locales/zh_CN/menu.ts index 418693cc140a..c19c41333e86 100644 --- a/src/locales/zh_CN/menu.ts +++ b/src/locales/zh_CN/menu.ts @@ -54,4 +54,5 @@ export const menu: SimpleTranslationEntries = { "disclaimer": "免责声明", "disclaimerDescription": "这个游戏尚未完成; 可能存在游戏性问题(包括潜在的丢档风险)、\n 不经通知的调整、 未来可能会更新或完成更多内容", "choosePokemon": "选择一只宝可梦。", + "errorServerDown": "糟糕!访问服务器时发生了错误。\n\n你可以保持页面开启,\n游戏会自动重新连接。", } as const; diff --git a/src/locales/zh_TW/menu.ts b/src/locales/zh_TW/menu.ts index 4ecaf8d4d9df..6d89bc256c69 100644 --- a/src/locales/zh_TW/menu.ts +++ b/src/locales/zh_TW/menu.ts @@ -54,4 +54,5 @@ export const menu: SimpleTranslationEntries = { "disclaimer": "DISCLAIMER", "disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed.", "choosePokemon": "Choose a Pokémon.", + "errorServerDown": "Oops! There was an issue contacting the server.\n\nYou may leave this window open,\nthe game will automatically reconnect.", } as const; diff --git a/src/ui/unavailable-modal-ui-handler.ts b/src/ui/unavailable-modal-ui-handler.ts index cddcde2a1b38..2f6e1c08832d 100644 --- a/src/ui/unavailable-modal-ui-handler.ts +++ b/src/ui/unavailable-modal-ui-handler.ts @@ -4,6 +4,7 @@ import { addTextObject, TextStyle } from "./text"; import { Mode } from "./ui"; import { updateUserInfo } from "#app/account"; import * as Utils from "#app/utils"; +import i18next from "i18next"; export default class UnavailableModalUiHandler extends ModalUiHandler { private reconnectTimer: NodeJS.Timeout; @@ -43,7 +44,7 @@ export default class UnavailableModalUiHandler extends ModalUiHandler { setup(): void { super.setup(); - const label = addTextObject(this.scene, this.getWidth() / 2, this.getHeight() / 2, "Oops! There was an issue contacting the server.\n\nYou may leave this window open,\nthe game will automatically reconnect.", TextStyle.WINDOW, { fontSize: "48px", align: "center" }); + const label = addTextObject(this.scene, this.getWidth() / 2, this.getHeight() / 2, i18next.t("menu:errorServerDown"), TextStyle.WINDOW, { fontSize: "48px", align: "center" }); label.setOrigin(0.5, 0.5); this.modalContainer.add(label);