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 {
|
||||
Zap as ActionZap,
|
||||
ChevronRight as ActionChevronRight,
|
||||
@@ -95,7 +96,8 @@ const StatusBars = ({ dataPoints = [], loading = false, t }) => {
|
||||
<div className='text-xs p-1'>
|
||||
<div style={{ color: bgColor }} className='font-semibold'>
|
||||
{isHealthy ? t('正常') : t('异常')} (
|
||||
{point.uptime_percent?.toFixed(1)}%)
|
||||
{point.uptime_percent?.toFixed(1)}
|
||||
{I18N_TECHNICAL_TEXT.PERCENT_CLOSE}
|
||||
</div>
|
||||
<div className='text-gray-400 mt-1'>
|
||||
{point.timestamp
|
||||
@@ -117,7 +119,7 @@ const StatusBars = ({ dataPoints = [], loading = false, t }) => {
|
||||
})}
|
||||
</div>
|
||||
<div className='flex justify-between w-full text-[10px] text-gray-400 dark:text-gray-500 mt-1.5 font-medium'>
|
||||
<span>1h</span>
|
||||
<span>{I18N_TECHNICAL_TEXT.ONE_HOUR}</span>
|
||||
<span>{t('现在')}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -188,7 +190,10 @@ const TestModelCell = ({ modelName, groupName, t }) => {
|
||||
style={{ background: token.colorPrimaryBg }}
|
||||
>
|
||||
<span>✓</span>
|
||||
<span>{result.time}ms</span>
|
||||
<span>
|
||||
{result.time}
|
||||
{I18N_TECHNICAL_TEXT.MILLISECONDS}
|
||||
</span>
|
||||
</span>
|
||||
) : (
|
||||
<Tooltip title={result.error}>
|
||||
@@ -197,7 +202,12 @@ const TestModelCell = ({ modelName, groupName, t }) => {
|
||||
style={{ background: token.colorErrorBg }}
|
||||
>
|
||||
<span>✗</span>
|
||||
{result.time > 0 && <span>{result.time}ms</span>}
|
||||
{result.time > 0 && (
|
||||
<span>
|
||||
{result.time}
|
||||
{I18N_TECHNICAL_TEXT.MILLISECONDS}
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
</Tooltip>
|
||||
)}
|
||||
@@ -386,7 +396,8 @@ const GroupMonitor = () => {
|
||||
<span
|
||||
className={`font-medium ${value > 2000 ? 'text-orange-500' : 'text-gray-600 dark:text-gray-300'}`}
|
||||
>
|
||||
{value}ms
|
||||
{value}
|
||||
{I18N_TECHNICAL_TEXT.MILLISECONDS}
|
||||
</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 { I18N_TECHNICAL_TEXT } from '../../i18n/technicalText.js';
|
||||
import { RefreshCw as ActionRefreshCw } from '@/components/common/icons/ActionIcons';
|
||||
import React, { useState, useEffect, useCallback } from 'react';
|
||||
import {
|
||||
@@ -329,7 +330,8 @@ const GroupMonitorAdmin = () => {
|
||||
}}
|
||||
>
|
||||
<Zap className='w-3 h-3 inline mr-1' />
|
||||
{time}ms
|
||||
{time}
|
||||
{I18N_TECHNICAL_TEXT.MILLISECONDS}
|
||||
</span>
|
||||
);
|
||||
},
|
||||
@@ -666,7 +668,9 @@ const GroupMonitorAdmin = () => {
|
||||
<div className='text-center'>
|
||||
<div className='text-2xl font-bold text-blue-500'>
|
||||
{group.avg_response_time || '-'}
|
||||
<span className='text-sm font-normal'>ms</span>
|
||||
<span className='text-sm font-normal'>
|
||||
{I18N_TECHNICAL_TEXT.MILLISECONDS}
|
||||
</span>
|
||||
</div>
|
||||
<div className='text-xs text-gray-500'>
|
||||
{t('平均响应')}
|
||||
@@ -734,7 +738,8 @@ const GroupMonitorAdmin = () => {
|
||||
</div>
|
||||
<div className='stat-box'>
|
||||
<div className='stat-box-value text-blue-500'>
|
||||
{group.avg_response_time || '-'}ms
|
||||
{group.avg_response_time || '-'}
|
||||
{I18N_TECHNICAL_TEXT.MILLISECONDS}
|
||||
</div>
|
||||
<div className='stat-box-label'>
|
||||
{t('平均响应')}
|
||||
@@ -742,7 +747,8 @@ const GroupMonitorAdmin = () => {
|
||||
</div>
|
||||
<div className='stat-box'>
|
||||
<div className='stat-box-value text-red-500'>
|
||||
{group.max_response_time || '-'}ms
|
||||
{group.max_response_time || '-'}
|
||||
{I18N_TECHNICAL_TEXT.MILLISECONDS}
|
||||
</div>
|
||||
<div className='stat-box-label'>
|
||||
{t('最慢响应')}
|
||||
@@ -750,7 +756,8 @@ const GroupMonitorAdmin = () => {
|
||||
</div>
|
||||
<div className='stat-box'>
|
||||
<div className='stat-box-value text-green-500'>
|
||||
{group.min_response_time || '-'}ms
|
||||
{group.min_response_time || '-'}
|
||||
{I18N_TECHNICAL_TEXT.MILLISECONDS}
|
||||
</div>
|
||||
<div className='stat-box-label'>
|
||||
{t('最快响应')}
|
||||
@@ -791,7 +798,7 @@ const GroupMonitorAdmin = () => {
|
||||
handleDateRangeChange(group.name, [start, now]);
|
||||
}}
|
||||
>
|
||||
24h
|
||||
{I18N_TECHNICAL_TEXT.LAST_24_HOURS}
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
@@ -803,7 +810,7 @@ const GroupMonitorAdmin = () => {
|
||||
handleDateRangeChange(group.name, [start, now]);
|
||||
}}
|
||||
>
|
||||
7d
|
||||
{I18N_TECHNICAL_TEXT.LAST_7_DAYS}
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
@@ -815,7 +822,7 @@ const GroupMonitorAdmin = () => {
|
||||
handleDateRangeChange(group.name, [start, now]);
|
||||
}}
|
||||
>
|
||||
30d
|
||||
{I18N_TECHNICAL_TEXT.LAST_30_DAYS}
|
||||
</Button>
|
||||
</Space>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user