You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by sh...@apache.org on 2024/06/13 07:53:37 UTC
(incubator-answer) branch test updated (f8784485 -> 323c926a)
This is an automated email from the ASF dual-hosted git repository.
shuai pushed a change to branch test
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
from f8784485 fix: add basepath logic to route jump
new 156ef00f fix: incomplete display of error message alerts on registration page
new 323c926a update translations
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
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 ++--
.../Users/Register/components/SignUpForm/index.tsx | 26 +++++++++++++++++++++-
29 files changed, 81 insertions(+), 40 deletions(-)
(incubator-answer) 01/02: fix: incomplete display of error message alerts on registration page
Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
shuai pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
commit 156ef00f8d61fdbcbac755803ae984c4ee79df6b
Author: hgaol <dh...@hotmail.com>
AuthorDate: Wed Jun 12 23:07:27 2024 +0800
fix: incomplete display of error message alerts on registration page
---
.../Users/Register/components/SignUpForm/index.tsx | 26 +++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/ui/src/pages/Users/Register/components/SignUpForm/index.tsx b/ui/src/pages/Users/Register/components/SignUpForm/index.tsx
index bfa5d23e..ba9d4fb8 100644
--- a/ui/src/pages/Users/Register/components/SignUpForm/index.tsx
+++ b/ui/src/pages/Users/Register/components/SignUpForm/index.tsx
@@ -55,6 +55,7 @@ const Index: React.FC<Props> = ({ callback }) => {
const updateUser = userStore((state) => state.update);
const emailCaptcha = useCaptchaPlugin('email');
+ const nameRegex = /^[\w.-\s]{4,30}$/;
const handleChange = (params: FormDataType) => {
setFormData({ ...formData, ...params });
@@ -62,7 +63,30 @@ const Index: React.FC<Props> = ({ callback }) => {
const checkValidated = (): boolean => {
let bol = true;
- const { e_mail, pass } = formData;
+ const { name, e_mail, pass } = formData;
+
+ if (!name.value) {
+ bol = false;
+ formData.name = {
+ value: '',
+ isInvalid: true,
+ errorMsg: t('name.msg.empty'),
+ };
+ } else if (name.value.length > 30) {
+ bol = false;
+ formData.name = {
+ value: '',
+ isInvalid: true,
+ errorMsg: t('name.msg.range'),
+ };
+ } else if (!nameRegex.test(name.value.length)) {
+ bol = false;
+ formData.name = {
+ value: '',
+ isInvalid: true,
+ errorMsg: t('name.msg.character'),
+ };
+ }
if (!e_mail.value) {
bol = false;
(incubator-answer) 02/02: update translations
Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
shuai pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
commit 323c926a9222b0ae86268620325049de6ca86725
Author: hgaol <dh...@hotmail.com>
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 8abf2aa4..8227460c 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 07845856..a6c48ffa 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 daad5a37..2252bdcd 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 daad5a37..2252bdcd 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 daad5a37..2252bdcd 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 daad5a37..2252bdcd 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 daad5a37..2252bdcd 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 07845856..a6c48ffa 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 2f7c23f7..9f4155d8 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 01a7a35b..c838571f 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 bfeab790..44d90588 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 07845856..a6c48ffa 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 a60919ee..ca89ae59 100644
--- a/i18n/en_US.yaml
+++ b/i18n/en_US.yaml
@@ -930,8 +930,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 07845856..a6c48ffa 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 07845856..a6c48ffa 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 bfeab790..44d90588 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 07845856..a6c48ffa 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 daad5a37..2252bdcd 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 9146e724..bf6b3196 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 07845856..a6c48ffa 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 07845856..a6c48ffa 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 daad5a37..2252bdcd 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 07845856..a6c48ffa 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 6e8f2b0a..1b43ceb8 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 c5695ffb..7f151f21 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 132fd318..05ced5fa 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 701402bd..8e1d271c 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 59dc87aa..42fba053 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: '',