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" }