From 9829255711ab5194954ffa08bad908680780462c Mon Sep 17 00:00:00 2001 From: a76yyyy <56478790+a76yyyy@users.noreply.github.com> Date: Mon, 9 Dec 2024 00:53:27 +0800 Subject: [PATCH 1/4] New translations qd_core.po (Chinese Simplified) --- .../locale/zh_CN/LC_MESSAGES/messages.po | 169 ++++++++++-------- 1 file changed, 99 insertions(+), 70 deletions(-) diff --git a/qd-core/src/qd_core/locale/zh_CN/LC_MESSAGES/messages.po b/qd-core/src/qd_core/locale/zh_CN/LC_MESSAGES/messages.po index ce181ccf90..071cf1d9d5 100644 --- a/qd-core/src/qd_core/locale/zh_CN/LC_MESSAGES/messages.po +++ b/qd-core/src/qd_core/locale/zh_CN/LC_MESSAGES/messages.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: qd-today\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-11-16 19:41+0800\n" -"PO-Revision-Date: 2024-11-23 15:56\n" +"POT-Creation-Date: 2024-12-09 00:47+0800\n" +"PO-Revision-Date: 2024-12-08 16:53\n" "Last-Translator: a76yyyy \n" "Language-Team: Chinese Simplified\n" "MIME-Version: 1.0\n" @@ -14,91 +14,91 @@ msgstr "" "X-Crowdin-Project: qd-today\n" "X-Crowdin-Project-ID: 737675\n" "X-Crowdin-Language: zh-CN\n" -"X-Crowdin-File: /core/qd-core/locale/qd_core.po\n" -"X-Crowdin-File-ID: 10\n" +"X-Crowdin-File: /core/qd-core/src/qd_core/locale/qd_core.po\n" +"X-Crowdin-File-ID: 18\n" "Language: zh_CN\n" -#: qd-core/src/qd_core/config.py:64 +#: qd-core/src/qd_core/config.py:65 msgid "是否启用 QD 框架 Debug" msgstr "是否启用 QD 框架 Debug" -#: qd-core/src/qd_core/config.py:65 +#: qd-core/src/qd_core/config.py:66 msgid "QD 框架日志等级" msgstr "QD 框架日志等级" -#: qd-core/src/qd_core/config.py:68 +#: qd-core/src/qd_core/config.py:69 msgid "是否启用在控制台日志中打印 Exception 的 TraceBack 信息" msgstr "是否启用在控制台日志中打印 Exception 的 TraceBack 信息" -#: qd-core/src/qd_core/config.py:72 +#: qd-core/src/qd_core/config.py:73 msgid "是否在控制台输出导入警告信息" msgstr "是否在控制台输出导入警告信息" -#: qd-core/src/qd_core/config.py:101 +#: qd-core/src/qd_core/config.py:102 msgid "允许用户单次请求下载的最大值,默认为 5MB" msgstr "允许用户单次请求下载的最大值, 默认为 5MB" -#: qd-core/src/qd_core/config.py:102 +#: qd-core/src/qd_core/config.py:103 msgid "HTTP Request 请求超时时间(秒)" msgstr "HTTP Request 请求超时时间 (秒)" -#: qd-core/src/qd_core/config.py:103 +#: qd-core/src/qd_core/config.py:104 msgid "HTTP Request 连接超时时间(秒)" msgstr "HTTP Request 连接超时时间 (秒)" -#: qd-core/src/qd_core/config.py:106 +#: qd-core/src/qd_core/config.py:107 msgid "延时API 最大时间限制(秒),请确保此值小于上述 timeout 配置,否则可能会导致 599 错误" msgstr "延时API 最大时间限制 (秒), 请确保此值小于上述 timeout 配置,否则可能会导致 599 错误" -#: qd-core/src/qd_core/config.py:109 +#: qd-core/src/qd_core/config.py:110 msgid "unsafe_eval 执行最大时间限制(秒)" msgstr "unsafe_eval 执行最大时间限制 (秒)" -#: qd-core/src/qd_core/config.py:117 +#: qd-core/src/qd_core/config.py:118 msgid "delay_max_timeout must be less than both request_timeout={request_timeout} and connect_timeout={connect_timeout}." msgstr "delay_max_timeout 必须小于 request_timeout={request_timeout} 和 connect_timeout={connect_timeout}。" -#: qd-core/src/qd_core/config.py:129 +#: qd-core/src/qd_core/config.py:130 msgid "任务运行中单个 While 循环最大运行时间, 单位为秒, 默认为15分钟" msgstr "任务运行中单个 While 循环最大运行时间, 单位为秒, 默认为15分钟" -#: qd-core/src/qd_core/config.py:131 +#: qd-core/src/qd_core/config.py:132 msgid "任务运行中单个任务最大请求次数, 默认为 1500 次" msgstr "任务运行中单个任务最大请求次数, 默认为 1500 次" -#: qd-core/src/qd_core/config.py:138 +#: qd-core/src/qd_core/config.py:139 msgid "是否启用 Pycurl 模块,默认启用。当运行环境缺少 PyCurl 模块时,此设置无效" msgstr "是否启用 Pycurl 模块, 默认启用。当运行环境缺少 PyCurl 模块时, 此设置无效" -#: qd-core/src/qd_core/config.py:143 +#: qd-core/src/qd_core/config.py:144 msgid "在 Pycurl 环境下,若部分请求因某些错误导致失败时,是否自动修改冲突设置并重发请求" msgstr "在 Pycurl 环境下, 若部分请求因某些错误导致失败时, 是否自动修改冲突设置并重发请求" -#: qd-core/src/qd_core/config.py:147 +#: qd-core/src/qd_core/config.py:148 msgid "通过 Curl 使用指定的 DNS 进行解析,仅在 Pycurl 环境下支持" msgstr "通过 Curl 使用指定的 DNS 进行解析, 仅在 Pycurl 环境下支持" -#: qd-core/src/qd_core/config.py:152 +#: qd-core/src/qd_core/config.py:153 msgid "是否允许使用 Curl 进行 Encoding 操作。当遇到 'Error 61 Unrecognized transfer encoding.' 错误,并且 `ALLOW_RETRY=True` 时,本次请求将禁用 Headers 中的 Content-Encoding 并尝试重试" msgstr "是否允许使用 Curl 进行 Encoding 操作。当遇到 'Error 61 Unrecognized transfer encoding.' 错误, 并且 `ALLOW_RETRY=True` 时, 本次请求将禁用 Headers 中的 Content-Encoding 并尝试重试" -#: qd-core/src/qd_core/config.py:161 +#: qd-core/src/qd_core/config.py:162 msgid "是否允许 Curl 使用 Headers 中自定义的 Content-Length 请求。当遇到 'HTTP 400 Bad Request' 错误,并且 `ALLOW_RETRY=True` 时,本次请求将禁用 Headers 中的 Content-Length 并尝试重试" msgstr "是否允许 Curl 使用 Headers 中自定义的 Content-Length 请求。当遇到 'HTTP 400 Bad Request' 错误,并且 `ALLOW_RETRY=True` 时,本次请求将禁用 Headers 中的 Content-Length 并尝试重试" -#: qd-core/src/qd_core/config.py:195 +#: qd-core/src/qd_core/config.py:196 msgid "当满足启用 PyCurl、HTTP Error Code 不在这个列表中、任务代理为空,并且 `ALLOW_RETRY=True` 时,本次请求将禁用 Pycurl 并尝试重试" msgstr "当满足启用 PyCurl、HTTP Error Code 不在这个列表中、任务代理为空,并且 `ALLOW_RETRY=True` 时,本次请求将禁用 Pycurl 并尝试重试" -#: qd-core/src/qd_core/config.py:203 +#: qd-core/src/qd_core/config.py:204 msgid "启用后,在满足启用 PyCurl、返回 Response 为空、任务代理为空,并且 `ALLOW_RETRY=True` 的情况下,本次请求将禁用 Pycurl 并尝试重试" msgstr "启用后,在满足启用 PyCurl、返回 Response 为空、任务代理为空,并且 `ALLOW_RETRY=True` 的情况下,本次请求将禁用 Pycurl 并尝试重试" -#: qd-core/src/qd_core/config.py:217 +#: qd-core/src/qd_core/config.py:218 msgid "全局代理域名列表,默认为空,表示不启用全局代理。代理格式应为 'scheme://username:password@host:port'" msgstr "全局代理域名列表,默认为空,表示不启用全局代理。代理格式应为 'scheme://username:password@host:port'" -#: qd-core/src/qd_core/config.py:224 +#: qd-core/src/qd_core/config.py:225 msgid "直连地址的匹配模式,默认为 'regexp'(正则表达式匹配)以过滤本地请求,可选输入:\n" "- 'regexp': 正则表达式匹配模式;\n" "- 'url': 网址完全匹配模式;\n" @@ -108,102 +108,122 @@ msgstr "直连地址的匹配模式,默认为 'regexp' (正则表达式匹配) "- 'url': 网址完全匹配模式;\n" "- None : 不启用全局代理黑名单" -#: qd-core/src/qd_core/config.py:232 +#: qd-core/src/qd_core/config.py:233 msgid "根据 `proxy_direct_mode` 的值,此字段可以是满足直连规则的正则表达式字符串(当 `proxy_direct_mode='regexp'`)或不通过代理请求的 URL 列表(当 `proxy_direct_mode='url'`)。默认不启用直连规则" msgstr "根据 `proxy_direct_mode` 的值,此字段可以是满足直连规则的正则表达式字符串(当 `proxy_direct_mode='regexp'`)或不通过代理请求的 URL 列表(当 `proxy_direct_mode='url'`)。默认不启用直连规则" -#: qd-core/src/qd_core/config.py:255 +#: qd-core/src/qd_core/config.py:256 msgid "When proxy_direct_mode is 'regexp', proxy_direct should be a string or a list of strings." msgstr "当 proxy_direct_mode 为 \"regexp \"时,proxy_direct 应为字符串或字符串列表。" -#: qd-core/src/qd_core/config.py:263 +#: qd-core/src/qd_core/config.py:264 msgid "When proxy_direct_mode is 'url', proxy_direct should be a string or a list of URLs." msgstr "当 proxy_direct_mode 为 \"url \"时,proxy_direct 应为字符串或 URL 列表。" -#: qd-core/src/qd_core/config.py:273 +#: qd-core/src/qd_core/config.py:274 msgid "config 目录下自定义 ONNX 文件名列表(不含 '.onnx' 后缀)" msgstr "config 目录下自定义 ONNX 文件名列表 (不含 '.onnx' 后缀)" -#: qd-core/src/qd_core/config.py:279 +#: qd-core/src/qd_core/config.py:280 msgid "config 目录下自定义 ONNX 对应的自定义 `charsets.json` 文件名列表(不含 '.json' 后缀)" msgstr "config 目录下自定义 ONNX 对应的自定义 `charsets.json` 文件名列表 (不含 '.json' 后缀)" -#: qd-core/src/qd_core/config.py:286 +#: qd-core/src/qd_core/config.py:287 msgid "邮箱 SMTP 服务器地址" msgstr "邮箱 SMTP 服务器地址" -#: qd-core/src/qd_core/config.py:287 +#: qd-core/src/qd_core/config.py:288 msgid "邮箱 SMTP 服务器端口" msgstr "邮箱 SMTP 服务器端口" -#: qd-core/src/qd_core/config.py:288 +#: qd-core/src/qd_core/config.py:289 msgid "是否使用 SSL 加密方式收发邮件" msgstr "是否使用 SSL 加密方式收发邮件" -#: qd-core/src/qd_core/config.py:289 +#: qd-core/src/qd_core/config.py:290 msgid "是否使用 STARTTLS 加密方式收发邮件,默认不启用" msgstr "是否使用 STARTTLS 加密方式收发邮件, 默认不启用" -#: qd-core/src/qd_core/config.py:290 +#: qd-core/src/qd_core/config.py:291 msgid "邮箱用户名" msgstr "邮箱用户名" -#: qd-core/src/qd_core/config.py:291 +#: qd-core/src/qd_core/config.py:292 msgid "邮箱密码" msgstr "邮箱密码" -#: qd-core/src/qd_core/config.py:292 +#: qd-core/src/qd_core/config.py:293 msgid "发送时使用的邮箱,默认与 MAIL_USER 相同" msgstr "发送时使用的邮箱, 默认与 MAIL_USER 相同" -#: qd-core/src/qd_core/config.py:294 +#: qd-core/src/qd_core/config.py:295 msgid "发送的邮件链接启用 HTTPS,默认为 False,若需要 HTTPS,请在外部设置反向代理" msgstr "发送的邮件链接启用 HTTPS, 默认为 False, 若需要 HTTPS, 请在外部设置反向代理" -#: qd-core/src/qd_core/config.py:299 +#: qd-core/src/qd_core/config.py:300 msgid "Mailgun API Key,若不为空则优先使用 Mailgun 方式发送邮件" msgstr "Mailgun API Key, 若不为空则优先使用 Mailgun 方式发送邮件" -#: qd-core/src/qd_core/config.py:301 +#: qd-core/src/qd_core/config.py:302 msgid "Mailgun Domain,需要替换为实际的 Mailgun 域名" msgstr "Mailgun Domain, 需要替换为实际的 Mailgun 域名" -#: qd-core/src/qd_core/config.py:309 +#: qd-core/src/qd_core/config.py:310 msgid "推送图片 URL" msgstr "推送图片 URL" -#: qd-core/src/qd_core/config.py:314 +#: qd-core/src/qd_core/config.py:319 +msgid "Multi-language directory, default is {locale_dir}" +msgstr "" + +#: qd-core/src/qd_core/config.py:325 +msgid "Locale, default is zh_CN" +msgstr "" + +#: qd-core/src/qd_core/config.py:329 +msgid "Default locale, default is en_US" +msgstr "" + +#: qd-core/src/qd_core/config.py:333 +msgid "Multilingual domain, default is messages" +msgstr "" + +#: qd-core/src/qd_core/config.py:338 msgid "日志配置" msgstr "日志配置" -#: qd-core/src/qd_core/config.py:317 +#: qd-core/src/qd_core/config.py:341 msgid "客户端请求配置" msgstr "客户端请求配置" -#: qd-core/src/qd_core/config.py:320 +#: qd-core/src/qd_core/config.py:344 msgid "任务配置" msgstr "任务配置" -#: qd-core/src/qd_core/config.py:322 +#: qd-core/src/qd_core/config.py:346 msgid "pycurl 配置" msgstr "PyCurl 配置" -#: qd-core/src/qd_core/config.py:324 +#: qd-core/src/qd_core/config.py:348 msgid "代理配置" msgstr "代理配置" -#: qd-core/src/qd_core/config.py:326 +#: qd-core/src/qd_core/config.py:350 msgid "dddocr 配置" msgstr "DdddOCR 配置" -#: qd-core/src/qd_core/config.py:328 +#: qd-core/src/qd_core/config.py:352 msgid "邮件配置" msgstr "邮件配置" -#: qd-core/src/qd_core/config.py:330 +#: qd-core/src/qd_core/config.py:354 msgid "推送配置" msgstr "推送配置" +#: qd-core/src/qd_core/config.py:356 +msgid "多语言配置" +msgstr "" + #: qd-core/src/qd_core/client/fetcher.py:132 msgid "for循环只支持可迭代类型及变量" msgstr "for 循环只支持可迭代类型及变量" @@ -257,24 +277,24 @@ msgstr "渲染模板 {key}: {value} 时出错 \\r\\n {str_e}" msgid "MD5 not available. Possibly running in FIPS mode" msgstr "MD5 不可用. 可能在 FIPS 模式下运行" -#: qd-core/src/qd_core/filters/convert.py:133 -#: qd-core/src/qd_core/filters/convert.py:226 +#: qd-core/src/qd_core/filters/convert.py:134 +#: qd-core/src/qd_core/filters/convert.py:227 msgid "obj must be a string type" msgstr "Obj 必须是字符串类型" -#: qd-core/src/qd_core/filters/convert.py:136 +#: qd-core/src/qd_core/filters/convert.py:137 msgid "Invalid value {nonstring} for to_bytes' nonstring parameter" msgstr "to_bytes 的非字符串参数值 {nonstring} 无效" -#: qd-core/src/qd_core/filters/convert.py:228 +#: qd-core/src/qd_core/filters/convert.py:229 msgid "Invalid value {nonstring} for to_text's nonstring parameter" msgstr "to_text 的非字符串参数值 {nonstring} 无效" -#: qd-core/src/qd_core/filters/convert.py:282 +#: qd-core/src/qd_core/filters/convert.py:283 msgid "invalid ip version: {version}" msgstr "无效的 IP 版本: {version}" -#: qd-core/src/qd_core/filters/convert.py:301 +#: qd-core/src/qd_core/filters/convert.py:302 msgid "invalid ip address: {addr}" msgstr "无效的 IP 地址:{addr}" @@ -318,38 +338,42 @@ msgstr "正则表达式类型 ({re_type}) 尚未实现" msgid "Invalid regex type ({re_type})" msgstr "无效的正则表达式类型 ({re_type})" -#: qd-core/src/qd_core/filters/time.py:37 +#: qd-core/src/qd_core/filters/time.py:38 msgid "Invalid value for epoch value ({second})" msgstr "纪元值 ({second}) 无效" -#: qd-core/src/qd_core/filters/time.py:63 +#: qd-core/src/qd_core/filters/time.py:64 msgid "后" msgstr "后" -#: qd-core/src/qd_core/filters/time.py:66 +#: qd-core/src/qd_core/filters/time.py:67 msgid "前" msgstr "前" -#: qd-core/src/qd_core/filters/time.py:75 +#: qd-core/src/qd_core/filters/time.py:76 msgid "{seconds} 秒" msgstr "{seconds} 秒" -#: qd-core/src/qd_core/filters/time.py:79 +#: qd-core/src/qd_core/filters/time.py:80 msgid "{minutes} 分钟" msgstr "{minutes} 分钟" -#: qd-core/src/qd_core/filters/time.py:82 +#: qd-core/src/qd_core/filters/time.py:83 msgid "{hours} 小时" msgstr "{hours} 小时" -#: qd-core/src/qd_core/filters/time.py:88 +#: qd-core/src/qd_core/filters/time.py:89 msgid "昨天" msgstr "昨天" -#: qd-core/src/qd_core/filters/time.py:90 +#: qd-core/src/qd_core/filters/time.py:91 msgid "明天" msgstr "明天" +#: qd-core/src/qd_core/plugins/base.py:35 +msgid "Added API route: {path} {methods}" +msgstr "" + #: qd-core/src/qd_core/plugins/default.py:28 #, python-format msgid "Import DdddOCR module falied: \"%s\". \n" @@ -583,7 +607,7 @@ msgstr "缓存函数结果错误: %s" msgid "Caching Class Method Result Error: %s" msgstr "缓存类方法结果错误: %s" -#: qd-core/src/qd_core/utils/file.py:49 +#: qd-core/src/qd_core/utils/file.py:50 msgid "Unsupported configuration file format: {file_extension}" msgstr "不支持的配置文件格式: {file_extension}" @@ -729,27 +753,32 @@ msgstr "模块 {v} 不能在评估上下文中使用\n" "将允许的属性列入白名单.\n" "预包装的模块作为 'odoo.tools.safe_eval' 的属性提供.\n" -#: qd-core/src/qd_core/utils/shell.py:32 +#: qd-core/src/qd_core/utils/shell.py:13 +#, python-format +msgid "Running command: %s %s" +msgstr "" + +#: qd-core/src/qd_core/utils/shell.py:33 msgid "An error occurred during command execution: {e}" msgstr "命令执行过程中发生错误:{e}" -#: qd-core/src/qd_core/utils/shell.py:43 qd-core/src/qd_core/utils/shell.py:44 +#: qd-core/src/qd_core/utils/shell.py:44 qd-core/src/qd_core/utils/shell.py:45 msgid "命令必须以列表形式提供。" msgstr "命令必须以列表形式提供." -#: qd-core/src/qd_core/utils/shell.py:50 qd-core/src/qd_core/utils/shell.py:51 +#: qd-core/src/qd_core/utils/shell.py:51 qd-core/src/qd_core/utils/shell.py:52 msgid "环境变量必须以字典形式提供。" msgstr "环境变量必须以字典形式提供." -#: qd-core/src/qd_core/utils/shell.py:52 +#: qd-core/src/qd_core/utils/shell.py:53 msgid "设置环境变量: {envs}" msgstr "设置环境变量: {envs}" -#: qd-core/src/qd_core/utils/shell.py:59 +#: qd-core/src/qd_core/utils/shell.py:60 msgid "执行命令时发生OS错误: {e}" msgstr "执行命令时发生 OS 错误: {e}" -#: qd-core/src/qd_core/utils/shell.py:62 +#: qd-core/src/qd_core/utils/shell.py:63 msgid "无效的命令或环境变量设置: {e}" msgstr "无效的命令或环境变量设置: {e}" From fade109c02105989dd668b45a26ac4417c35a3fd Mon Sep 17 00:00:00 2001 From: a76yyyy <56478790+a76yyyy@users.noreply.github.com> Date: Mon, 9 Dec 2024 00:53:28 +0800 Subject: [PATCH 2/4] New translations qd_core.po (English) --- .../locale/en_US/LC_MESSAGES/messages.po | 169 ++++++++++-------- 1 file changed, 99 insertions(+), 70 deletions(-) diff --git a/qd-core/src/qd_core/locale/en_US/LC_MESSAGES/messages.po b/qd-core/src/qd_core/locale/en_US/LC_MESSAGES/messages.po index 95e522df1e..0a2b5305c4 100644 --- a/qd-core/src/qd_core/locale/en_US/LC_MESSAGES/messages.po +++ b/qd-core/src/qd_core/locale/en_US/LC_MESSAGES/messages.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: qd-today\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-11-16 19:41+0800\n" -"PO-Revision-Date: 2024-11-23 17:01\n" +"POT-Creation-Date: 2024-12-09 00:47+0800\n" +"PO-Revision-Date: 2024-12-08 16:53\n" "Last-Translator: a76yyyy \n" "Language-Team: English\n" "MIME-Version: 1.0\n" @@ -14,91 +14,91 @@ msgstr "" "X-Crowdin-Project: qd-today\n" "X-Crowdin-Project-ID: 737675\n" "X-Crowdin-Language: en\n" -"X-Crowdin-File: /core/qd-core/locale/qd_core.po\n" -"X-Crowdin-File-ID: 10\n" +"X-Crowdin-File: /core/qd-core/src/qd_core/locale/qd_core.po\n" +"X-Crowdin-File-ID: 18\n" "Language: en_US\n" -#: qd-core/src/qd_core/config.py:64 +#: qd-core/src/qd_core/config.py:65 msgid "是否启用 QD 框架 Debug" msgstr "Whether to enable QD Framework Debug" -#: qd-core/src/qd_core/config.py:65 +#: qd-core/src/qd_core/config.py:66 msgid "QD 框架日志等级" msgstr "QD framework log level" -#: qd-core/src/qd_core/config.py:68 +#: qd-core/src/qd_core/config.py:69 msgid "是否启用在控制台日志中打印 Exception 的 TraceBack 信息" msgstr "Whether to enable printing of TraceBack information for Exception in the console output" -#: qd-core/src/qd_core/config.py:72 +#: qd-core/src/qd_core/config.py:73 msgid "是否在控制台输出导入警告信息" msgstr "Whether to import warning messages in the console output" -#: qd-core/src/qd_core/config.py:101 +#: qd-core/src/qd_core/config.py:102 msgid "允许用户单次请求下载的最大值,默认为 5MB" msgstr "Maximum download size allowed for a single user request, default is 5MB" -#: qd-core/src/qd_core/config.py:102 +#: qd-core/src/qd_core/config.py:103 msgid "HTTP Request 请求超时时间(秒)" msgstr "HTTP request timeout (seconds)" -#: qd-core/src/qd_core/config.py:103 +#: qd-core/src/qd_core/config.py:104 msgid "HTTP Request 连接超时时间(秒)" msgstr "HTTP request connection timeout (seconds)" -#: qd-core/src/qd_core/config.py:106 +#: qd-core/src/qd_core/config.py:107 msgid "延时API 最大时间限制(秒),请确保此值小于上述 timeout 配置,否则可能会导致 599 错误" msgstr "Delay API Maximum time limit (seconds), make sure this value is less than the timeout configuration above, otherwise it may result in 599 error" -#: qd-core/src/qd_core/config.py:109 +#: qd-core/src/qd_core/config.py:110 msgid "unsafe_eval 执行最大时间限制(秒)" msgstr "unsafe_eval maximum time limit for execution (seconds)" -#: qd-core/src/qd_core/config.py:117 +#: qd-core/src/qd_core/config.py:118 msgid "delay_max_timeout must be less than both request_timeout={request_timeout} and connect_timeout={connect_timeout}." msgstr "delay_max_timeout must be less than both request_timeout={request_timeout} and connect_timeout={connect_timeout}." -#: qd-core/src/qd_core/config.py:129 +#: qd-core/src/qd_core/config.py:130 msgid "任务运行中单个 While 循环最大运行时间, 单位为秒, 默认为15分钟" msgstr "Maximum runtime for a single While loop in a task, in seconds, default is 15 minutes" -#: qd-core/src/qd_core/config.py:131 +#: qd-core/src/qd_core/config.py:132 msgid "任务运行中单个任务最大请求次数, 默认为 1500 次" msgstr "Maximum number of requests for a single task in a task run, default is 1500" -#: qd-core/src/qd_core/config.py:138 +#: qd-core/src/qd_core/config.py:139 msgid "是否启用 Pycurl 模块,默认启用。当运行环境缺少 PyCurl 模块时,此设置无效" msgstr "Whether to enable the PyCurl module, enabled by default. This setting has no effect when the running environment is missing the PyCurl module" -#: qd-core/src/qd_core/config.py:143 +#: qd-core/src/qd_core/config.py:144 msgid "在 Pycurl 环境下,若部分请求因某些错误导致失败时,是否自动修改冲突设置并重发请求" msgstr "In PyCurl environment, if some requests fail due to some errors, whether to automatically modify the conflict settings and resend the requests" -#: qd-core/src/qd_core/config.py:147 +#: qd-core/src/qd_core/config.py:148 msgid "通过 Curl 使用指定的 DNS 进行解析,仅在 Pycurl 环境下支持" msgstr "Resolve by using the specified DNS through Curl, which is only supported in PyCurl environment" -#: qd-core/src/qd_core/config.py:152 +#: qd-core/src/qd_core/config.py:153 msgid "是否允许使用 Curl 进行 Encoding 操作。当遇到 'Error 61 Unrecognized transfer encoding.' 错误,并且 `ALLOW_RETRY=True` 时,本次请求将禁用 Headers 中的 Content-Encoding 并尝试重试" msgstr "Whether to allow Encoding operations with Curl. When an 'Error 61 Unrecognized transfer encoding.' error is encountered, and `ALLOW_RETRY=True`, this request will disable Content-Encoding in Headers and try again" -#: qd-core/src/qd_core/config.py:161 +#: qd-core/src/qd_core/config.py:162 msgid "是否允许 Curl 使用 Headers 中自定义的 Content-Length 请求。当遇到 'HTTP 400 Bad Request' 错误,并且 `ALLOW_RETRY=True` 时,本次请求将禁用 Headers 中的 Content-Length 并尝试重试" msgstr "Whether Curl is allowed to use the custom Content-Length request in Headers. When an' HTTP 400 Bad Request' error is encountered and' ALLOW_RETRY=True', this request will disable the Content-Length in Headers and try again" -#: qd-core/src/qd_core/config.py:195 +#: qd-core/src/qd_core/config.py:196 msgid "当满足启用 PyCurl、HTTP Error Code 不在这个列表中、任务代理为空,并且 `ALLOW_RETRY=True` 时,本次请求将禁用 Pycurl 并尝试重试" msgstr "If PyCurl is enabled, HTTP Error Code is not in this list, the task proxy is empty, and `ALLOW_RETRY=True` is met, PyCurl will be disabled for this request and attempts will be retried" -#: qd-core/src/qd_core/config.py:203 +#: qd-core/src/qd_core/config.py:204 msgid "启用后,在满足启用 PyCurl、返回 Response 为空、任务代理为空,并且 `ALLOW_RETRY=True` 的情况下,本次请求将禁用 Pycurl 并尝试重试" msgstr "If PyCurl is enabled, the returned Response is empty, the task agent is empty, and `ALLOW_RETRY=True`, this request will disable PyCurl and try again" -#: qd-core/src/qd_core/config.py:217 +#: qd-core/src/qd_core/config.py:218 msgid "全局代理域名列表,默认为空,表示不启用全局代理。代理格式应为 'scheme://username:password@host:port'" msgstr "Global proxy domain name list, which is empty by default, indicating that global proxy is not enabled. The proxy format should be 'scheme://username:password@host:port'" -#: qd-core/src/qd_core/config.py:224 +#: qd-core/src/qd_core/config.py:225 msgid "直连地址的匹配模式,默认为 'regexp'(正则表达式匹配)以过滤本地请求,可选输入:\n" "- 'regexp': 正则表达式匹配模式;\n" "- 'url': 网址完全匹配模式;\n" @@ -108,102 +108,122 @@ msgstr "Matching mode of directly connected address, default is' regexp'(regular "- 'url': the URL exactly matches the pattern;\n" "- None: global proxy blacklist is not enabled" -#: qd-core/src/qd_core/config.py:232 +#: qd-core/src/qd_core/config.py:233 msgid "根据 `proxy_direct_mode` 的值,此字段可以是满足直连规则的正则表达式字符串(当 `proxy_direct_mode='regexp'`)或不通过代理请求的 URL 列表(当 `proxy_direct_mode='url'`)。默认不启用直连规则" msgstr "Depending on the value of `proxy_direct_mode`, this field can be a regular expression string that satisfies the direct connection rule (when `proxy_direct_mode='regexp'`) or a list of URLs that are not requested through the proxy (when `proxy_direct_mode='url'`). Direct rules are not enabled by default" -#: qd-core/src/qd_core/config.py:255 +#: qd-core/src/qd_core/config.py:256 msgid "When proxy_direct_mode is 'regexp', proxy_direct should be a string or a list of strings." msgstr "When proxy_direct_mode is 'regexp', proxy_direct should be a string or a list of strings." -#: qd-core/src/qd_core/config.py:263 +#: qd-core/src/qd_core/config.py:264 msgid "When proxy_direct_mode is 'url', proxy_direct should be a string or a list of URLs." msgstr "When proxy_direct_mode is 'url', proxy_direct should be a string or a list of URLs." -#: qd-core/src/qd_core/config.py:273 +#: qd-core/src/qd_core/config.py:274 msgid "config 目录下自定义 ONNX 文件名列表(不含 '.onnx' 后缀)" msgstr "Customized ONNX filename list in the config directory (excluding '.onnx' suffix)" -#: qd-core/src/qd_core/config.py:279 +#: qd-core/src/qd_core/config.py:280 msgid "config 目录下自定义 ONNX 对应的自定义 `charsets.json` 文件名列表(不含 '.json' 后缀)" msgstr "Customized `charsets.json` filename list corresponding to customized ONNX in the config directory (excluding '.json' suffix)" -#: qd-core/src/qd_core/config.py:286 +#: qd-core/src/qd_core/config.py:287 msgid "邮箱 SMTP 服务器地址" msgstr "Mailbox SMTP server address" -#: qd-core/src/qd_core/config.py:287 +#: qd-core/src/qd_core/config.py:288 msgid "邮箱 SMTP 服务器端口" msgstr "Mailbox SMTP server port" -#: qd-core/src/qd_core/config.py:288 +#: qd-core/src/qd_core/config.py:289 msgid "是否使用 SSL 加密方式收发邮件" msgstr "Whether to use SSL encryption to send and receive mail" -#: qd-core/src/qd_core/config.py:289 +#: qd-core/src/qd_core/config.py:290 msgid "是否使用 STARTTLS 加密方式收发邮件,默认不启用" msgstr "Whether to use STARTTLS encryption to send and receive emails. It is not enabled by default" -#: qd-core/src/qd_core/config.py:290 +#: qd-core/src/qd_core/config.py:291 msgid "邮箱用户名" msgstr "Mailbox username" -#: qd-core/src/qd_core/config.py:291 +#: qd-core/src/qd_core/config.py:292 msgid "邮箱密码" msgstr "Email password" -#: qd-core/src/qd_core/config.py:292 +#: qd-core/src/qd_core/config.py:293 msgid "发送时使用的邮箱,默认与 MAIL_USER 相同" msgstr "The mailbox used when sending is the same as MAIL_USER by default" -#: qd-core/src/qd_core/config.py:294 +#: qd-core/src/qd_core/config.py:295 msgid "发送的邮件链接启用 HTTPS,默认为 False,若需要 HTTPS,请在外部设置反向代理" msgstr "Whether to enable HTTPS for the sent email link, the default is False, if you need HTTPS, please set the reverse proxy externally" -#: qd-core/src/qd_core/config.py:299 +#: qd-core/src/qd_core/config.py:300 msgid "Mailgun API Key,若不为空则优先使用 Mailgun 方式发送邮件" msgstr "Mailgun API Key. If it is not empty, Mailgun will be used first to send emails" -#: qd-core/src/qd_core/config.py:301 +#: qd-core/src/qd_core/config.py:302 msgid "Mailgun Domain,需要替换为实际的 Mailgun 域名" msgstr "Mailgun Domain, which needs to be replaced with the actual Mailgun domain name" -#: qd-core/src/qd_core/config.py:309 +#: qd-core/src/qd_core/config.py:310 msgid "推送图片 URL" msgstr "Push picture URL" -#: qd-core/src/qd_core/config.py:314 +#: qd-core/src/qd_core/config.py:319 +msgid "Multi-language directory, default is {locale_dir}" +msgstr "" + +#: qd-core/src/qd_core/config.py:325 +msgid "Locale, default is zh_CN" +msgstr "" + +#: qd-core/src/qd_core/config.py:329 +msgid "Default locale, default is en_US" +msgstr "" + +#: qd-core/src/qd_core/config.py:333 +msgid "Multilingual domain, default is messages" +msgstr "" + +#: qd-core/src/qd_core/config.py:338 msgid "日志配置" msgstr "Log settings" -#: qd-core/src/qd_core/config.py:317 +#: qd-core/src/qd_core/config.py:341 msgid "客户端请求配置" msgstr "Client requests settings" -#: qd-core/src/qd_core/config.py:320 +#: qd-core/src/qd_core/config.py:344 msgid "任务配置" msgstr "Task settings" -#: qd-core/src/qd_core/config.py:322 +#: qd-core/src/qd_core/config.py:346 msgid "pycurl 配置" msgstr "PyCurl settings" -#: qd-core/src/qd_core/config.py:324 +#: qd-core/src/qd_core/config.py:348 msgid "代理配置" msgstr "Proxy settings" -#: qd-core/src/qd_core/config.py:326 +#: qd-core/src/qd_core/config.py:350 msgid "dddocr 配置" msgstr "DdddOCR settings" -#: qd-core/src/qd_core/config.py:328 +#: qd-core/src/qd_core/config.py:352 msgid "邮件配置" msgstr "Mail settings" -#: qd-core/src/qd_core/config.py:330 +#: qd-core/src/qd_core/config.py:354 msgid "推送配置" msgstr "Push settings" +#: qd-core/src/qd_core/config.py:356 +msgid "多语言配置" +msgstr "" + #: qd-core/src/qd_core/client/fetcher.py:132 msgid "for循环只支持可迭代类型及变量" msgstr "For loop only supports iterated types and variables" @@ -257,24 +277,24 @@ msgstr "The error occurred when rendering template {key}: {value} \\r\\n {str_e} msgid "MD5 not available. Possibly running in FIPS mode" msgstr "MD5 not available. Possibly running in FIPS mode" -#: qd-core/src/qd_core/filters/convert.py:133 -#: qd-core/src/qd_core/filters/convert.py:226 +#: qd-core/src/qd_core/filters/convert.py:134 +#: qd-core/src/qd_core/filters/convert.py:227 msgid "obj must be a string type" msgstr "Obj must be a string type" -#: qd-core/src/qd_core/filters/convert.py:136 +#: qd-core/src/qd_core/filters/convert.py:137 msgid "Invalid value {nonstring} for to_bytes' nonstring parameter" msgstr "Invalid value {nonstring} for to_bytes' nonstring parameter" -#: qd-core/src/qd_core/filters/convert.py:228 +#: qd-core/src/qd_core/filters/convert.py:229 msgid "Invalid value {nonstring} for to_text's nonstring parameter" msgstr "Invalid value {nonstring} for to_text's nonstring parameter" -#: qd-core/src/qd_core/filters/convert.py:282 +#: qd-core/src/qd_core/filters/convert.py:283 msgid "invalid ip version: {version}" msgstr "Invalid IP version: {version}" -#: qd-core/src/qd_core/filters/convert.py:301 +#: qd-core/src/qd_core/filters/convert.py:302 msgid "invalid ip address: {addr}" msgstr "Invalid IP address: {addr}" @@ -318,38 +338,42 @@ msgstr "Regex type ({re_type}) not yet implemented" msgid "Invalid regex type ({re_type})" msgstr "Invalid regex type ({re_type})" -#: qd-core/src/qd_core/filters/time.py:37 +#: qd-core/src/qd_core/filters/time.py:38 msgid "Invalid value for epoch value ({second})" msgstr "Invalid value for epoch value ({second})" -#: qd-core/src/qd_core/filters/time.py:63 +#: qd-core/src/qd_core/filters/time.py:64 msgid "后" msgstr "later" -#: qd-core/src/qd_core/filters/time.py:66 +#: qd-core/src/qd_core/filters/time.py:67 msgid "前" msgstr "ago" -#: qd-core/src/qd_core/filters/time.py:75 +#: qd-core/src/qd_core/filters/time.py:76 msgid "{seconds} 秒" msgstr "{seconds} s" -#: qd-core/src/qd_core/filters/time.py:79 +#: qd-core/src/qd_core/filters/time.py:80 msgid "{minutes} 分钟" msgstr "{minutes} min" -#: qd-core/src/qd_core/filters/time.py:82 +#: qd-core/src/qd_core/filters/time.py:83 msgid "{hours} 小时" msgstr "{hours} h" -#: qd-core/src/qd_core/filters/time.py:88 +#: qd-core/src/qd_core/filters/time.py:89 msgid "昨天" msgstr "yesterday" -#: qd-core/src/qd_core/filters/time.py:90 +#: qd-core/src/qd_core/filters/time.py:91 msgid "明天" msgstr "tomorrow" +#: qd-core/src/qd_core/plugins/base.py:35 +msgid "Added API route: {path} {methods}" +msgstr "" + #: qd-core/src/qd_core/plugins/default.py:28 #, python-format msgid "Import DdddOCR module falied: \"%s\". \n" @@ -583,7 +607,7 @@ msgstr "Caching Function Result Error: %s" msgid "Caching Class Method Result Error: %s" msgstr "Caching Class Method Result Error: %s" -#: qd-core/src/qd_core/utils/file.py:49 +#: qd-core/src/qd_core/utils/file.py:50 msgid "Unsupported configuration file format: {file_extension}" msgstr "Unsupported configuration file format: {file_extension}" @@ -729,27 +753,32 @@ msgstr "Module {v} can not be used in evaluation contexts\n" "whitelisting allowed attributes.\n" "Pre-wrapped modules are provided as attributes of `odoo.tools.safe_eval`.\n" -#: qd-core/src/qd_core/utils/shell.py:32 +#: qd-core/src/qd_core/utils/shell.py:13 +#, python-format +msgid "Running command: %s %s" +msgstr "" + +#: qd-core/src/qd_core/utils/shell.py:33 msgid "An error occurred during command execution: {e}" msgstr "An error occurred during command execution: {e}" -#: qd-core/src/qd_core/utils/shell.py:43 qd-core/src/qd_core/utils/shell.py:44 +#: qd-core/src/qd_core/utils/shell.py:44 qd-core/src/qd_core/utils/shell.py:45 msgid "命令必须以列表形式提供。" msgstr "The commands must be provided as a List" -#: qd-core/src/qd_core/utils/shell.py:50 qd-core/src/qd_core/utils/shell.py:51 +#: qd-core/src/qd_core/utils/shell.py:51 qd-core/src/qd_core/utils/shell.py:52 msgid "环境变量必须以字典形式提供。" msgstr "Environment variables must be provided as a Dict" -#: qd-core/src/qd_core/utils/shell.py:52 +#: qd-core/src/qd_core/utils/shell.py:53 msgid "设置环境变量: {envs}" msgstr "Setting environment variables: {envs}" -#: qd-core/src/qd_core/utils/shell.py:59 +#: qd-core/src/qd_core/utils/shell.py:60 msgid "执行命令时发生OS错误: {e}" msgstr "OS error occurred while executing command: {e}" -#: qd-core/src/qd_core/utils/shell.py:62 +#: qd-core/src/qd_core/utils/shell.py:63 msgid "无效的命令或环境变量设置: {e}" msgstr "Invalid command or environment variable setting: {e}" From 96305eba25d72a20da0d8e327419b161acb463f5 Mon Sep 17 00:00:00 2001 From: a76yyyy <56478790+a76yyyy@users.noreply.github.com> Date: Sun, 22 Dec 2024 14:50:23 +0800 Subject: [PATCH 3/4] New translations qd_core.po (Chinese Simplified) --- .../qd_core/locale/zh_CN/LC_MESSAGES/messages.po | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qd-core/src/qd_core/locale/zh_CN/LC_MESSAGES/messages.po b/qd-core/src/qd_core/locale/zh_CN/LC_MESSAGES/messages.po index 071cf1d9d5..b3c0b1e3a8 100644 --- a/qd-core/src/qd_core/locale/zh_CN/LC_MESSAGES/messages.po +++ b/qd-core/src/qd_core/locale/zh_CN/LC_MESSAGES/messages.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: qd-today\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2024-12-09 00:47+0800\n" -"PO-Revision-Date: 2024-12-08 16:53\n" +"PO-Revision-Date: 2024-12-22 06:50\n" "Last-Translator: a76yyyy \n" "Language-Team: Chinese Simplified\n" "MIME-Version: 1.0\n" @@ -174,19 +174,19 @@ msgstr "推送图片 URL" #: qd-core/src/qd_core/config.py:319 msgid "Multi-language directory, default is {locale_dir}" -msgstr "" +msgstr "多语言文件目录, 默认为 {locale_dir}" #: qd-core/src/qd_core/config.py:325 msgid "Locale, default is zh_CN" -msgstr "" +msgstr "本地化,默认值为 zh_CN" #: qd-core/src/qd_core/config.py:329 msgid "Default locale, default is en_US" -msgstr "" +msgstr "默认本地化配置,默认为 en_US" #: qd-core/src/qd_core/config.py:333 msgid "Multilingual domain, default is messages" -msgstr "" +msgstr "多语言域,默认是 messages" #: qd-core/src/qd_core/config.py:338 msgid "日志配置" @@ -222,7 +222,7 @@ msgstr "推送配置" #: qd-core/src/qd_core/config.py:356 msgid "多语言配置" -msgstr "" +msgstr "多语言配置" #: qd-core/src/qd_core/client/fetcher.py:132 msgid "for循环只支持可迭代类型及变量" @@ -372,7 +372,7 @@ msgstr "明天" #: qd-core/src/qd_core/plugins/base.py:35 msgid "Added API route: {path} {methods}" -msgstr "" +msgstr "已添加 API 路由: {path} {methods}" #: qd-core/src/qd_core/plugins/default.py:28 #, python-format @@ -756,7 +756,7 @@ msgstr "模块 {v} 不能在评估上下文中使用\n" #: qd-core/src/qd_core/utils/shell.py:13 #, python-format msgid "Running command: %s %s" -msgstr "" +msgstr "运行中命令: %s %s" #: qd-core/src/qd_core/utils/shell.py:33 msgid "An error occurred during command execution: {e}" From 0a2332737bcb8452dcd74849a6560f6daebf6ae8 Mon Sep 17 00:00:00 2001 From: a76yyyy <56478790+a76yyyy@users.noreply.github.com> Date: Sun, 22 Dec 2024 15:04:37 +0800 Subject: [PATCH 4/4] New translations qd_core.po (English) --- .../qd_core/locale/en_US/LC_MESSAGES/messages.po | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qd-core/src/qd_core/locale/en_US/LC_MESSAGES/messages.po b/qd-core/src/qd_core/locale/en_US/LC_MESSAGES/messages.po index 0a2b5305c4..94b87e909b 100644 --- a/qd-core/src/qd_core/locale/en_US/LC_MESSAGES/messages.po +++ b/qd-core/src/qd_core/locale/en_US/LC_MESSAGES/messages.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: qd-today\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2024-12-09 00:47+0800\n" -"PO-Revision-Date: 2024-12-08 16:53\n" +"PO-Revision-Date: 2024-12-22 07:04\n" "Last-Translator: a76yyyy \n" "Language-Team: English\n" "MIME-Version: 1.0\n" @@ -174,19 +174,19 @@ msgstr "Push picture URL" #: qd-core/src/qd_core/config.py:319 msgid "Multi-language directory, default is {locale_dir}" -msgstr "" +msgstr "Multi-language directory, default is {locale_dir}" #: qd-core/src/qd_core/config.py:325 msgid "Locale, default is zh_CN" -msgstr "" +msgstr "Locale, default is zh_CN" #: qd-core/src/qd_core/config.py:329 msgid "Default locale, default is en_US" -msgstr "" +msgstr "Default locale, default is en_US" #: qd-core/src/qd_core/config.py:333 msgid "Multilingual domain, default is messages" -msgstr "" +msgstr "Multilingual domain, default is messages" #: qd-core/src/qd_core/config.py:338 msgid "日志配置" @@ -222,7 +222,7 @@ msgstr "Push settings" #: qd-core/src/qd_core/config.py:356 msgid "多语言配置" -msgstr "" +msgstr "Multi-language settings" #: qd-core/src/qd_core/client/fetcher.py:132 msgid "for循环只支持可迭代类型及变量" @@ -372,7 +372,7 @@ msgstr "tomorrow" #: qd-core/src/qd_core/plugins/base.py:35 msgid "Added API route: {path} {methods}" -msgstr "" +msgstr "Added API route: {path} {methods}" #: qd-core/src/qd_core/plugins/default.py:28 #, python-format @@ -756,7 +756,7 @@ msgstr "Module {v} can not be used in evaluation contexts\n" #: qd-core/src/qd_core/utils/shell.py:13 #, python-format msgid "Running command: %s %s" -msgstr "" +msgstr "Running command: %s %s" #: qd-core/src/qd_core/utils/shell.py:33 msgid "An error occurred during command execution: {e}"