From 8c14324cb3faf3af0d48e670df74bcb44aa2eefe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9A=E7=BE=85=E7=8B=BC?= Date: Tue, 23 May 2023 09:47:02 +0800 Subject: [PATCH] Update i18n --- modules/_arcaea/_locales/en_us.json | 2 +- modules/_arcaea/_locales/zh_cn.json | 2 +- modules/_arcaea/_locales/zh_tw.json | 2 +- modules/arcaea/__init__.py | 10 +++++----- modules/arcaea/locales/en_us.json | 2 +- modules/arcaea/locales/zh_cn.json | 2 +- modules/arcaea/locales/zh_tw.json | 2 +- modules/mcv/locales/en_us.json | 2 +- modules/mcv/locales/zh_cn.json | 2 +- modules/mcv/locales/zh_tw.json | 2 +- modules/mcv/mcv.py | 4 ++-- modules/phigros/locales/zh_cn.json | 4 ++-- modules/phigros/locales/zh_tw.json | 5 +++-- 13 files changed, 21 insertions(+), 20 deletions(-) diff --git a/modules/_arcaea/_locales/en_us.json b/modules/_arcaea/_locales/en_us.json index 7b93fb6c..184b2d7c 100644 --- a/modules/_arcaea/_locales/en_us.json +++ b/modules/_arcaea/_locales/en_us.json @@ -39,7 +39,7 @@ "arcaea.message.download.success": "Current latest version is ${version}.\nDownload: ${url}", "arcaea.message.failed": "Failed to query.", "arcaea.message.failed.errcode": "Failed to query: ", - "arcaea.message.failed.fetch": "Failed to fetch.", + "arcaea.message.get_failed": "Failed to fetch.", "arcaea.message.info.result": "Recent play record of ${username} (${potential}): \n${trackname} (${difficulty})\nScore: ${score}\nPure: ${pure} (${shiny_pure})\nFar: ${far}\nLost: ${lost}\nPotential: ${realptt} -> ${ptt}\nTime: ${time_played} (UTC+8)", "arcaea.message.info.result.none": "This user has no play record.", "arcaea.message.initialize.not_found": "arc.apk not found!", diff --git a/modules/_arcaea/_locales/zh_cn.json b/modules/_arcaea/_locales/zh_cn.json index 5b0b7ef7..ad77433c 100644 --- a/modules/_arcaea/_locales/zh_cn.json +++ b/modules/_arcaea/_locales/zh_cn.json @@ -39,7 +39,7 @@ "arcaea.message.download.success": "目前的最新版本为 ${version}。\n下载地址:${url}", "arcaea.message.failed": "查询失败。", "arcaea.message.failed.errcode": "查询失败:", - "arcaea.message.failed.fetch": "获取失败。", + "arcaea.message.get_failed": "获取失败。", "arcaea.message.info.result": "${username} (${potential}) 的最近游玩记录:\n${trackname}(${difficulty})\n分数:${score}\nPure:${pure} (${shiny_pure})\nFar:${far}\nLost:${lost}\n潜力值:${realptt} -> ${ptt}\n时间:${time_played} (UTC+8)", "arcaea.message.info.result.none": "此用户无游玩记录。", "arcaea.message.initialize.not_found": "未找到 arc.apk!", diff --git a/modules/_arcaea/_locales/zh_tw.json b/modules/_arcaea/_locales/zh_tw.json index f78ff02a..c5aa76ae 100644 --- a/modules/_arcaea/_locales/zh_tw.json +++ b/modules/_arcaea/_locales/zh_tw.json @@ -39,7 +39,7 @@ "arcaea.message.download.success": "目前的最新版本為 ${version}。\n下載網址:${url}", "arcaea.message.failed": "查詢失敗。", "arcaea.message.failed.errcode": "查詢失敗:", - "arcaea.message.failed.fetch": "取得失敗。", + "arcaea.message.get_failed": "取得失敗。", "arcaea.message.info.result": "${username} (${potential}) 的最近遊玩紀錄:\n${trackname}(${difficulty})\n分數:${score}\nPure:${pure} (${shiny_pure})\nFar:${far}\nLost:${lost}\n潛力值:${realptt} -> ${ptt}\n時間:${time_played} (UTC+8)", "arcaea.message.info.result.none": "此使用者無遊玩紀錄。", "arcaea.message.initialize.not_found": "找不到 arc.apk!", diff --git a/modules/arcaea/__init__.py b/modules/arcaea/__init__.py index 2eeabdce..91d9e86d 100644 --- a/modules/arcaea/__init__.py +++ b/modules/arcaea/__init__.py @@ -69,7 +69,7 @@ async def _(msg: Bot.MessageSession): elif get_['status'] == -23: await msg.finish(msg.locale.t("arcaea.message.b30.low_potential")) else: - await msg.finish(msg.locale.t("arcaea.message.failed.fetch") + get_['message']) + await msg.finish(msg.locale.t("arcaea.message.get_failed") + get_['message']) ExecutionLockList.remove(msg) async def _get_result(session): @@ -132,12 +132,12 @@ async def _(msg: Bot.MessageSession): err_key = "arcaea.errcode." + str(e.args[0]) err_msg = msg.locale.t(err_key) if err_key != err_msg: - await msg.finish(msg.locale.t("arcaea.message.failed.fetch") + err_msg) + await msg.finish(msg.locale.t("arcaea.message.get_failed") + err_msg) else: - await msg.finish(msg.locale.t("arcaea.message.failed.fetch")) + await msg.finish(msg.locale.t("arcaea.message.get_failed")) except Exception: traceback.print_exc() - await msg.finish(msg.locale.t("arcaea.message.failed.fetch")) + await msg.finish(msg.locale.t("arcaea.message.get_failed")) finally: query_tasks.remove(msg.target.senderId) else: @@ -162,7 +162,7 @@ async def _(msg: Bot.MessageSession): await msg.finish(resp) except Exception: traceback.print_exc() - await msg.finish(msg.locale.t("arcaea.message.failed.fetch")) + await msg.finish(msg.locale.t("arcaea.message.get_failed")) else: await msg.finish(msg.locale.t("arcaea.message.user_unbound", prefix=msg.prefixes[0])) diff --git a/modules/arcaea/locales/en_us.json b/modules/arcaea/locales/en_us.json index ed83312e..59a7a807 100644 --- a/modules/arcaea/locales/en_us.json +++ b/modules/arcaea/locales/en_us.json @@ -45,7 +45,7 @@ "arcaea.message.download.success": "Current latest version is ${version}.\nDownload: ${url}", "arcaea.message.failed": "Failed to query.", "arcaea.message.failed.errcode": "Failed to query: ", - "arcaea.message.failed.fetch": "Failed to fetch.", + "arcaea.message.get_failed": "Failed to fetch.", "arcaea.message.info.result": "Recent play record of ${username} (${potential}): \n${trackname} (${difficulty})\nScore: ${score}\nPure: ${pure} (${shiny_pure})\nFar: ${far}\nLost: ${lost}\nPotential: ${realptt} -> ${ptt}\nTime: ${time_played} (UTC+8)", "arcaea.message.info.result.none": "This user has no play record.", "arcaea.message.initialize.not_found": "\"arc.apk\" not found!", diff --git a/modules/arcaea/locales/zh_cn.json b/modules/arcaea/locales/zh_cn.json index 26db1bac..a3c3c249 100644 --- a/modules/arcaea/locales/zh_cn.json +++ b/modules/arcaea/locales/zh_cn.json @@ -45,7 +45,7 @@ "arcaea.message.download.success": "目前的最新版本为 ${version}。\n下载地址:${url}", "arcaea.message.failed": "查询失败。", "arcaea.message.failed.errcode": "查询失败:", - "arcaea.message.failed.fetch": "获取失败。", + "arcaea.message.get_failed": "获取失败。", "arcaea.message.info.result": "${username} (${potential}) 的最近游玩记录:\n${trackname}(${difficulty})\n分数:${score}\nPure:${pure} (${shiny_pure})\nFar:${far}\nLost:${lost}\n潜力值:${realptt} -> ${ptt}\n时间:${time_played} (UTC+8)", "arcaea.message.info.result.none": "此用户无游玩记录。", "arcaea.message.initialize.not_found": "未找到“arc.apk”!", diff --git a/modules/arcaea/locales/zh_tw.json b/modules/arcaea/locales/zh_tw.json index 205edbeb..f25bbd94 100644 --- a/modules/arcaea/locales/zh_tw.json +++ b/modules/arcaea/locales/zh_tw.json @@ -45,7 +45,7 @@ "arcaea.message.download.success": "目前的最新版本為 ${version}。\n下載網址:${url}", "arcaea.message.failed": "查詢失敗。", "arcaea.message.failed.errcode": "查詢失敗:", - "arcaea.message.failed.fetch": "取得失敗。", + "arcaea.message.get_failed": "取得失敗。", "arcaea.message.info.result": "${username} (${potential}) 的最近遊玩紀錄:\n${trackname}(${difficulty})\n分數:${score}\nPure:${pure} (${shiny_pure})\nFar:${far}\nLost:${lost}\n潛力值:${realptt} -> ${ptt}\n時間:${time_played} (UTC+8)", "arcaea.message.info.result.none": "此使用者無遊玩紀錄。", "arcaea.message.initialize.not_found": "找不到「arc.apk」!", diff --git a/modules/mcv/locales/en_us.json b/modules/mcv/locales/en_us.json index 4bd632cd..14122bd4 100644 --- a/modules/mcv/locales/en_us.json +++ b/modules/mcv/locales/en_us.json @@ -5,7 +5,7 @@ "mcv.help.mcv": "Get the latest version of Minecraft: Java Edition in the launcher.", "mcv.message.error.server": "Server error.", "mcv.message.mcbv": "The latest version recorded on Mojira is:\n${msg2}\n(The latest version in the stores shall prevail, Mojira is only for previewing the version)", - "mcv.message.mcbv.failed": "Failed to fetch.", + "mcv.message.mcbv.get_failed": "Failed to fetch.", "mcv.message.mcbv.ms_store": "Currently the latest version in Microsoft Store is: ", "mcv.message.mcbv.play_store": "Currently the latest version in Google Play Store is: ", "mcv.message.mcdv": "The latest version: ${mcdversion}\n(The data from Mojira may be earlier than the official release. Information is for reference purposes only).", diff --git a/modules/mcv/locales/zh_cn.json b/modules/mcv/locales/zh_cn.json index 7a13c5a7..d95d2f15 100644 --- a/modules/mcv/locales/zh_cn.json +++ b/modules/mcv/locales/zh_cn.json @@ -5,7 +5,7 @@ "mcv.help.mcv": "查询当前 Minecraft:Java 版在启动器内最新版本。", "mcv.message.error.server": "服务器错误。", "mcv.message.mcbv": "Mojira 上所记录最新版本为:\n${msg2}\n(以商店内最新版本为准,Mojira 仅作版本号预览用)", - "mcv.message.mcbv.failed": "获取失败。", + "mcv.message.mcbv.get_failed": "获取失败。", "mcv.message.mcbv.ms_store": "目前 Microsoft Store 内最新正式版为:", "mcv.message.mcbv.play_store": "目前 Google Play 商店内最新正式版为:", "mcv.message.mcdv": "最新版:${mcdversion}\n(数据来源于 Mojira,可能会比官方发布要早一段时间。信息仅供参考。)", diff --git a/modules/mcv/locales/zh_tw.json b/modules/mcv/locales/zh_tw.json index 58670eef..1067eefd 100644 --- a/modules/mcv/locales/zh_tw.json +++ b/modules/mcv/locales/zh_tw.json @@ -5,7 +5,7 @@ "mcv.help.mcv": "查詢目前 Minecraft:Java 版在啟動器內最新版本。", "mcv.message.error.server": "伺服器錯誤。", "mcv.message.mcbv": "Mojira 上所記錄最新版本為:\n${msg2}\n(以商店內最新版本為準,Mojira 僅作版本號預覽用)", - "mcv.message.mcbv.failed": "取得失敗。", + "mcv.message.mcbv.get_failed": "取得失敗。", "mcv.message.mcbv.ms_store": "目前 Microsoft Store 內最新正式版為:", "mcv.message.mcbv.play_store": "目前 Google Play 商店內最新正式版為:", "mcv.message.mcdv": "最新版:${mcdversion}\n(數據來源於 Mojira,可能會比官方發布要早一段時間。信息僅供參考。)", diff --git a/modules/mcv/mcv.py b/modules/mcv/mcv.py index 6fd66342..f0282e49 100644 --- a/modules/mcv/mcv.py +++ b/modules/mcv/mcv.py @@ -69,10 +69,10 @@ async def mcbv(msg): msg2 = f'Beta: {fix.join(beta)}\nPreview: {fix.join(preview)}\nRelease: {fix.join(release)}' return \ (f"""{msg.locale.t("mcv.message.mcbv.play_store")} -{play_store_version if play_store_version is not None else msg.locale.t('mcv.message.mcbv.failed')} +{play_store_version if play_store_version is not None else msg.locale.t('mcv.message.mcbv.get_failed')} """ if IP.country != 'China' else '') + \ f"""{msg.locale.t("mcv.message.mcbv.ms_store")} -{ms_store_version if ms_store_version is not None else msg.locale.t('mcv.message.mcbv.failed')} +{ms_store_version if ms_store_version is not None else msg.locale.t('mcv.message.mcbv.get_failed')} """ +\ msg.locale.t("mcv.message.mcbv", msg2=msg2) diff --git a/modules/phigros/locales/zh_cn.json b/modules/phigros/locales/zh_cn.json index 9be7ad21..4133b16a 100644 --- a/modules/phigros/locales/zh_cn.json +++ b/modules/phigros/locales/zh_cn.json @@ -3,11 +3,11 @@ "phigros.help.bind": "使用云存档 SessionToken 绑定用户,建议私聊使用。", "phigros.help.desc": "查询 Phigros 相关内容。", "phigros.help.unbind": "解绑用户。", - "phigros.message.bind.success": "成功绑定用户:${username}", + "phigros.message.bind.success": "绑定成功:${username}", "phigros.message.bind.warning": "警告:您正在群组中绑定用户,这有可能会使您的云存档数据被他人篡改。请尽可能私聊绑定用户以避免这种情况。\n您可以通过重新登录来重置 SessionToken。此次命令产生的消息将在 15 秒后撤回。", "phigros.message.unbind.success": "解绑成功。", "phigros.message.update.failed": "更新失败。", "phigros.message.update.success": "更新成功。", "phigros.message.user_unbound": "未绑定用户,请使用「${prefix}phigros bind」绑定一个用户。", - "phigros.message.b19.get_failed": "获取失败,请尝试重新绑定Token或报告开发者:\n${err}" + "phigros.message.b19.get_failed": "获取失败,请尝试重新绑定 SessionToken 或报告开发者:\n${err}" } diff --git a/modules/phigros/locales/zh_tw.json b/modules/phigros/locales/zh_tw.json index 87efd03d..1260f4a1 100644 --- a/modules/phigros/locales/zh_tw.json +++ b/modules/phigros/locales/zh_tw.json @@ -3,10 +3,11 @@ "phigros.help.bind": "使用雲端存檔 SessionToken 綁定使用者,建議私訊使用。", "phigros.help.desc": "查詢 Phigros 相關內容。", "phigros.help.unbind": "解除綁定使用者。", - "phigros.message.bind.success": "綁定成功。", + "phigros.message.bind.success": "綁定成功:${usernane}", "phigros.message.bind.warning": "警告:您正在群組中綁定使用者,這有可能會使您的雲端存檔資料被他人竄改。請盡可能在私訊中綁定使用者以避免這種情況。\n您可以透過重新登入來重設 SessionToken。此次指令產生的訊息將在 15 秒後撤回。", "phigros.message.unbind.success": "解除綁定成功。", "phigros.message.update.failed": "更新失敗。", "phigros.message.update.success": "更新成功。", - "phigros.message.user_unbound": "未綁定使用者,請使用「${prefix}phigros bind」綁定一個使用者。" + "phigros.message.user_unbound": "未綁定使用者,請使用「${prefix}phigros bind」綁定一個使用者。", + "phigros.message.b19.get_failed:": "取得失敗,請嘗試重新綁定 SessionToken 或回報開發人員:\n${err}" } \ No newline at end of file