fix(i18n): 补齐九语翻译并修复国际化检查
补齐历史缺译并统一整句插值。九语覆盖 100%,静态检查及 713 项单测通过。
This commit is contained in:
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { I18N_TECHNICAL_TEXT } from '../../i18n/technicalText.js';
|
||||
import React, { useState } from 'react';
|
||||
import { Card, Table, Progress } from '@/components/ui';
|
||||
import { renderQuota } from '../../helpers';
|
||||
@@ -131,7 +132,7 @@ const ChannelConsumption = ({ data, title, icon, t, embedded = false }) => {
|
||||
<span className='text-brand'>{icon}</span>
|
||||
<span className='font-semibold'>{title}</span>
|
||||
<span className='text-xs text-gray-400 ml-2'>
|
||||
TOP {data.length}
|
||||
{I18N_TECHNICAL_TEXT.TOP} {data.length}
|
||||
</span>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -17,6 +17,7 @@ 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 React, { useState } from 'react';
|
||||
import {
|
||||
Table,
|
||||
@@ -176,7 +177,11 @@ const RiskControlBanLogs = ({
|
||||
<div className='mb-3 flex items-center justify-between flex-wrap gap-2'>
|
||||
<Space>
|
||||
<Text type='tertiary' size='small'>
|
||||
{t('共')} {banLogTotal || 0} {t('条')}
|
||||
<Trans
|
||||
t={t}
|
||||
i18nKey='共 {{value}} 条'
|
||||
values={{ value: banLogTotal || 0 }}
|
||||
/>
|
||||
</Text>
|
||||
<Select
|
||||
value={banLogStatus}
|
||||
|
||||
@@ -17,6 +17,7 @@ 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 React, { useEffect, useRef, useState } from 'react';
|
||||
import {
|
||||
Modal,
|
||||
@@ -267,8 +268,11 @@ const RiskControlRulesModal = ({
|
||||
<span>
|
||||
{t('总消耗 ≤')}{' '}
|
||||
<Text type='tertiary' size='small'>
|
||||
({t('quota')}, ≈ {renderQuota(form.ban_max_total_quota, 4)},{' '}
|
||||
{t('防误伤大客户')})
|
||||
<Trans
|
||||
t={t}
|
||||
i18nKey='(quota, ≈ {{value}}, 防误伤大客户)'
|
||||
values={{ value: renderQuota(form.ban_max_total_quota, 4) }}
|
||||
/>
|
||||
</Text>
|
||||
</span>
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { I18N_TECHNICAL_TEXT } from '../../i18n/technicalText.js';
|
||||
import React, { useMemo } from 'react';
|
||||
import { Card } from '@/components/ui';
|
||||
import { VChart } from '@visactor/react-vchart';
|
||||
@@ -143,7 +144,8 @@ const TopupChannelChart = ({ data, title, icon, t }) => {
|
||||
¥{(item.amount || 0).toFixed(2)}
|
||||
</span>
|
||||
<span className='text-gray-400 text-xs ml-2'>
|
||||
({item.percent?.toFixed(1)}%)
|
||||
({item.percent?.toFixed(1)}
|
||||
{I18N_TECHNICAL_TEXT.PERCENT_CLOSE}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -17,6 +17,8 @@ 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 from 'react';
|
||||
import { Card, Avatar, Progress } from '@/components/ui';
|
||||
import { renderQuota } from '../../helpers';
|
||||
@@ -71,7 +73,11 @@ const UserRanking = ({ data, title, icon, t }) => {
|
||||
<span className='text-brand'>{icon}</span>
|
||||
<span className='font-semibold'>{title}</span>
|
||||
<span className='text-xs text-gray-400 ml-2'>
|
||||
{t('共')} {data.length} {t('人')}
|
||||
<Trans
|
||||
t={t}
|
||||
i18nKey='共 {{length}} 人'
|
||||
values={{ length: data.length }}
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
@@ -120,7 +126,10 @@ const UserRanking = ({ data, title, icon, t }) => {
|
||||
<span>
|
||||
{item.requests?.toLocaleString()} {t('次请求')}
|
||||
</span>
|
||||
<span>{(item.tokens || 0).toLocaleString()} tokens</span>
|
||||
<span>
|
||||
{(item.tokens || 0).toLocaleString()}{' '}
|
||||
{I18N_TECHNICAL_TEXT.TOKENS}
|
||||
</span>
|
||||
</div>
|
||||
<div className='flex justify-between text-xs mt-1'>
|
||||
<span className='text-gray-500'>{t('余额')}:</span>
|
||||
|
||||
@@ -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 from 'react';
|
||||
import { Card, Table } from '@/components/ui';
|
||||
import { renderQuota } from '../../helpers';
|
||||
@@ -82,7 +85,7 @@ const UserTopupRanking = ({ data, title, icon, t, embedded = false }) => {
|
||||
{text || `User ${record.user_id}`}
|
||||
</span>
|
||||
<span className='text-xs text-gray-400 truncate'>
|
||||
ID: {record.user_id}
|
||||
{I18N_TECHNICAL_TEXT.ID} {record.user_id}
|
||||
</span>
|
||||
</div>
|
||||
),
|
||||
@@ -132,7 +135,11 @@ const UserTopupRanking = ({ data, title, icon, t, embedded = false }) => {
|
||||
<span className='text-brand'>{icon}</span>
|
||||
<span className='font-semibold'>{title}</span>
|
||||
<span className='text-xs text-gray-400 ml-2'>
|
||||
{t('共')} {data.length} {t('人')}
|
||||
<Trans
|
||||
t={t}
|
||||
i18nKey='共 {{length}} 人'
|
||||
values={{ length: data.length }}
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
)
|
||||
|
||||
Binary file not shown.
@@ -17,6 +17,8 @@ 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 { Download as ActionDownload } from '@/components/common/icons/ActionIcons';
|
||||
import React from 'react';
|
||||
import { Banner, Button, Card, Tag, Tooltip } from '@/components/ui';
|
||||
@@ -47,9 +49,17 @@ export const ReportHeader = ({ report, onExport, t }) => {
|
||||
{t('企业经营决策报表')}
|
||||
</div>
|
||||
<div className='text-sm text-gray-700 dark:text-gray-200 tabular-nums'>
|
||||
{t('本期')}:{formatCst(m.start)} ~ {formatCst(m.effective_end)}
|
||||
<span className='mx-2 text-gray-300'>|</span>
|
||||
{t('对比期')}:{formatCst(m.prev_start)} ~ {formatCst(m.prev_end)}
|
||||
<Trans
|
||||
t={t}
|
||||
i18nKey='本期:{{value}} ~ {{value2}}<part0>|</part0>对比期:{{value3}} ~ {{value4}}'
|
||||
values={{
|
||||
value: formatCst(m.start),
|
||||
value2: formatCst(m.effective_end),
|
||||
value3: formatCst(m.prev_start),
|
||||
value4: formatCst(m.prev_end),
|
||||
}}
|
||||
components={{ part0: <span className='mx-2 text-gray-300' /> }}
|
||||
/>
|
||||
</div>
|
||||
<div className='text-xs text-gray-500 dark:text-gray-400 mt-1'>
|
||||
{t('数据截至 {{time}},按整点统计;对比期与本期按相同时长对齐', {
|
||||
@@ -281,7 +291,8 @@ export const KpiGrid = ({ report, lists, cny, onJump, t }) => {
|
||||
}}
|
||||
>
|
||||
{shareDelta >= 0 ? '+' : ''}
|
||||
{shareDelta.toFixed(1)}pp
|
||||
{shareDelta.toFixed(1)}
|
||||
{I18N_TECHNICAL_TEXT.PERCENTAGE_POINTS}
|
||||
</span>
|
||||
),
|
||||
tip: t('企业消耗 /(企业 + 个人消耗);pp 为百分点变化'),
|
||||
|
||||
Reference in New Issue
Block a user