feat: i18n support

This commit is contained in:
JustSong
2025-02-01 17:00:24 +08:00
parent 60f2776795
commit ae20aea555
13 changed files with 156 additions and 63 deletions

View File

@@ -107,12 +107,12 @@ const EditToken = () => {
useEffect(() => {
if (isEdit) {
loadToken().catch(error => {
loadToken().catch((error) => {
showError(error.message || 'Failed to load token');
setLoading(false);
});
}
loadAvailableModels().catch(error => {
loadAvailableModels().catch((error) => {
showError(error.message || 'Failed to load models');
});
}, []);
@@ -255,7 +255,10 @@ const EditToken = () => {
<Message>{t('token.edit.quota_notice')}</Message>
<Form.Field>
<Form.Input
label={`${t('token.edit.quota')}${renderQuotaWithPrompt(remain_quota, t)}`}
label={`${t('token.edit.quota')}${renderQuotaWithPrompt(
remain_quota,
t
)}`}
name='remain_quota'
placeholder={t('token.edit.quota_placeholder')}
onChange={handleInputChange}