fix(i18n): 补齐九种语言的翻译并修复国际化检查
补齐页面缺译,统一动态文案的整句插值方式。
This commit is contained in:
@@ -16,6 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Trans } from 'react-i18next';
|
||||
import { I18N_TECHNICAL_TEXT } from '../../../i18n/technicalText.js';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import {
|
||||
Banner,
|
||||
@@ -662,8 +665,10 @@ export default function ModelCostSettings() {
|
||||
ok = false;
|
||||
const fails = d.failures || [];
|
||||
showError(
|
||||
(res.data?.message || t('部分保存失败')) +
|
||||
(fails.length ? ': ' + fails.slice(0, 3).join('; ') : ''),
|
||||
t('{{value}}{{value2}}', {
|
||||
value: res.data?.message || t('部分保存失败'),
|
||||
value2: fails.length ? ': ' + fails.slice(0, 3).join('; ') : '',
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -855,8 +860,10 @@ export default function ModelCostSettings() {
|
||||
} else {
|
||||
const fails = res.data?.data?.failures || [];
|
||||
showError(
|
||||
(res.data?.message || t('保存失败')) +
|
||||
(fails.length ? ': ' + fails.join('; ') : ''),
|
||||
t('{{value}}{{value2}}', {
|
||||
value: res.data?.message || t('保存失败'),
|
||||
value2: fails.length ? ': ' + fails.join('; ') : '',
|
||||
}),
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -1001,7 +1008,8 @@ export default function ModelCostSettings() {
|
||||
)}
|
||||
>
|
||||
<div className='opacity-70'>
|
||||
{r.label} ¥{r.price} / 1M({r.ratio}×)
|
||||
{r.label} ¥{r.price} / 1M({r.ratio}
|
||||
{I18N_TECHNICAL_TEXT.MULTIPLIER_CLOSE_CJK}
|
||||
</div>
|
||||
</Tooltip>
|
||||
))}
|
||||
@@ -1044,8 +1052,15 @@ export default function ModelCostSettings() {
|
||||
prefix='¥'
|
||||
suffix={
|
||||
<span className='text-xs text-gray-400'>
|
||||
{t(meta.suffix)} {t(meta.label)}
|
||||
{tier ? ` · ${tier}` : ''}
|
||||
<Trans
|
||||
t={t}
|
||||
i18nKey='{{label}} {{label2}}{{value}}'
|
||||
values={{
|
||||
label: t(meta.suffix),
|
||||
label2: t(meta.label),
|
||||
value: tier ? ` · ${tier}` : '',
|
||||
}}
|
||||
/>
|
||||
</span>
|
||||
}
|
||||
value={slotValue(row, k)}
|
||||
@@ -1780,7 +1795,7 @@ export default function ModelCostSettings() {
|
||||
</div>
|
||||
<div style={{ width: '100%' }}>
|
||||
<Text type='secondary' size='small'>
|
||||
{t('失效时间')}({t('留空表示长期有效')})
|
||||
<Trans t={t} i18nKey='失效时间(留空表示长期有效)' />
|
||||
</Text>
|
||||
<DatePicker
|
||||
type='dateTime'
|
||||
|
||||
Reference in New Issue
Block a user