From 19b7e2ba5ea45032159aee2833c5100987d4508d Mon Sep 17 00:00:00 2001 From: AnnAngela-work Date: Sun, 3 Apr 2022 22:08:03 +0800 Subject: [PATCH 1/6] Using grep to search `$t("foo")`-like pattern to fill up the missing part of en i18n file --- src/languages/en.js | 61 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 6 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 4ee696b9..4205af67 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -331,21 +331,21 @@ export default { dark: "dark", Post: "Post", "Please input title and content": "Please input title and content", - "Created": "Created", + Created: "Created", "Last Updated": "Last Updated", - "Unpin": "Unpin", + Unpin: "Unpin", "Switch to Light Theme": "Switch to Light Theme", "Switch to Dark Theme": "Switch to Dark Theme", "Show Tags": "Show Tags", "Hide Tags": "Hide Tags", - "Description": "Description", + Description: "Description", "No monitors available.": "No monitors available.", "Add one": "Add one", "No Monitors": "No Monitors", "Untitled Group": "Untitled Group", - "Services": "Services", - "Discard": "Discard", - "Cancel": "Cancel", + Services: "Services", + Discard: "Discard", + Cancel: "Cancel", "Powered by": "Powered by", shrinkDatabaseDescription: "Trigger database VACUUM for SQLite. If your database is created after 1.10.0, AUTO_VACUUM is already enabled and this action is not needed.", serwersms: "SerwerSMS.pl", @@ -379,4 +379,53 @@ export default { proxyDescription: "Proxies must be assigned to a monitor to function.", enableProxyDescription: "This proxy will not effect on monitor requests until it is activated. You can control temporarily disable the proxy from all monitors by activation status.", setAsDefaultProxyDescription: "This proxy will be enabled by default for new monitors. You can still disable the proxy separately for each monitor.", + "Certificate Chain": "Certificate Chain", + Valid: "Valid", + Invalid: "Invalid", + AccessKeyId: "AccessKeyId", + SecretAccessKey: "SecretAccessKey", + PhoneNumbers: "PhoneNumbers", + TemplateCode: "TemplateCode", + SignName: "SignName", + "Sms template must contain parameters: ": "Sms template must contain parameters: ", + "Bark Endpoint": "Bark Endpoint", + WebHookUrl: "WebHookUrl", + SecretKey: "SecretKey", + "For safety, must use secret key": "For safety, must use secret key", + "Device Token": "Device Token", + Platform: "Platform", + iOS: "iOS", + Android: "Android", + Huawei: "Huawei", + High: "High", + Retry: "Retry", + Topic: "Topic", + "WeCom Bot Key": "WeCom Bot Key", + "Setup Proxy": "Setup Proxy", + "Proxy Protocol": "Proxy Protocol", + "Proxy Server": "Proxy Server", + "Proxy server has authentication": "Proxy server has authentication", + User: "User", + Installed: "Installed", + "Not installed": "Not installed", + Running: "Running", + "Not running": "Not running", + "Remove Token": "Remove Token", + Start: "Start", + Stop: "Stop", + "Uptime Kuma": "Uptime Kuma", + "Add New Status Page": "Add New Status Page", + Slug: "Slug", + "Accept characters:": "Accept characters:", + "Start or end with": "Start or end with", + "No consecutive dashes": "No consecutive dashes", + Next: "Next", + "The slug is already taken. Please choose another slug.": "The slug is already taken. Please choose another slug.", + "No Proxy": "No Proxy", + "HTTP Basic Auth": "HTTP Basic Auth", + "New Status Page": "New Status Page", + "Page Not Found": "Page Not Found", + "Reverse Proxy": "Reverse Proxy", + Backup: "Backup", + About: "About", }; From 43eed45baeec59ba706be5b938a56593b1524a4a Mon Sep 17 00:00:00 2001 From: AnnAngela-work Date: Sun, 3 Apr 2022 22:08:24 +0800 Subject: [PATCH 2/6] first part of zh-CN.js translation --- src/languages/zh-CN.js | 60 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/src/languages/zh-CN.js b/src/languages/zh-CN.js index 1f2439b0..4b51ec0d 100644 --- a/src/languages/zh-CN.js +++ b/src/languages/zh-CN.js @@ -373,4 +373,64 @@ export default { "For safety, must use secret key": "出于安全考虑,必须使用加签密钥", WeCom: "企业微信群机器人", "WeCom Bot Key": "企业微信群机器人 Key", + PushByTechulus: "Push by Techulus", + gorush: "Gorush", + alerta: "Alerta", + alertaApiEndpoint: "API 接入点", + alertaEnvironment: "环境参数", + alertaApiKey: "API Key", + alertaAlertState: "报警时的严重性", + alertaRecoverState: "恢复后的严重性", + deleteStatusPageMsg: "你确认要删除此状态页吗?", + Proxies: "代理", + default: "默认", + enabled: "启用", + setAsDefault: "设为默认", + deleteProxyMsg: "你确认要在所有监控项中删除此代理吗?", + proxyDescription: "代理必须配置到至少一个监控项后才会工作。", + enableProxyDescription: "此代理只有在启用后才会对监控项的网络请求起作用。你可以通过修改激活状态来临时令此代理在所有监控项中禁用。", + setAsDefaultProxyDescription: "此代理会对新创建的监控项默认激活,你仍可以在监控项配置中单独禁用此代理。", + "Proxy Protocol": "代理协议", + "Proxy Server": "代理服务器", + "Server Address": "服务器地址", + "Certificate Chain": "Certificate Chain", + Valid: "Valid", + Invalid: "Invalid", + AccessKeyId: "AccessKeyId", + SecretAccessKey: "SecretAccessKey", + PhoneNumbers: "PhoneNumbers", + TemplateCode: "TemplateCode", + SignName: "SignName", + "Bark Endpoint": "Bark Endpoint", + "Device Token": "Device Token", + Platform: "Platform", + iOS: "iOS", + Android: "Android", + Huawei: "Huawei", + High: "High", + Retry: "Retry", + Topic: "Topic", + "Setup Proxy": "Setup Proxy", + "Proxy server has authentication": "Proxy server has authentication", + User: "User", + Installed: "Installed", + "Not installed": "Not installed", + Running: "Running", + "Not running": "Not running", + "Remove Token": "Remove Token", + Start: "Start", + Stop: "Stop", + "Uptime Kuma": "Uptime Kuma", + "Add New Status Page": "Add New Status Page", + Slug: "Slug", + "Accept characters:": "Accept characters:", + "Start or end with": "Start or end with", + "No consecutive dashes": "No consecutive dashes", + Next: "Next", + "The slug is already taken. Please choose another slug.": "The slug is already taken. Please choose another slug.", + "No Proxy": "No Proxy", + "HTTP Basic Auth": "HTTP Basic Auth", + "New Status Page": "New Status Page", + "Page Not Found": "Page Not Found", + "Reverse Proxy": "Reverse Proxy", }; From 706d6cee072385a4a7a30d079326eba9727ed5a8 Mon Sep 17 00:00:00 2001 From: AnnAngela Date: Mon, 4 Apr 2022 11:33:02 +0800 Subject: [PATCH 3/6] Update some components to use i18n function, update en & zh-CN translation --- src/components/CertificateInfoRow.vue | 10 +-- src/components/settings/ReverseProxy.vue | 19 +++-- src/languages/en.js | 20 +++++- src/languages/zh-CN.js | 88 ++++++++++++++---------- src/pages/AddStatusPage.vue | 4 +- src/pages/ManageStatusPage.vue | 2 +- 6 files changed, 90 insertions(+), 53 deletions(-) diff --git a/src/components/CertificateInfoRow.vue b/src/components/CertificateInfoRow.vue index df726eb7..3ac22f3b 100644 --- a/src/components/CertificateInfoRow.vue +++ b/src/components/CertificateInfoRow.vue @@ -11,23 +11,23 @@ - + - + - + - + - + diff --git a/src/components/settings/ReverseProxy.vue b/src/components/settings/ReverseProxy.vue index d35d5353..c14c45e4 100644 --- a/src/components/settings/ReverseProxy.vue +++ b/src/components/settings/ReverseProxy.vue @@ -20,11 +20,16 @@
- Message: + {{ $t("Error Message:") }}
-

(Download cloudflared from Cloudflare Website)

+ + {{ $t("cloudflareWebsite") }} + @@ -44,7 +49,7 @@ {{ $t("Remove Token") }} - Don't know how to get the token? Please read the guide:
+ {{ $t("Don't know how to get the token? Please read the guide:") }}
https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy-with-Cloudflare-Tunnel @@ -61,7 +66,7 @@ - The current connection may be lost if you are currently connecting via Cloudflare Tunnel. Are you sure want to stop it? Type your current password to confirm it. + {{ $t("The current connection may be lost if you are currently connecting via Cloudflare Tunnel. Are you sure want to stop it? Type your current password to confirm it.") }}
-

Other Software

+

{{ $t("Other Software") }}

- For example: nginx, Apache and Traefik.
- Please read https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy. + {{ $t("For example: nginx, Apache and Traefik.") }}
+ {{ $t("Please read") }} https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy.
diff --git a/src/languages/en.js b/src/languages/en.js index 4205af67..cdcffa7f 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -382,8 +382,8 @@ export default { "Certificate Chain": "Certificate Chain", Valid: "Valid", Invalid: "Invalid", - AccessKeyId: "AccessKeyId", - SecretAccessKey: "SecretAccessKey", + AccessKeyId: "AccessKey ID", + SecretAccessKey: "AccessKey Secret", PhoneNumbers: "PhoneNumbers", TemplateCode: "TemplateCode", SignName: "SignName", @@ -417,7 +417,7 @@ export default { "Add New Status Page": "Add New Status Page", Slug: "Slug", "Accept characters:": "Accept characters:", - "Start or end with": "Start or end with", + "startOrEndWithOnly": "Start or end with {0} only", "No consecutive dashes": "No consecutive dashes", Next: "Next", "The slug is already taken. Please choose another slug.": "The slug is already taken. Please choose another slug.", @@ -428,4 +428,18 @@ export default { "Reverse Proxy": "Reverse Proxy", Backup: "Backup", About: "About", + wayToGetCloudflaredURL: "(Download cloudflared from {0})", + cloudflareWebsite: "Cloudflare Website", + "Error Message:": "Error Message:", + "Don't know how to get the token? Please read the guide:": "Don't know how to get the token? Please read the guide:", + "The current connection may be lost if you are currently connecting via Cloudflare Tunnel. Are you sure want to stop it? Type your current password to confirm it.": "The current connection may be lost if you are currently connecting via Cloudflare Tunnel. Are you sure want to stop it? Type your current password to confirm it.", + "Other Software": "Other Software", + "For example: nginx, Apache and Traefik.": "For example: nginx, Apache and Traefik.", + "Please read": "Please read", + "Subject:": "Subject:", + "Valid To:": "Valid To:", + "Days Remaining:": "Days Remaining:", + "Issuer:": "Issuer:", + "Fingerprint:": "Fingerprint:", + "No status pages": "No status pages", }; diff --git a/src/languages/zh-CN.js b/src/languages/zh-CN.js index 4b51ec0d..7ff6dbd0 100644 --- a/src/languages/zh-CN.js +++ b/src/languages/zh-CN.js @@ -88,8 +88,8 @@ export default { Dark: "黑暗", Auto: "自动", "Theme - Heartbeat Bar": "主题 - 心跳栏", - Normal: "正常显示", - Bottom: "靠下显示", + Normal: "正常", // 此处还供 Gorush 的通知优先级功能使用,不应翻译为“正常显示” + Bottom: "靠下", None: "不显示", Timezone: "时区", "Search Engine Visibility": "搜索引擎可见性", @@ -393,44 +393,60 @@ export default { "Proxy Protocol": "代理协议", "Proxy Server": "代理服务器", "Server Address": "服务器地址", - "Certificate Chain": "Certificate Chain", - Valid: "Valid", - Invalid: "Invalid", - AccessKeyId: "AccessKeyId", - SecretAccessKey: "SecretAccessKey", + "Certificate Chain": "证书链", + Valid: "有效", + Invalid: "无效", + AccessKeyId: "AccessKey ID", + SecretAccessKey: "AccessKey Secret", + /* 以下为阿里云短信服务 API Dysms#SendSms 的参数 */ PhoneNumbers: "PhoneNumbers", TemplateCode: "TemplateCode", SignName: "SignName", - "Bark Endpoint": "Bark Endpoint", - "Device Token": "Device Token", - Platform: "Platform", + /* 以上为阿里云短信服务 API Dysms#SendSms 的参数 */ + "Bark Endpoint": "Bark 接入点", + "Device Token": "Apple Device Token", + Platform: "平台", iOS: "iOS", Android: "Android", - Huawei: "Huawei", - High: "High", - Retry: "Retry", - Topic: "Topic", - "Setup Proxy": "Setup Proxy", - "Proxy server has authentication": "Proxy server has authentication", - User: "User", - Installed: "Installed", - "Not installed": "Not installed", - Running: "Running", - "Not running": "Not running", - "Remove Token": "Remove Token", - Start: "Start", - Stop: "Stop", + Huawei: "华为", + High: "高", + Retry: "重试次数", + Topic: "Gorush Topic", + "Setup Proxy": "设置代理", + "Proxy server has authentication": "代理服务器启用了身份验证功能", + User: "用户名", + Installed: "已安装", + "Not installed": "未安装", + Running: "运行中", + "Not running": "未运行", + "Error Message:": "错误信息:", + wayToGetCloudflaredURL: "(可从 {0} 下载 cloudflared)", + cloudflareWebsite: "Cloudflare 网站", + "Don't know how to get the token? Please read the guide:": "不知道如何获取 token?请阅读指南:", + "The current connection may be lost if you are currently connecting via Cloudflare Tunnel. Are you sure want to stop it? Type your current password to confirm it.": "如果你停止 Cloudflare Tunnel,所有通过 Cloudflare Tunnel 连接的请求可能丢失。你是否确定停止 Cloudflare Tunnel?请输入你的密码以确认。", + "Other Software": "其他软件", + "For example: nginx, Apache and Traefik.": "例如:nginx、Apache 和 Traefik。", + "Please read": "请阅读", + "Remove Token": "移除 Token", + Start: "启动", + Stop: "停止", "Uptime Kuma": "Uptime Kuma", - "Add New Status Page": "Add New Status Page", - Slug: "Slug", - "Accept characters:": "Accept characters:", - "Start or end with": "Start or end with", - "No consecutive dashes": "No consecutive dashes", - Next: "Next", - "The slug is already taken. Please choose another slug.": "The slug is already taken. Please choose another slug.", - "No Proxy": "No Proxy", - "HTTP Basic Auth": "HTTP Basic Auth", - "New Status Page": "New Status Page", - "Page Not Found": "Page Not Found", - "Reverse Proxy": "Reverse Proxy", + "Add New Status Page": "添加新的状态页", + Slug: "路径", + "Accept characters:": "可接受的字符:", + "startOrEndWithOnly": "开头和结尾必须为 {0}", + "No consecutive dashes": "不能有连续的破折号", + Next: "下一步", + "The slug is already taken. Please choose another slug.": "该路径已被使用。请选择其他路径。", + "No Proxy": "无代理", + "HTTP Basic Auth": "HTTP 基础身份验证", + "New Status Page": "新的状态页", + "Page Not Found": "状态页未找到", + "Reverse Proxy": "反向代理", + "Subject:": "颁发给:", + "Valid To:": "有效期至:", + "Days Remaining:": "剩余有效天数:", + "Issuer:": "颁发者:", + "Fingerprint:": "指纹:", + "No status pages": "无状态页", }; diff --git a/src/pages/AddStatusPage.vue b/src/pages/AddStatusPage.vue index 59c21ee9..e0200177 100644 --- a/src/pages/AddStatusPage.vue +++ b/src/pages/AddStatusPage.vue @@ -21,7 +21,9 @@
  • {{ $t("Accept characters:") }} a-z 0-9 -
  • -
  • {{ $t("Start or end with") }} a-z 0-9 only
  • + + a-z 0-9 +
  • {{ $t("No consecutive dashes") }} --
diff --git a/src/pages/ManageStatusPage.vue b/src/pages/ManageStatusPage.vue index a94956f5..4ea8bbf8 100644 --- a/src/pages/ManageStatusPage.vue +++ b/src/pages/ManageStatusPage.vue @@ -12,7 +12,7 @@
Subject:{{ $t("Subject:") }} {{ formatSubject(cert.subject) }}
Valid To:{{ $t("Valid To:") }}
Days Remaining:{{ $t("Days Remaining:") }} {{ cert.daysRemaining }}
Issuer:{{ $t("Issuer:") }} {{ formatSubject(cert.issuer) }}
Fingerprint:{{ $t("Fingerprint:") }} {{ cert.fingerprint }}