refactor: update UI text and error messages to English for better accessibility

This commit is contained in:
Laisky.Cai
2025-01-19 12:59:58 +00:00
parent 76ba80d406
commit 13b1b165bd
62 changed files with 805 additions and 805 deletions

View File

@@ -260,25 +260,25 @@ const SystemSetting = () => {
<Grid columns={1}>
<Grid.Column>
<Form loading={loading}>
<Header as='h3'>通用设置</Header>
<Header as='h3'>General Settings</Header>
<Form.Group widths='equal'>
<Form.Input
label='服务器地址'
placeholder='例如https://yourdomain.com'
label='Server Address'
placeholder='For examplehttps://yourdomain.com'
value={inputs.ServerAddress}
name='ServerAddress'
onChange={handleInputChange}
/>
</Form.Group>
<Form.Button onClick={submitServerAddress}>
更新服务器地址
Update Server Address
</Form.Button>
<Divider />
<Header as='h3'>配置登录注册</Header>
<Header as='h3'>Configure Login/Registration</Header>
<Form.Group inline>
<Form.Checkbox
checked={inputs.PasswordLoginEnabled === 'true'}
label='允许通过密码进行登录'
label='Allow login via password'
name='PasswordLoginEnabled'
onChange={handleInputChange}
/>
@@ -292,10 +292,10 @@ const SystemSetting = () => {
>
<Modal.Header>警告</Modal.Header>
<Modal.Content>
<p>取消密码登录将导致所有未绑定其他登录方式的用户包括管理员无法通过密码登录确认取消</p>
<p>Canceling password login will cause all users (including administrators) who have not bound other login methods to be unable to log in via password, confirm cancel?</p>
</Modal.Content>
<Modal.Actions>
<Button onClick={() => setShowPasswordWarningModal(false)}>取消</Button>
<Button onClick={() => setShowPasswordWarningModal(false)}>Cancel</Button>
<Button
color='yellow'
onClick={async () => {
@@ -310,25 +310,25 @@ const SystemSetting = () => {
}
<Form.Checkbox
checked={inputs.PasswordRegisterEnabled === 'true'}
label='允许通过密码进行注册'
label='Allow registration via password'
name='PasswordRegisterEnabled'
onChange={handleInputChange}
/>
<Form.Checkbox
checked={inputs.EmailVerificationEnabled === 'true'}
label='通过密码注册时需要进行邮箱验证'
label='Email verification is required when registering via password'
name='EmailVerificationEnabled'
onChange={handleInputChange}
/>
<Form.Checkbox
checked={inputs.GitHubOAuthEnabled === 'true'}
label='允许通过 GitHub 账户登录 & 注册'
label='Allow login & registration via GitHub account'
name='GitHubOAuthEnabled'
onChange={handleInputChange}
/>
<Form.Checkbox
checked={inputs.WeChatAuthEnabled === 'true'}
label='允许通过微信登录 & 注册'
label='Allow login & registration via WeChat'
name='WeChatAuthEnabled'
onChange={handleInputChange}
/>
@@ -336,13 +336,13 @@ const SystemSetting = () => {
<Form.Group inline>
<Form.Checkbox
checked={inputs.RegisterEnabled === 'true'}
label='允许新用户注册(此项为否时,新用户将无法以任何方式进行注册'
label='Allow new user registration (if this option is off, new users will not be able to register in any way'
name='RegisterEnabled'
onChange={handleInputChange}
/>
<Form.Checkbox
checked={inputs.TurnstileCheckEnabled === 'true'}
label='启用 Turnstile 用户校验'
label='Enable Turnstile user verification'
name='TurnstileCheckEnabled'
onChange={handleInputChange}
/>
@@ -350,11 +350,11 @@ const SystemSetting = () => {
<Divider />
<Header as='h3'>
配置邮箱域名白名单
<Header.Subheader>用以防止恶意用户利用临时邮箱批量注册</Header.Subheader>
<Header.Subheader>用以防止恶意Users利用临时邮箱批量Sign up</Header.Subheader>
</Header>
<Form.Group widths={3}>
<Form.Checkbox
label='启用邮箱域名白名单'
label='Enable邮箱域名白名单'
name='EmailDomainRestrictionEnabled'
onChange={handleInputChange}
checked={inputs.EmailDomainRestrictionEnabled === 'true'}
@@ -387,79 +387,79 @@ const SystemSetting = () => {
}
}}
autoComplete='new-password'
placeholder='输入新的允许的邮箱域名'
placeholder='Enter新的允许的邮箱域名'
value={restrictedDomainInput}
onChange={(e, { value }) => {
setRestrictedDomainInput(value);
}}
/>
</Form.Group>
<Form.Button onClick={submitEmailDomainWhitelist}>保存邮箱域名白名单设置</Form.Button>
<Form.Button onClick={submitEmailDomainWhitelist}>保存邮箱域名白名单Settings</Form.Button>
<Divider />
<Header as='h3'>
配置 SMTP
<Header.Subheader>用以支持系统的邮件发送</Header.Subheader>
Configure SMTP
<Header.Subheader>To support the system email sending</Header.Subheader>
</Header>
<Form.Group widths={3}>
<Form.Input
label='SMTP 服务器地址'
label='SMTP Server Address'
name='SMTPServer'
onChange={handleInputChange}
autoComplete='new-password'
value={inputs.SMTPServer}
placeholder='例如:smtp.qq.com'
placeholder='For example: smtp.qq.com'
/>
<Form.Input
label='SMTP 端口'
label='SMTP Port'
name='SMTPPort'
onChange={handleInputChange}
autoComplete='new-password'
value={inputs.SMTPPort}
placeholder='默认: 587'
placeholder='Default: 587'
/>
<Form.Input
label='SMTP 账户'
label='SMTP Account'
name='SMTPAccount'
onChange={handleInputChange}
autoComplete='new-password'
value={inputs.SMTPAccount}
placeholder='通常是邮箱地址'
placeholder='Usually an email address'
/>
</Form.Group>
<Form.Group widths={3}>
<Form.Input
label='SMTP 发送者邮箱'
label='SMTP Sender email'
name='SMTPFrom'
onChange={handleInputChange}
autoComplete='new-password'
value={inputs.SMTPFrom}
placeholder='通常和邮箱地址保持一致'
placeholder='Usually consistent with the email address'
/>
<Form.Input
label='SMTP 访问凭证'
label='SMTP Access Credential'
name='SMTPToken'
onChange={handleInputChange}
type='password'
autoComplete='new-password'
checked={inputs.RegisterEnabled === 'true'}
placeholder='敏感信息不会发送到前端显示'
placeholder='Sensitive information will not be displayed in the frontend'
/>
</Form.Group>
<Form.Button onClick={submitSMTP}>保存 SMTP 设置</Form.Button>
<Form.Button onClick={submitSMTP}>Save SMTP Settings</Form.Button>
<Divider />
<Header as='h3'>
配置 GitHub OAuth App
Configure GitHub OAuth App
<Header.Subheader>
用以支持通过 GitHub 进行登录注册
To support login & registration via GitHub
<a href='https://github.com/settings/developers' target='_blank'>
点击此处
Click here
</a>
管理你的 GitHub OAuth App
Manage your GitHub OAuth App
</Header.Subheader>
</Header>
<Message>
Homepage URL <code>{inputs.ServerAddress}</code>
Authorization callback URL {' '}
Fill in the Homepage URL <code>{inputs.ServerAddress}</code>
Fill in the Authorization callback URL{' '}
<code>{`${inputs.ServerAddress}/oauth/github`}</code>
</Message>
<Form.Group widths={3}>
@@ -469,7 +469,7 @@ const SystemSetting = () => {
onChange={handleInputChange}
autoComplete='new-password'
value={inputs.GitHubClientId}
placeholder='输入你注册的 GitHub OAuth APP ID'
placeholder='Enter your registered GitHub OAuth APP ID'
/>
<Form.Input
label='GitHub Client Secret'
@@ -478,21 +478,21 @@ const SystemSetting = () => {
type='password'
autoComplete='new-password'
value={inputs.GitHubClientSecret}
placeholder='敏感信息不会发送到前端显示'
placeholder='Sensitive information will not be displayed in the frontend'
/>
</Form.Group>
<Form.Button onClick={submitGitHubOAuth}>
保存 GitHub OAuth 设置
Save GitHub OAuth Settings
</Form.Button>
<Divider />
<Header as='h3'>
配置飞书授权登录
配置飞书授权Log in
<Header.Subheader>
用以支持通过飞书进行登录注册
用以支持通过飞书进行Log inSign up
<a href='https://open.feishu.cn/app' target='_blank'>
点击此处
Click here
</a>
管理你的飞书应用
Management你的飞书应用
</Header.Subheader>
</Header>
<Message>
@@ -507,7 +507,7 @@ const SystemSetting = () => {
onChange={handleInputChange}
autoComplete='new-password'
value={inputs.LarkClientId}
placeholder='输入 App ID'
placeholder='Enter App ID'
/>
<Form.Input
label='App Secret'
@@ -516,55 +516,55 @@ const SystemSetting = () => {
type='password'
autoComplete='new-password'
value={inputs.LarkClientSecret}
placeholder='敏感信息不会发送到前端显示'
placeholder='Sensitive information will not be displayed in the frontend'
/>
</Form.Group>
<Form.Button onClick={submitLarkOAuth}>
保存飞书 OAuth 设置
保存飞书 OAuth Settings
</Form.Button>
<Divider />
<Header as='h3'>
配置 WeChat Server
Configure WeChat Server
<Header.Subheader>
用以支持通过微信进行登录注册
To support login & registration via WeChat
<a
href='https://github.com/songquanpeng/wechat-server'
target='_blank'
>
点击此处
Click here
</a>
了解 WeChat Server
Learn about WeChat Server
</Header.Subheader>
</Header>
<Form.Group widths={3}>
<Form.Input
label='WeChat Server 服务器地址'
label='WeChat Server Server Address'
name='WeChatServerAddress'
placeholder='例如https://yourdomain.com'
placeholder='For examplehttps://yourdomain.com'
onChange={handleInputChange}
autoComplete='new-password'
value={inputs.WeChatServerAddress}
/>
<Form.Input
label='WeChat Server 访问凭证'
label='WeChat Server Access Credential'
name='WeChatServerToken'
type='password'
onChange={handleInputChange}
autoComplete='new-password'
value={inputs.WeChatServerToken}
placeholder='敏感信息不会发送到前端显示'
placeholder='Sensitive information will not be displayed in the frontend'
/>
<Form.Input
label='微信公众号二维码图片链接'
label='WeChat Public Account QR Code Image Link'
name='WeChatAccountQRCodeImageURL'
onChange={handleInputChange}
autoComplete='new-password'
value={inputs.WeChatAccountQRCodeImageURL}
placeholder='输入一个图片链接'
placeholder='Enter an image link'
/>
</Form.Group>
<Form.Button onClick={submitWeChat}>
保存 WeChat Server 设置
Save WeChat Server Settings
</Form.Button>
<Divider />
<Header as='h3'>
@@ -575,7 +575,7 @@ const SystemSetting = () => {
href='https://github.com/songquanpeng/message-pusher'
target='_blank'
>
点击此处
Click here
</a>
了解 Message Pusher
</Header.Subheader>
@@ -584,7 +584,7 @@ const SystemSetting = () => {
<Form.Input
label='Message Pusher 推送地址'
name='MessagePusherAddress'
placeholder='例如https://msgpusher.com/push/your_username'
placeholder='For examplehttps://msgpusher.com/push/your_username'
onChange={handleInputChange}
autoComplete='new-password'
value={inputs.MessagePusherAddress}
@@ -596,21 +596,21 @@ const SystemSetting = () => {
onChange={handleInputChange}
autoComplete='new-password'
value={inputs.MessagePusherToken}
placeholder='敏感信息不会发送到前端显示'
placeholder='Sensitive information will not be displayed in the frontend'
/>
</Form.Group>
<Form.Button onClick={submitMessagePusher}>
保存 Message Pusher 设置
保存 Message Pusher Settings
</Form.Button>
<Divider />
<Header as='h3'>
配置 Turnstile
Configure Turnstile
<Header.Subheader>
用以支持用户校验
To support user verification
<a href='https://dash.cloudflare.com/' target='_blank'>
点击此处
Click here
</a>
管理你的 Turnstile Sites推荐选择 Invisible Widget Type
Manage your Turnstile Sites, recommend selecting Invisible Widget Type
</Header.Subheader>
</Header>
<Form.Group widths={3}>
@@ -620,7 +620,7 @@ const SystemSetting = () => {
onChange={handleInputChange}
autoComplete='new-password'
value={inputs.TurnstileSiteKey}
placeholder='输入你注册的 Turnstile Site Key'
placeholder='Enter your registered Turnstile Site Key'
/>
<Form.Input
label='Turnstile Secret Key'
@@ -629,11 +629,11 @@ const SystemSetting = () => {
type='password'
autoComplete='new-password'
value={inputs.TurnstileSecretKey}
placeholder='敏感信息不会发送到前端显示'
placeholder='Sensitive information will not be displayed in the frontend'
/>
</Form.Group>
<Form.Button onClick={submitTurnstile}>
保存 Turnstile 设置
Save Turnstile Settings
</Form.Button>
</Form>
</Grid.Column>