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

@@ -12,7 +12,7 @@ const TopUp = () => {
const topUp = async () => {
if (redemptionCode === '') {
showInfo('请输入充值码!')
showInfo('Please enter the recharge code!')
return;
}
setIsSubmitting(true);
@@ -22,7 +22,7 @@ const TopUp = () => {
});
const { success, message, data } = res.data;
if (success) {
showSuccess('充值成功!');
showSuccess('Recharge successful!');
setUserQuota((quota) => {
return quota + data;
});
@@ -31,7 +31,7 @@ const TopUp = () => {
showError(message);
}
} catch (err) {
showError('请求失败');
showError('Request failed');
} finally {
setIsSubmitting(false);
}
@@ -39,7 +39,7 @@ const TopUp = () => {
const openTopUpLink = () => {
if (!topUpLink) {
showError('超级管理员未设置充值链接!');
showError('The super administrator did not set a recharge link!');
return;
}
let url = new URL(topUpLink);
@@ -76,12 +76,12 @@ const TopUp = () => {
return (
<Segment>
<Header as='h3'>充值额度</Header>
<Header as='h3'>Recharge quota</Header>
<Grid columns={2} stackable>
<Grid.Column>
<Form>
<Form.Input
placeholder='兑换码'
placeholder='Redeem Code'
name='redemptionCode'
value={redemptionCode}
onChange={(e) => {
@@ -89,10 +89,10 @@ const TopUp = () => {
}}
/>
<Button color='green' onClick={openTopUpLink}>
充值
Recharge
</Button>
<Button color='yellow' onClick={topUp} disabled={isSubmitting}>
{isSubmitting ? '兑换中...' : '兑换'}
{isSubmitting ? 'Redeeming...' : 'Redeem'}
</Button>
</Form>
</Grid.Column>
@@ -100,7 +100,7 @@ const TopUp = () => {
<Statistic.Group widths='one'>
<Statistic>
<Statistic.Value>{renderQuota(userQuota)}</Statistic.Value>
<Statistic.Label>剩余额度</Statistic.Label>
<Statistic.Label>Remaining quota</Statistic.Label>
</Statistic>
</Statistic.Group>
</Grid.Column>