From 706d6cee072385a4a7a30d079326eba9727ed5a8 Mon Sep 17 00:00:00 2001 From: AnnAngela Date: Mon, 4 Apr 2022 11:33:02 +0800 Subject: [PATCH] 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 df726eb70..3ac22f3b6 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 d35d53535..c14c45e46 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 4205af670..cdcffa7f4 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 4b51ec0dc..7ff6dbd02 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 59c21ee95..e0200177e 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 a94956f5d..4ea8bbf81 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 }}