Skip to content

Commit

Permalink
update locale
Browse files Browse the repository at this point in the history
  • Loading branch information
DoroWolf authored Mar 13, 2024
1 parent cd8a30e commit 5b083ae
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 41 deletions.
2 changes: 2 additions & 0 deletions locales/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
"parser.command.running.prompt": "There are currently commands executing. Please try again later.",
"parser.command.running.prompt2": "The previous command is being executed.",
"parser.module.desc": "Description:\n${desc}",
"message.id.invalid.sender": "Invalid ID format. The format should be \"${sender}|<User ID>\".",
"message.id.invalid.target": "Invalid ID format. The format should be \"${target}|<conversation ID>\".",
"parser.module.disabled.prompt": "\"${module}\" module is not enabled. Please use \"${prefix}enable ${module}\" to enable the module.",
"parser.module.unloaded": "\"${module}\"hasn't been loaded yet. Please contact the developers to solve this issue.",
"parser.superuser.permission.denied": "You do not have permission to use this command.",
Expand Down
2 changes: 2 additions & 0 deletions locales/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
"message.reply.prompt": "(请使用指定的词语回复本条消息)",
"message.wait.prompt.confirm": "(发送“是”或符合确认条件的词语来确认)",
"message.wait.prompt.next_message": "(发送符合条件的词语来确认)",
"message.id.invalid.sender": "ID 格式错误,格式应为“${sender}|<用户 ID>”。",
"message.id.invalid.target": "ID 格式错误,格式应为“${target}|<对话 ID>”。",
"no": "",
"none": "",
"parser.admin.module.permission.denied": "“${module}”模块下的命令仅能被该群组的管理员所使用,请联系管理员执行此命令。",
Expand Down
2 changes: 2 additions & 0 deletions locales/zh_tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
"parser.command.format.invalid": "語法錯誤。\n使用「${prefix}help ${module}」檢視說明。",
"parser.command.running.prompt": "目前有指令正在執行,請稍後再試。",
"parser.command.running.prompt2": "先前的指令正在執行中。",
"message.id.invalid.sender": "ID 格式錯誤,格式應為「${sender}|<使用者 ID>」。",
"message.id.invalid.target": "ID 格式錯誤,格式應為「${target}|<對話 ID>」。",
"parser.module.desc": "描述:\n${desc}",
"parser.module.disabled.prompt": "「${module}」模組未啟用,請使用「${prefix}enable ${module}」啟用此模組。",
"parser.module.unloaded": "「${module}」模組目前未載入,請聯絡開發人員處理。",
Expand Down
14 changes: 6 additions & 8 deletions modules/core/locales/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"core.message.admin.ban.list.none": "There are currently no members limited to use the bot.",
"core.message.admin.ban.not_yet": "This member has not been limited to use the bot.",
"core.message.admin.ban.self": "You cannot do this for yourself!",
"core.message.admin.invalid": "Invalid ID format. The format should be \"${target}|<User ID>\". Use \"${prefix}whoami\" to view user ID.",
"core.message.admin.invalid": "Invalid ID format. The format should be \"${sender}|<User ID>\". Use \"${prefix}whoami\" to view user ID.",
"core.message.admin.list": "Manual bot administrators currently set: ",
"core.message.admin.list.none": "There are currently no manual bot administrators.",
"core.message.admin.remove.confirm": "You are removing your own permissions! Are you sure?",
Expand Down Expand Up @@ -127,7 +127,7 @@
"core.message.module.reload.no_more": "No remaining files were found.",
"core.message.module.reload.not_found": "Failed: Module \"${module}\" does not exist.",
"core.message.module.reload.success": "Successfully reloaded module(s):\n${module}",
"core.message.module.reload.with": "And ${reloadCnt} file(s) under these module(s).",
"core.message.module.reload.with": "And ${reload_count} file(s) under these module(s).",
"core.message.module.unload.base": "Failed: \"${module}\" is a base module, thus cannot be unloaded.",
"core.message.module.unload.confirm": "This operation will unload all modules related to it and disable them completely after the next restart (not including cross-reference). Continue?",
"core.message.module.unload.not_found": "Failed: This module does not exist.",
Expand Down Expand Up @@ -163,18 +163,16 @@
"core.message.resume.nothing": "No messages to be resumed.",
"core.message.resume.processing": "Resuming ${counts} message(s)...",
"core.message.resume.skip": "Skip a message, resuming ${counts} message(s)...",
"core.message.set.confirm.init": "This target is not initialized. Are you sure you want to do it?",
"core.message.set.invalid": "Invalid ID format.",
"core.message.set.module.disable.success": "The following module(s) were successfully disabled for the target: ",
"core.message.set.module.enable.success": "The following module(s) were successfully enabled for the target: ",
"core.message.set.option.edit.success": "The following parameter(s) were set for the target: ${key} -> ${value}",
"core.message.set.confirm.init": "This conversation is not initialized. Are you sure you want to do it?",
"core.message.set.module.disable.success": "The following module(s) were successfully disabled for the conversation: ",
"core.message.set.module.enable.success": "The following module(s) were successfully enabled for the conversation: ",
"core.message.set.option.edit.success": "The following parameter(s) were set for the conversation: ${key} -> ${value}",
"core.message.setup.check.disable": "Check prompt disabled.",
"core.message.setup.check.enable": "Check prompt enabled.",
"core.message.setup.timeoffset.invalid": "Invalid time offset.",
"core.message.setup.timeoffset.success": "The time offset has been set to UTC${offset}.",
"core.message.setup.typing.disable": "Input prompt disabled.",
"core.message.setup.typing.enable": "Input prompt enabled.",
"core.message.superuser.invalid": "Invalid ID format. The format should be \"${target}|<User ID>\".",
"core.message.update.failed": "Failed to fetch update from GitHub.",
"core.message.version": "Current bot version: ${commit}",
"core.message.version.unknown": "Unable to get version. This instance may not be deployed using Git.",
Expand Down
20 changes: 9 additions & 11 deletions modules/core/locales/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"core.message.admin.ban.list.none": "当前没有被限制使用机器人的成员。",
"core.message.admin.ban.not_yet": "此成员没有被限制使用机器人。",
"core.message.admin.ban.self": "你不可以对自己进行此操作!",
"core.message.admin.invalid": "ID 格式错误,格式应为“${target}|<用户 ID>”,请使用“${prefix}whoami”查看用户 ID。",
"core.message.admin.invalid": "ID 格式错误,格式应为“${sender}|<用户 ID>”,请使用“${prefix}whoami”查看用户 ID。",
"core.message.admin.list": "当前被手动设置的机器人管理员:\n",
"core.message.admin.list.none": "当前没有手动设置的机器人管理员。",
"core.message.admin.remove.confirm": "你正在移除你自己的权限!你确定吗?",
Expand Down Expand Up @@ -127,15 +127,15 @@
"core.message.module.reload.no_more": "未发现已加载的其余文件。",
"core.message.module.reload.not_found": "失败:“${module}”模块不存在。",
"core.message.module.reload.success": "成功重载模块:\n${module}",
"core.message.module.reload.with": "以及该模块下的 ${reloadCnt} 个文件。",
"core.message.module.reload.with": "以及该模块下的 ${reload_count} 个文件。",
"core.message.module.unload.base": "失败:“${module}”模块为基础模块,无法卸载。",
"core.message.module.unload.confirm": "此操作将会卸载与其相关的所有模块,并在下一次重启后彻底禁用(不包含互相引用的模块),是否继续?",
"core.message.module.unload.not_found": "失败:该模块不存在。",
"core.message.module.unload.success": "成功卸载模块:${module}",
"core.message.module.unload.unavailable.confirm": "此模块已由于发生错误而无法加载,此操作将会在下一次重启后彻底禁用此模块,是否继续?",
"core.message.module.unsupported_language": "提示:“${module}”模块不支持当前语言,此模块可能不会正确展示当前语言下的内容。",
"core.message.mute.disable": "成功取消禁言",
"core.message.mute.enable": "成功禁言",
"core.message.mute.disable": "成功取消静音",
"core.message.mute.enable": "成功静音",
"core.message.petal": "当前对话 ${target} 的花瓣数为 ${petal}。",
"core.message.petal.clear": "已清除对话 ${target} 的所有花瓣。",
"core.message.petal.clear.self": "已清除本对话的所有花瓣。",
Expand Down Expand Up @@ -163,23 +163,21 @@
"core.message.resume.nothing": "没有需要重发的消息。",
"core.message.resume.processing": "正在重发 ${counts} 条消息……",
"core.message.resume.skip": "跳过一条消息,正在重发 ${counts} 条消息……",
"core.message.set.confirm.init": "该目标未初始化,确认进行操作吗?",
"core.message.set.invalid": "ID 格式错误。",
"core.message.set.module.disable.success": "成功为目标关闭了以下模块:",
"core.message.set.module.enable.success": "成功为目标打开了以下模块:",
"core.message.set.option.edit.success": "成功为目标设置了以下参数:${key} -> ${value}",
"core.message.set.confirm.init": "该对话未初始化,确认进行操作吗?",
"core.message.set.module.disable.success": "成功为对话关闭了以下模块:",
"core.message.set.module.enable.success": "成功为对话打开了以下模块:",
"core.message.set.option.edit.success": "成功为对话设置了以下参数:${key} -> ${value}",
"core.message.setup.check.disable": "已关闭错字检查提示。",
"core.message.setup.check.enable": "已开启错字检查提示。",
"core.message.setup.timeoffset.invalid": "无效的时间偏移量。",
"core.message.setup.timeoffset.success": "已将时间偏移量设定为 UTC${offset}。",
"core.message.setup.typing.disable": "已关闭输入提示。",
"core.message.setup.typing.enable": "已开启输入提示。",
"core.message.superuser.invalid": "ID 格式错误,格式应为“${target}|<用户 ID>”。",
"core.message.update.failed": "尝试从 GitHub 获取更新失败。",
"core.message.version": "当前机器人版本号:${commit}",
"core.message.version.unknown": "无法获取版本号。此实例可能没有使用 Git 进行部署。",
"core.message.whoami": "你的 ID 是:${sender}\n本对话的 ID 是:${target}",
"core.message.whoami.admin": "(你拥有本对话的管理员权限)",
"core.message.whoami.botadmin": "(你拥有本对话的机器人管理员权限)",
"core.message.whoami.superuser": "(你拥有本机器人的超级用户权限)"
}
}
14 changes: 6 additions & 8 deletions modules/core/locales/zh_tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"core.message.admin.ban.list.none": "目前沒有被限制使用機器人的成員。",
"core.message.admin.ban.not_yet": "此成員沒有被限制使用機器人。",
"core.message.admin.ban.self": "你不可以對自己進行此操作!",
"core.message.admin.invalid": "ID 格式錯誤,格式應為「${target}|<使用者 ID>」,請使用「${prefix}whoami」指令檢視使用者 ID。",
"core.message.admin.invalid": "ID 格式錯誤,格式應為「${sender}|<使用者 ID>」,請使用「${prefix}whoami」指令檢視使用者 ID。",
"core.message.admin.list": "目前被手動設定的機器人管理員:\n",
"core.message.admin.list.none": "目前沒有手動設定的機器人管理員。",
"core.message.admin.remove.confirm": "你正在移除你自己的權限!你確定嗎?",
Expand Down Expand Up @@ -127,7 +127,7 @@
"core.message.module.reload.no_more": "未發現已載入的其餘檔案。",
"core.message.module.reload.not_found": "失敗:「${module}」模組不存在。",
"core.message.module.reload.success": "成功重新載入模組:\n${module}",
"core.message.module.reload.with": "以及此模組下的 ${reloadCnt} 個檔案。",
"core.message.module.reload.with": "以及此模組下的 ${reload_count} 個檔案。",
"core.message.module.unload.base": "失敗:「${module}」為基礎模組,無法移除。",
"core.message.module.unload.confirm": "此動作將會移除與其相關的所有模組,並在下一次重新啟動後完全停用(不包含互相參照的模組),是否繼續?",
"core.message.module.unload.not_found": "失敗:此模組不存在。",
Expand Down Expand Up @@ -163,18 +163,16 @@
"core.message.resume.nothing": "沒有需要重傳的訊息。",
"core.message.resume.processing": "正在重傳 ${counts} 條訊息……",
"core.message.resume.skip": "跳過一條訊息,正在重傳 ${counts} 條訊息……",
"core.message.set.confirm.init": "此目標未初始化,確認操作嗎?",
"core.message.set.invalid": "ID 格式錯誤。",
"core.message.set.module.disable.success": "成功為目標禁用了以下模組:",
"core.message.set.module.enable.success": "成功為目標啟用了以下模組:",
"core.message.set.option.edit.success": "成功為目標設定了以下參數:${key} -> ${value}",
"core.message.set.confirm.init": "此對話未初始化,確認操作嗎?",
"core.message.set.module.disable.success": "成功為對話禁用了以下模組:",
"core.message.set.module.enable.success": "成功為對話啟用了以下模組:",
"core.message.set.option.edit.success": "成功為對話設定了以下參數:${key} -> ${value}",
"core.message.setup.check.disable": "已停用指令錯誤檢查提醒。",
"core.message.setup.check.enable": "已啟用指令錯誤檢查提醒。",
"core.message.setup.timeoffset.invalid": "無效的時間偏移量。",
"core.message.setup.timeoffset.success": "已將時間偏移量設定為 UTC${offset}。",
"core.message.setup.typing.disable": "已停用輸入提醒。",
"core.message.setup.typing.enable": "已啟用輸入提醒。",
"core.message.superuser.invalid": "ID 格式錯誤,格式應為「${target}|<使用者 ID>」。",
"core.message.update.failed": "嘗試從 GitHub 取得更新失敗。",
"core.message.version": "目前機器人版本號:${commit}",
"core.message.version.unknown": "無法取得版本號。此實例可能沒有使用 Git 進行部署。",
Expand Down
2 changes: 1 addition & 1 deletion modules/core/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def module_reload(module, extra_modules, base_module=False):
return msg.locale.t('core.message.module.reload.success', module=module) + \
('\n' if len(extra_modules) != 0 else '') + \
'\n'.join(extra_modules) + \
'\n' + msg.locale.t('core.message.module.reload.with', reloadCnt=reload_count - 1)
'\n' + msg.locale.t('core.message.module.reload.with', reload_count=reload_count - 1)
elif reload_count == 1:
return msg.locale.t('core.message.module.reload.success', module=module) + \
('\n' if len(extra_modules) != 0 else '') + \
Expand Down
Loading

0 comments on commit 5b083ae

Please sign in to comment.