Skip to content

Commit 7553cf7

Browse files
committed
refactor: rename admin_name to admin_username
1 parent 4b9fd39 commit 7553cf7

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

Diff for: i18n/en_US.yaml

+5-4
Original file line numberDiff line numberDiff line change
@@ -1679,11 +1679,12 @@ ui:
16791679
label: Private
16801680
switch: Login required
16811681
text: Only logged in users can access this community.
1682-
admin_name:
1683-
label: Name
1684-
msg: Name cannot be empty.
1682+
admin_username:
1683+
label: Username
1684+
caption: People can mention you as "@username".
1685+
msg: Username cannot be empty.
1686+
msg_max_length: Username up to 30 characters.
16851687
character: 'Must use the character set "a-z", "0-9", " - . _"'
1686-
msg_max_length: Name must be at maximum 30 characters in length.
16871688
admin_password:
16881689
label: Password
16891690
text: >-

Diff for: i18n/zh_CN.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1642,11 +1642,12 @@ ui:
16421642
label: 私有的
16431643
switch: 需要登录
16441644
text: 只有登录用户才能访问这个社区。
1645-
admin_name:
1646-
label: 名字
1645+
admin_username:
1646+
label: 用户名
1647+
caption: 用户可以通过 "@用户名" 来提及你。
16471648
msg: 名字不能为空。
1649+
msg_max_length: 用户名不能超过 30 个字符。
16481650
character: '只能由 "a-z", "0-9", " - . _" 组成'
1649-
msg_max_length: 名字长度不能超过 30 个字符。
16501651
admin_password:
16511652
label: 密码
16521653
text: >-

Diff for: ui/src/pages/Install/components/FourthStep/index.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -113,21 +113,21 @@ const Index: FC<Props> = ({ visible, data, changeCallback, nextCallback }) => {
113113
data.name = {
114114
value: '',
115115
isInvalid: true,
116-
errorMsg: t('admin_name.msg'),
116+
errorMsg: t('admin_username.msg'),
117117
};
118118
} else if (/[^a-z0-9\-._]/.test(name.value)) {
119119
bol = false;
120120
data.name = {
121121
value: name.value,
122122
isInvalid: true,
123-
errorMsg: t('admin_name.character'),
123+
errorMsg: t('admin_username.character'),
124124
};
125125
} else if (data.name.value.length > 30) {
126126
bol = false;
127127
data.name = {
128128
value: data.name.value,
129129
isInvalid: true,
130-
errorMsg: t('admin_name.msg_max_length'),
130+
errorMsg: t('admin_username.msg_max_length'),
131131
};
132132
}
133133

@@ -290,7 +290,7 @@ const Index: FC<Props> = ({ visible, data, changeCallback, nextCallback }) => {
290290

291291
<h5>{t('admin_account')}</h5>
292292
<Form.Group controlId="name" className="mb-3">
293-
<Form.Label>{t('admin_name.label')}</Form.Label>
293+
<Form.Label>{t('admin_username.label')}</Form.Label>
294294
<Form.Control
295295
required
296296
value={data.name.value}
@@ -305,6 +305,7 @@ const Index: FC<Props> = ({ visible, data, changeCallback, nextCallback }) => {
305305
});
306306
}}
307307
/>
308+
<Form.Text>{t('admin_username.caption')}</Form.Text>
308309
<Form.Control.Feedback type="invalid">
309310
{data.name.errorMsg}
310311
</Form.Control.Feedback>

0 commit comments

Comments
 (0)