This is an automated email from the ASF dual-hosted git repository.

shuai pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git

commit c0f6f8c75d87907c9ce3a07b17babce077065a9e
Author: hgaol <[email protected]>
AuthorDate: Wed Jun 12 23:19:57 2024 +0800

    update translations
---
 i18n/af_ZA.yaml                                             | 3 ++-
 i18n/ar_SA.yaml                                             | 3 ++-
 i18n/az_AZ.yaml                                             | 3 ++-
 i18n/bal_BA.yaml                                            | 3 ++-
 i18n/ban_ID.yaml                                            | 3 ++-
 i18n/bn_BD.yaml                                             | 3 ++-
 i18n/bs_BA.yaml                                             | 3 ++-
 i18n/ca_ES.yaml                                             | 3 ++-
 i18n/cs_CZ.yaml                                             | 4 ++--
 i18n/cy_GB.yaml                                             | 4 ++--
 i18n/da_DK.yaml                                             | 4 ++--
 i18n/el_GR.yaml                                             | 3 ++-
 i18n/en_US.yaml                                             | 4 ++--
 i18n/fi_FI.yaml                                             | 3 ++-
 i18n/he_IL.yaml                                             | 3 ++-
 i18n/hi_IN.yaml                                             | 4 ++--
 i18n/hu_HU.yaml                                             | 3 ++-
 i18n/hy_AM.yaml                                             | 3 ++-
 i18n/ja_JP.yaml                                             | 4 ++--
 i18n/nl_NL.yaml                                             | 3 ++-
 i18n/no_NO.yaml                                             | 3 ++-
 i18n/sq_AL.yaml                                             | 3 ++-
 i18n/sr_SP.yaml                                             | 3 ++-
 i18n/sv_SE.yaml                                             | 4 ++--
 i18n/tr_TR.yaml                                             | 4 ++--
 i18n/vi_VN.yaml                                             | 4 ++--
 i18n/zh_CN.yaml                                             | 4 ++--
 i18n/zh_TW.yaml                                             | 4 ++--
 ui/src/pages/Users/Register/components/SignUpForm/index.tsx | 4 ++--
 29 files changed, 58 insertions(+), 41 deletions(-)

diff --git a/i18n/af_ZA.yaml b/i18n/af_ZA.yaml
index 8c6d0d7d..1311b59d 100644
--- a/i18n/af_ZA.yaml
+++ b/i18n/af_ZA.yaml
@@ -619,7 +619,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/ar_SA.yaml b/i18n/ar_SA.yaml
index 39b63e8c..2b2be9e0 100644
--- a/i18n/ar_SA.yaml
+++ b/i18n/ar_SA.yaml
@@ -619,7 +619,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/az_AZ.yaml b/i18n/az_AZ.yaml
index 07e50541..190d483e 100644
--- a/i18n/az_AZ.yaml
+++ b/i18n/az_AZ.yaml
@@ -612,7 +612,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/bal_BA.yaml b/i18n/bal_BA.yaml
index 07e50541..190d483e 100644
--- a/i18n/bal_BA.yaml
+++ b/i18n/bal_BA.yaml
@@ -612,7 +612,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/ban_ID.yaml b/i18n/ban_ID.yaml
index 07e50541..190d483e 100644
--- a/i18n/ban_ID.yaml
+++ b/i18n/ban_ID.yaml
@@ -612,7 +612,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/bn_BD.yaml b/i18n/bn_BD.yaml
index 07e50541..190d483e 100644
--- a/i18n/bn_BD.yaml
+++ b/i18n/bn_BD.yaml
@@ -612,7 +612,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/bs_BA.yaml b/i18n/bs_BA.yaml
index 07e50541..190d483e 100644
--- a/i18n/bs_BA.yaml
+++ b/i18n/bs_BA.yaml
@@ -612,7 +612,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/ca_ES.yaml b/i18n/ca_ES.yaml
index 39b63e8c..2b2be9e0 100644
--- a/i18n/ca_ES.yaml
+++ b/i18n/ca_ES.yaml
@@ -619,7 +619,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/cs_CZ.yaml b/i18n/cs_CZ.yaml
index eac0631a..83a15477 100644
--- a/i18n/cs_CZ.yaml
+++ b/i18n/cs_CZ.yaml
@@ -883,8 +883,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
-        character: 'Must use the character set "a-z", "0-9", " - . _"'
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/cy_GB.yaml b/i18n/cy_GB.yaml
index 2af2fde0..44ba77ea 100644
--- a/i18n/cy_GB.yaml
+++ b/i18n/cy_GB.yaml
@@ -883,8 +883,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
-        character: 'Must use the character set "a-z", "0-9", " - . _"'
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/da_DK.yaml b/i18n/da_DK.yaml
index 2a7cf3ee..1390139c 100644
--- a/i18n/da_DK.yaml
+++ b/i18n/da_DK.yaml
@@ -883,8 +883,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
-        character: 'Must use the character set "a-z", "0-9", " - . _"'
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/el_GR.yaml b/i18n/el_GR.yaml
index 39b63e8c..2b2be9e0 100644
--- a/i18n/el_GR.yaml
+++ b/i18n/el_GR.yaml
@@ -619,7 +619,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/en_US.yaml b/i18n/en_US.yaml
index 11262705..c949777c 100644
--- a/i18n/en_US.yaml
+++ b/i18n/en_US.yaml
@@ -926,8 +926,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
-        character: 'Must use the character set "a-z", "0-9", " - . _"'
+        range: Length of name should between 4 to 30 characters.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/fi_FI.yaml b/i18n/fi_FI.yaml
index 39b63e8c..2b2be9e0 100644
--- a/i18n/fi_FI.yaml
+++ b/i18n/fi_FI.yaml
@@ -619,7 +619,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/he_IL.yaml b/i18n/he_IL.yaml
index 39b63e8c..2b2be9e0 100644
--- a/i18n/he_IL.yaml
+++ b/i18n/he_IL.yaml
@@ -619,7 +619,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/hi_IN.yaml b/i18n/hi_IN.yaml
index 2a7cf3ee..1390139c 100644
--- a/i18n/hi_IN.yaml
+++ b/i18n/hi_IN.yaml
@@ -883,8 +883,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
-        character: 'Must use the character set "a-z", "0-9", " - . _"'
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/hu_HU.yaml b/i18n/hu_HU.yaml
index 39b63e8c..2b2be9e0 100644
--- a/i18n/hu_HU.yaml
+++ b/i18n/hu_HU.yaml
@@ -619,7 +619,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/hy_AM.yaml b/i18n/hy_AM.yaml
index 07e50541..190d483e 100644
--- a/i18n/hy_AM.yaml
+++ b/i18n/hy_AM.yaml
@@ -612,7 +612,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/ja_JP.yaml b/i18n/ja_JP.yaml
index 10859efd..76d6259e 100644
--- a/i18n/ja_JP.yaml
+++ b/i18n/ja_JP.yaml
@@ -883,8 +883,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
-        character: 'Must use the character set "a-z", "0-9", " - . _"'
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: メールアドレス
       msg:
diff --git a/i18n/nl_NL.yaml b/i18n/nl_NL.yaml
index 39b63e8c..2b2be9e0 100644
--- a/i18n/nl_NL.yaml
+++ b/i18n/nl_NL.yaml
@@ -619,7 +619,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/no_NO.yaml b/i18n/no_NO.yaml
index 39b63e8c..2b2be9e0 100644
--- a/i18n/no_NO.yaml
+++ b/i18n/no_NO.yaml
@@ -619,7 +619,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/sq_AL.yaml b/i18n/sq_AL.yaml
index 07e50541..190d483e 100644
--- a/i18n/sq_AL.yaml
+++ b/i18n/sq_AL.yaml
@@ -612,7 +612,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/sr_SP.yaml b/i18n/sr_SP.yaml
index 39b63e8c..2b2be9e0 100644
--- a/i18n/sr_SP.yaml
+++ b/i18n/sr_SP.yaml
@@ -619,7 +619,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/sv_SE.yaml b/i18n/sv_SE.yaml
index 66722d03..7649b2ac 100644
--- a/i18n/sv_SE.yaml
+++ b/i18n/sv_SE.yaml
@@ -883,8 +883,8 @@ ui:
       label: Namn
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
-        character: 'Must use the character set "a-z", "0-9", " - . _"'
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: E-postadress
       msg:
diff --git a/i18n/tr_TR.yaml b/i18n/tr_TR.yaml
index 9d2c8aca..566a7dd9 100644
--- a/i18n/tr_TR.yaml
+++ b/i18n/tr_TR.yaml
@@ -883,8 +883,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
-        character: 'Must use the character set "a-z", "0-9", " - . _"'
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/vi_VN.yaml b/i18n/vi_VN.yaml
index a66565d1..a0f685bb 100644
--- a/i18n/vi_VN.yaml
+++ b/i18n/vi_VN.yaml
@@ -883,8 +883,8 @@ ui:
       label: Name
       msg:
         empty: Name cannot be empty.
-        range: Name up to 30 characters.
-        character: 'Must use the character set "a-z", "0-9", " - . _"'
+        range: Name must between 4 to 30 characters in length.
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: Email
       msg:
diff --git a/i18n/zh_CN.yaml b/i18n/zh_CN.yaml
index 22df91c6..cb714a96 100644
--- a/i18n/zh_CN.yaml
+++ b/i18n/zh_CN.yaml
@@ -893,8 +893,8 @@ ui:
       label: 名字
       msg:
         empty: 名字不能为空
-        range: 名字最多 30 个字符
-        character: '只能由 "a-z"、"0-9"、" - . _" 组成'
+        range: 名字应该在 4 到 30 个字符之间
+        character: '只能由 "a-z"、"A-Z"、"0-9"、" - . _" 组成'
     email:
       label: 邮箱
       msg:
diff --git a/i18n/zh_TW.yaml b/i18n/zh_TW.yaml
index 3e3f26b0..48c2d343 100644
--- a/i18n/zh_TW.yaml
+++ b/i18n/zh_TW.yaml
@@ -883,8 +883,8 @@ ui:
       label: 名稱
       msg:
         empty: 名稱不能為空
-        range: 名稱最多 30 個字元
-        character: 'Must use the character set "a-z", "0-9", " - . _"'
+        range: 名稱在 4 到 30 個字元
+        character: 'Must use the character set "a-z", "A-Z", "0-9", " - . _"'
     email:
       label: 郵箱
       msg:
diff --git a/ui/src/pages/Users/Register/components/SignUpForm/index.tsx 
b/ui/src/pages/Users/Register/components/SignUpForm/index.tsx
index ba9d4fb8..0cbd41f0 100644
--- a/ui/src/pages/Users/Register/components/SignUpForm/index.tsx
+++ b/ui/src/pages/Users/Register/components/SignUpForm/index.tsx
@@ -72,14 +72,14 @@ const Index: React.FC<Props> = ({ callback }) => {
         isInvalid: true,
         errorMsg: t('name.msg.empty'),
       };
-    } else if (name.value.length > 30) {
+    } else if (name.value.length < 4 || name.value.length > 30) {
       bol = false;
       formData.name = {
         value: '',
         isInvalid: true,
         errorMsg: t('name.msg.range'),
       };
-    } else if (!nameRegex.test(name.value.length)) {
+    } else if (!nameRegex.test(name.value)) {
       bol = false;
       formData.name = {
         value: '',

Reply via email to