From d4a96614b39e23b49d63dcbe5ab0a2bf174a3c9f Mon Sep 17 00:00:00 2001 From: john Date: Mon, 3 Jun 2024 18:42:17 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复翻译 --- src/components/PhoneForm.tsx | 2 +- src/i18n/cn/translation.json | 5 +++-- src/i18n/en/translation.json | 41 ++++++++++++++++++------------------ 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/components/PhoneForm.tsx b/src/components/PhoneForm.tsx index 7579e3e..84b4292 100644 --- a/src/components/PhoneForm.tsx +++ b/src/components/PhoneForm.tsx @@ -182,7 +182,7 @@ function PhoneForm() { { validator: (_, v) => { if (v != "" && !/^\d+$/.test(v)) { - return Promise.reject(new Error("无效手机号")); + return Promise.reject(new Error(t("Invalid phone number"))); } return Promise.resolve(); }, diff --git a/src/i18n/cn/translation.json b/src/i18n/cn/translation.json index a22812d..6d02926 100644 --- a/src/i18n/cn/translation.json +++ b/src/i18n/cn/translation.json @@ -19,5 +19,6 @@ "Official Website": "官方網站", "Download": "下載", "send successfully": "發送成功", - "Send failure": "發送失敗" -} \ No newline at end of file + "Send failure": "發送失敗", + "Invalid phone number": "無效手機號碼" +} diff --git a/src/i18n/en/translation.json b/src/i18n/en/translation.json index 3e24ed8..e79f857 100644 --- a/src/i18n/en/translation.json +++ b/src/i18n/en/translation.json @@ -1,23 +1,24 @@ { "E-mail": "E-mail", - "phone":"phone", - "Please enter your email address":"Please enter your email address", - "Please enter the email verification code":"Please enter the email verification code", - "Please enter your phone number":"Please enter your phone number", - "Please enter SMS verification code":"Please enter SMS verification code", - "Send verification code":"Send verification code", - "Please enter the invitation code (optional)":"Please enter the invitation code (optional)", - "register":"Register", - "If you already have an account":"If you already have an account", - "download the APP directly":"download the APP directly", - "Continuing to represent you in agreeing to our":"Continuing to represent you in agreeing to our", - "Terms of Service":"Terms of Service", - "and":"and", - "Privacy Policy":"Privacy Policy", - "Select country/region":"Select country/region", - "seconds": "s", - "Official Website":"Official Website", - "Download":"Download", - "send successfully":"send successfully", - "Send failure":"Send failure" + "phone": "phone", + "Please enter your email address": "Please enter your email address", + "Please enter the email verification code": "Please enter the email verification code", + "Please enter your phone number": "Please enter your phone number", + "Please enter SMS verification code": "Please enter SMS verification code", + "Send verification code": "Send verification code", + "Please enter the invitation code (optional)": "Please enter the invitation code (optional)", + "register": "Register", + "If you already have an account": "If you already have an account", + "download the APP directly": "download the APP directly", + "Continuing to represent you in agreeing to our": "Continuing to represent you in agreeing to our", + "Terms of Service": "Terms of Service", + "and": "and", + "Privacy Policy": "Privacy Policy", + "Select country/region": "Select country/region", + "seconds": "s", + "Official Website": "Official Website", + "Download": "Download", + "send successfully": "send successfully", + "Send failure": "Send failure", + "Invalid phone number": "Invalid phone number" }