rename strings
This commit is contained in:
parent
35966d8a57
commit
b38e669172
4 changed files with 74 additions and 73 deletions
|
@ -99,37 +99,37 @@
|
|||
"core.version.message": "Current robot version: ${version_tag} (${commit})",
|
||||
"core.ping.help": "Get robot status.",
|
||||
"core.ping.message.detail": "System startup time: ${system_boot_time}\nRobot is running: ${bot_running_time}\nPython version: ${python_version}\nProcessor model: ${cpu_brand}\nCurrent processor usage: ${cpu_usage}%\nPhysical memory: ${ram}M Utilized: ${ram_percent}%\nSwap memory: ${swap}M Utilized: ${swap_percent}%\nDisk capacity: ${disk_space}G/${disk_space_total}G",
|
||||
"core.ping.failed": "Unable to fetch.",
|
||||
"core.ping.message.failed": "Unable to fetch.",
|
||||
"core.admin.help": "Commands available to group administrators.",
|
||||
"core.admin.help.add": "Set members as robot administrators, implement the function of managing the robot without setting members as group administrators. It's no longer needed to set up it when you are already a group administrator.",
|
||||
"core.admin.help.del": "Unmember robot administrator.",
|
||||
"core.admin.help.list": "List all robot administrators.",
|
||||
"core.admin.list.lists": "Robot administrators manually set in the current group: ",
|
||||
"core.admin.list.none": "There are currently no manual robot administrators.",
|
||||
"core.admin.already": "This member is already a robot administrator.",
|
||||
"core.admin.message.list": "Robot administrators manually set in the current group: ",
|
||||
"core.admin.message.list.none": "There are currently no manual robot administrators.",
|
||||
"core.admin.message.already": "This member is already a robot administrator.",
|
||||
"core.ban.help.ban": "Limit someone to use robots in the group.",
|
||||
"core.ban.help.unban": "Unlimit someone to use robots in the group.",
|
||||
"core.ban.self": "You cannot do this for yourself!",
|
||||
"core.ban.already": "This member is already banned from using the robot.",
|
||||
"core.ban.not_yet": "This member is not banned from using the robot.",
|
||||
"core.ban.message.self": "You cannot do this for yourself!",
|
||||
"core.ban.message.already": "This member is already banned from using the robot.",
|
||||
"core.ban.message.not_yet": "This member is not banned from using the robot.",
|
||||
"core.locale.help": "Use to set robot language.",
|
||||
"core.locale.help.locale": "Set the language for robots.",
|
||||
"core.locale.invalid": "Language format error, supported languages are: ${lang}.",
|
||||
"core.locale.message.invalid": "Language format error, supported languages are: ${lang}.",
|
||||
"core.whoami.help": "Get the ID of the user account that sent the command inside the robot.",
|
||||
"core.whoami.admin": "(You have admin privileges for this conversation)",
|
||||
"core.whoami.botadmin": "(You have robot admin privileges for this conversation)",
|
||||
"core.whoami.superuser": "(You have superuser permission)",
|
||||
"core.whoami.message.admin": "(You have admin privileges for this conversation)",
|
||||
"core.whoami.message.botadmin": "(You have robot admin privileges for this conversation)",
|
||||
"core.whoami.message.superuser": "(You have superuser permission)",
|
||||
"core.whoami.message": "Your ID is: ${senderid}\nThe ID of this conversation is: ${targetid}",
|
||||
"core.toggle.help.typing": "Toggle whether to display input prompts.",
|
||||
"core.toggle.typing.disable": "Input prompt successfully disabled.",
|
||||
"core.toggle.typing.enable": "Input prompt successfully enabled.",
|
||||
"core.toggle.message.typing.disable": "Input prompt successfully disabled.",
|
||||
"core.toggle.message.typing.enable": "Input prompt successfully enabled.",
|
||||
"core.toggle.help.check": "Toggles whether to display command check prompts.",
|
||||
"core.toggle.check.disable": "Check prompt successfully disabled.",
|
||||
"core.toggle.check.enable": "Check prompt successfully enabled.",
|
||||
"core.toggle.message.check.disable": "Check prompt successfully disabled.",
|
||||
"core.toggle.message.check.enable": "Check prompt successfully enabled.",
|
||||
"core.mute.help": "Make the robot stop sending message.",
|
||||
"core.mute.disable": "Successfully unmuted.",
|
||||
"core.mute.enable": "Successfully muted.",
|
||||
"core.mute.message.disable": "Successfully unmuted.",
|
||||
"core.mute.message.enable": "Successfully muted.",
|
||||
"core.leave.help": "Let the robot leave the group.",
|
||||
"core.leave.success": "Goodbye.",
|
||||
"core.leave.message": "Goodbye.",
|
||||
"core.leave.confirm": "Are you sure? This action is irreversible."
|
||||
}
|
|
@ -99,37 +99,38 @@
|
|||
"core.version.message": "当前机器人版本号:${version_tag}(${commit})",
|
||||
"core.ping.help": "获取机器人状态。",
|
||||
"core.ping.message.detail": "系统启动时间:${system_boot_time}\n机器人已运行:${bot_running_time}\nPython 版本:${python_version}\n处理器型号:${cpu_brand}\n当前处理器使用率:${cpu_usage}%\n物理内存:${ram}M 使用率:${ram_percent}%\nSwap 内存:${swap}M 使用率:${swap_percent}%\n磁盘容量:${disk_space}G/${disk_space_total}G",
|
||||
"core.ping.failed": "无法获取。",
|
||||
"core.ping.message.failed": "无法获取。",
|
||||
"core.admin.help": "一些群聊管理员可使用的命令。",
|
||||
"core.admin.help.add": "设置成员为机器人管理员,实现不设置成员为群聊管理员的情况下管理机器人的功能。已是群聊管理员无需设置此项目。",
|
||||
"core.admin.help.del": "取消成员的机器人管理员。",
|
||||
"core.admin.help.list": "列出所有机器人管理员。",
|
||||
"core.admin.list.lists": "当前在群内手动设置的机器人管理员:\n",
|
||||
"core.admin.list.none": "当前没有手动设置的机器人管理员。",
|
||||
"core.admin.already": "此成员已经是机器人管理员。",
|
||||
"core.admin.message.list": "当前在群内手动设置的机器人管理员:\n",
|
||||
"core.admin.message.list.none": "当前没有手动设置的机器人管理员。",
|
||||
"core.admin.message.already": "此成员已经是机器人管理员。",
|
||||
"core.ban.help.ban": "限制某人在本群使用机器人。",
|
||||
"core.ban.help.unban": "解除对某人在本群使用机器人的限制。",
|
||||
"core.ban.self": "你不可以对自己进行此操作!",
|
||||
"core.ban.already": "此成员已经被设置禁止使用机器人。",
|
||||
"core.ban.not_yet": "此成员没有被设置禁止使用机器人。",
|
||||
"core.ban.message.self": "你不可以对自己进行此操作!",
|
||||
"core.ban.message.already": "此成员已经被设置禁止使用机器人。",
|
||||
"core.ban.message.invalid": "ID 格式错误,格式应为“${target}|<用户ID>”。",
|
||||
"core.ban.message.not_yet": "此成员没有被设置禁止使用机器人。",
|
||||
"core.locale.help": "用于设置机器人运行语言。",
|
||||
"core.locale.help.locale": "设置机器人运行语言。",
|
||||
"core.locale.invalid": "语言格式错误,支持的语言有:${lang}。",
|
||||
"core.locale.message.invalid": "语言格式错误,支持的语言有:${lang}。",
|
||||
"core.whoami.help": "获取发送命令的账号在机器人内部的 ID。",
|
||||
"core.whoami.admin": "(你拥有本对话的管理员权限)",
|
||||
"core.whoami.botadmin": "(你拥有本对话的机器人管理员权限)",
|
||||
"core.whoami.superuser": "(你拥有本机器人的超级用户权限)",
|
||||
"core.whoami.message.admin": "(你拥有本对话的管理员权限)",
|
||||
"core.whoami.message.botadmin": "(你拥有本对话的机器人管理员权限)",
|
||||
"core.whoami.message.superuser": "(你拥有本机器人的超级用户权限)",
|
||||
"core.whoami.message": "你的 ID 是:${senderid}\n本对话的 ID 是:${targetid}",
|
||||
"core.toggle.help.typing": "切换是否展示输入提示。",
|
||||
"core.toggle.typing.disable": "成功关闭输入提示。",
|
||||
"core.toggle.typing.enable": "成功打开输入提示。",
|
||||
"core.toggle.message.typing.disable": "成功关闭输入提示。",
|
||||
"core.toggle.message.typing.enable": "成功打开输入提示。",
|
||||
"core.toggle.help.check": "切换是否展示命令错字检查提示。",
|
||||
"core.toggle.check.disable": "成功关闭错字检查提示。",
|
||||
"core.toggle.check.enable": "成功打开错字检查提示。",
|
||||
"core.toggle.message.check.disable": "成功关闭错字检查提示。",
|
||||
"core.toggle.message.check.enable": "成功打开错字检查提示。",
|
||||
"core.mute.help": "使机器人停止发言。",
|
||||
"core.mute.disable": "成功取消禁言。",
|
||||
"core.mute.enable": "成功禁言。",
|
||||
"core.mute.message.disable": "成功取消禁言。",
|
||||
"core.mute.message.enable": "成功禁言。",
|
||||
"core.leave.help": "使机器人离开群聊。",
|
||||
"core.leave.success": "已执行,再见。",
|
||||
"core.leave.message": "已执行,再见。",
|
||||
"core.leave.confirm": "你确定吗?此操作不可逆。"
|
||||
}
|
|
@ -99,37 +99,37 @@
|
|||
"core.version.message": "目前機器人版本號:${version_tag}(${commit})",
|
||||
"core.ping.help": "取得機器人狀態。",
|
||||
"core.ping.message.detail": "系統啟動時間:${system_boot_time}\n機器人已運行:${bot_running_time}\nPython 版本:${python_version}\n處理器型號:${cpu_brand}\n目前處理器使用率:${cpu_usage}%\n物理記憶體:${ram}M 使用率:${ram_percent}%\nSwap 記憶體:${swap}M 使用率:${swap_percent}%\n磁碟容量:${disk_space}G/${disk_space_total}G",
|
||||
"core.ping.failed": "無法取得。",
|
||||
"core.ping.message.failed": "無法取得。",
|
||||
"core.admin.help": "一些群組管理員可使用的指令。",
|
||||
"core.admin.help.add": "設定成員為機器人管理員,以實現不設定成員為群組管理員的狀況下管理機器人的效果。已是群組管理員無須設定此指令。",
|
||||
"core.admin.help.del": "取消成員的機器人管理員。",
|
||||
"core.admin.help.list": "列出所有機器人管理員。",
|
||||
"core.admin.list.lists": "目前在群組內手動設定的機器人管理員:\n",
|
||||
"core.admin.list.none": "目前沒有手動設定的機器人管理員。",
|
||||
"core.admin.already": "此成員已是機器人管理員。",
|
||||
"core.admin.message.list": "目前在群組內手動設定的機器人管理員:\n",
|
||||
"core.admin.message.list.none": "目前沒有手動設定的機器人管理員。",
|
||||
"core.admin.message.already": "此成員已是機器人管理員。",
|
||||
"core.ban.help.ban": "限制某人在此群組使用機器人。",
|
||||
"core.ban.help.unban": "解除對某人在此群組使用機器人的限制。",
|
||||
"core.ban.self": "你不可以對自己進行此操作!",
|
||||
"core.ban.already": "此成員已被禁止使用機器人。",
|
||||
"core.ban.not_yet": "此成員沒有被禁止使用機器人。",
|
||||
"core.ban.message.self": "你不可以對自己進行此操作!",
|
||||
"core.ban.message.already": "此成員已被禁止使用機器人。",
|
||||
"core.ban.message.not_yet": "此成員沒有被禁止使用機器人。",
|
||||
"core.locale.help": "用於設定機器人使用的語言。",
|
||||
"core.locale.help.locale": "設定機器人使用的語言。",
|
||||
"core.locale.invalid": "語言格式錯誤,已支援的語言有:${lang}。",
|
||||
"core.locale.message.invalid": "語言格式錯誤,已支援的語言有:${lang}。",
|
||||
"core.whoami.help": "取得發送指令的帳戶在機器人內部的 ID。",
|
||||
"core.whoami.admin": "(你擁有此對話的管理員權限)",
|
||||
"core.whoami.botadmin": "(你擁有此對話的機器人管理員權限)",
|
||||
"core.whoami.superuser": "(你擁有此機器人的超級使用者權限)",
|
||||
"core.whoami.message.admin": "(你擁有此對話的管理員權限)",
|
||||
"core.whoami.message.botadmin": "(你擁有此對話的機器人管理員權限)",
|
||||
"core.whoami.message.superuser": "(你擁有此機器人的超級使用者權限)",
|
||||
"core.whoami.message": "你的 ID 是:${senderid}\n此對話的 ID 是:${targetid}",
|
||||
"core.toggle.help.typing": "切換是否顯示輸入提醒。",
|
||||
"core.toggle.typing.disable": "成功停用輸入提醒。",
|
||||
"core.toggle.typing.enable": "成功啟用輸入提醒。",
|
||||
"core.toggle.message.typing.disable": "成功停用輸入提醒。",
|
||||
"core.toggle.message.typing.enable": "成功啟用輸入提醒。",
|
||||
"core.toggle.help.check": "切換是否顯示指令錯誤檢查提醒。",
|
||||
"core.toggle.check.disable": "成功停用指令錯誤檢查提醒。",
|
||||
"core.toggle.check.enable": "成功啟用指令錯誤檢查提醒。",
|
||||
"core.toggle.message.check.disable": "成功停用指令錯誤檢查提醒。",
|
||||
"core.toggle.message.check.enable": "成功啟用指令錯誤檢查提醒。",
|
||||
"core.mute.help": "使機器人停止發言。",
|
||||
"core.mute.disable": "成功取消靜音。",
|
||||
"core.mute.enable": "成功靜音。",
|
||||
"core.mute.message.disable": "成功取消靜音。",
|
||||
"core.mute.message.enable": "成功靜音。",
|
||||
"core.leave.help": "使機器人離開群組。",
|
||||
"core.leave.success": "已執行,再見。",
|
||||
"core.leave.message": "已執行,再見。",
|
||||
"core.leave.confirm": "你確定嗎?此行為不可逆。"
|
||||
}
|
|
@ -56,11 +56,11 @@ async def _(msg: Bot.MessageSession):
|
|||
try:
|
||||
GroupList = len(await app.groupList())
|
||||
except Exception:
|
||||
GroupList = msg.locale.t('core.ping.failed')
|
||||
GroupList = msg.locale.t('core.ping.message.failed')
|
||||
try:
|
||||
FriendList = len(await app.friendList())
|
||||
except Exception:
|
||||
FriendList = msg.locale.t('core.ping.failed')
|
||||
FriendList = msg.locale.t('core.ping.message.failed')
|
||||
"""
|
||||
result += '\n' + msg.locale.t("core.ping.message.detail", system_boot_time=Boot_Start, bot_running_time=timediff, python_version=platform.python_version(), cpu_brand=get_cpu_info()['brand_raw'], cpu_usage=Cpu_usage, ram=RAM, ram_percent=RAM_percent, swap=Swap, swap_percent=Swap_percent, disk_space=Disk, disk_space_total=DiskTotal)
|
||||
await msg.finish(result)
|
||||
|
@ -81,18 +81,18 @@ admin = module('admin',
|
|||
async def config_gu(msg: Bot.MessageSession):
|
||||
if 'list' in msg.parsed_msg:
|
||||
if msg.custom_admins:
|
||||
await msg.finish(f"当前机器人群内手动设置的管理员:\n" + '\n'.join(msg.custom_admins))
|
||||
await msg.finish(msg.locale.t("core.admin.message.list") + '\n'.join(msg.custom_admins))
|
||||
else:
|
||||
await msg.finish(msg.locale.t("{core.admin.list.none}"))
|
||||
await msg.finish(msg.locale.t("core.admin.message.list.none"))
|
||||
user = msg.parsed_msg['<UserID>']
|
||||
if not user.startswith(f'{msg.target.senderFrom}|'):
|
||||
await msg.finish(f'ID格式错误,请对象使用{msg.prefixes[0]}whoami命令查看用户ID。')
|
||||
await msg.finish(msg.locale.t('core.superuser.message.invalid', prefix=msg.prefixes[0]))
|
||||
if 'add' in msg.parsed_msg:
|
||||
if user and user not in msg.custom_admins:
|
||||
if msg.data.add_custom_admin(user):
|
||||
await msg.finish(msg.locale.t('success'))
|
||||
else:
|
||||
await msg.finish(msg.locale.t("{core.admin.already}"))
|
||||
await msg.finish(msg.locale.t("core.admin.message.already"))
|
||||
if 'del' in msg.parsed_msg:
|
||||
if user:
|
||||
if msg.data.remove_custom_admin(user):
|
||||
|
@ -103,22 +103,22 @@ async def config_gu(msg: Bot.MessageSession):
|
|||
async def config_ban(msg: Bot.MessageSession):
|
||||
user = msg.parsed_msg['<UserID>']
|
||||
if not user.startswith(f'{msg.target.senderFrom}|'):
|
||||
await msg.finish(f'ID格式错误,格式应为“{msg.target.senderFrom}|<用户ID>”')
|
||||
await msg.finish(msg.locale.t('core.ban.message.invalid' ,target=msg.target.senderFrom))
|
||||
if user == msg.target.senderId:
|
||||
await msg.finish(msg.locale.t("{core.ban.self}"))
|
||||
await msg.finish(msg.locale.t("core.ban.message.self"))
|
||||
if 'ban' in msg.parsed_msg:
|
||||
if user not in msg.options.get('ban', []):
|
||||
msg.data.edit_option('ban', msg.options.get('ban', []) + [user])
|
||||
await msg.finish(msg.locale.t('success'))
|
||||
else:
|
||||
await msg.finish(msg.locale.t("{core.ban.already}"))
|
||||
await msg.finish(msg.locale.t("core.ban.message.already"))
|
||||
if 'unban' in msg.parsed_msg:
|
||||
if user in (banlist := msg.options.get('ban', [])):
|
||||
banlist.remove(user)
|
||||
msg.data.edit_option('ban', banlist)
|
||||
await msg.finish(msg.locale.t('success'))
|
||||
else:
|
||||
await msg.finish(msg.locale.t("{core.ban.not_yet}"))
|
||||
await msg.finish(msg.locale.t("core.ban.message.not_yet"))
|
||||
|
||||
|
||||
locale = module('locale',
|
||||
|
@ -136,7 +136,7 @@ async def config_gu(msg: Bot.MessageSession):
|
|||
if BotDBUtil.TargetInfo(msg.target.targetId).edit('locale', lang):
|
||||
await msg.finish(msg.locale.t('success'))
|
||||
else:
|
||||
await msg.finish(msg.locale.t("core.locale.invalid",lang='、'.join(get_available_locales())))
|
||||
await msg.finish(msg.locale.t("core.locale.message.invalid",lang='、'.join(get_available_locales())))
|
||||
|
||||
|
||||
whoami = module('whoami', developers=['Dianliang233'], base=True)
|
||||
|
@ -146,11 +146,11 @@ whoami = module('whoami', developers=['Dianliang233'], base=True)
|
|||
async def _(msg: Bot.MessageSession):
|
||||
rights = ''
|
||||
if await msg.checkNativePermission():
|
||||
rights += '\n' + msg.locale.t("core.whoami.admin")
|
||||
rights += '\n' + msg.locale.t("core.whoami.message.admin")
|
||||
elif await msg.checkPermission():
|
||||
rights += '\n' + msg.locale.t("core.whoami.botadmin")
|
||||
rights += '\n' + msg.locale.t("core.whoami.message.botadmin")
|
||||
if msg.checkSuperUser():
|
||||
rights += '\n' + msg.locale.t("core.whoami.superuser")
|
||||
rights += '\n' + msg.locale.t("core.whoami.message.superuser")
|
||||
await msg.finish(msg.locale.t('core.whoami.message', senderid=msg.target.senderId, targetid=msg.target.targetId) + rights,
|
||||
disable_secret_check=True)
|
||||
|
||||
|
@ -164,10 +164,10 @@ async def _(msg: Bot.MessageSession):
|
|||
state = target.query.disable_typing
|
||||
if not state:
|
||||
target.edit('disable_typing', True)
|
||||
await msg.finish(msg.locale.t('core.toggle.typing.disable'))
|
||||
await msg.finish(msg.locale.t('core.toggle.message.typing.disable'))
|
||||
else:
|
||||
target.edit('disable_typing', False)
|
||||
await msg.finish(msg.locale.t('core.toggle.typing.enable'))
|
||||
await msg.finish(msg.locale.t('core.toggle.message.typing.enable'))
|
||||
|
||||
|
||||
@tog.handle('check {{core.toggle.help.check}}')
|
||||
|
@ -178,7 +178,7 @@ async def _(msg: Bot.MessageSession):
|
|||
else:
|
||||
state = not state
|
||||
msg.data.edit_option('typo_check', state)
|
||||
await msg.finish(msg.locale.t('core.toggle.check.enable') if state else msg.locale.t('core.toggle.check.disable'))
|
||||
await msg.finish(msg.locale.t('core.toggle.message.check.enable') if state else msg.locale.t('core.toggle.message.check.disable'))
|
||||
|
||||
|
||||
mute = module('mute', developers=['Dianliang233'], base=True, required_admin=True,
|
||||
|
@ -187,7 +187,7 @@ mute = module('mute', developers=['Dianliang233'], base=True, required_admin=Tru
|
|||
|
||||
@mute.handle()
|
||||
async def _(msg: Bot.MessageSession):
|
||||
await msg.finish(msg.locale.t('core.mute.enable') if msg.data.switch_mute() else msg.locale.t('core.mute.disable'))
|
||||
await msg.finish(msg.locale.t('core.mute.message.enable') if msg.data.switch_mute() else msg.locale.t('core.mute.message.disable'))
|
||||
|
||||
|
||||
leave = module('leave', developers=['OasisAkari'], base=True, required_admin=True, available_for='QQ|Group', alias={'dismiss': 'leave'},
|
||||
|
@ -198,5 +198,5 @@ leave = module('leave', developers=['OasisAkari'], base=True, required_admin=Tru
|
|||
async def _(msg: Bot.MessageSession):
|
||||
confirm = await msg.waitConfirm(msg.locale.t('core.leave.confirm'))
|
||||
if confirm:
|
||||
await msg.sendMessage(msg.locale.t('{core.leave.success}'))
|
||||
await msg.sendMessage(msg.locale.t('core.leave.message'))
|
||||
await msg.call_api('set_group_leave', group_id=msg.session.target)
|
||||
|
|
Reference in a new issue