diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 43dc9810..8047cfdb 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,6 @@ # 变更记录(CHANGELOG) -> 状态:有效(持续追加) · 更新:2026-11-16 · 版本:v3.1 +> 状态:有效(持续追加) · 更新:2026-11-17 · 版本:v3.2 对现状仍有影响的功能与修复记录,按日期倒序。改造、迁移、优化等一次性过程不在此记录。 @@ -8,6 +8,16 @@ **记录规则**:每条写“范围、变更、影响、回滚、关联”五项;回滚优先 `git revert <提交>`,提交含多项改动时按文件还原(`git checkout <提交>^ -- <文件>`),不整仓 reset。本文不作为规则依据。 +## 2026-11-17 + +### 修复 · 九语言翻译覆盖与国际化检查 + +- **范围**:`src/i18n/locales/` 九份语言包、相关页面与组件文案、价格说明及国际化回归测试。 +- **变更**:补齐中文引用键与八种目标语言缺项,补译法语、俄语历史空值;将硬编码界面文案接入翻译,将拼句改为整句插值或 `Trans`,保留链接、强调与换行;固定品牌、协议示例和单位集中维护。修复价格说明、折扣和 PayPal 嵌套翻译的插值参数,并将语言覆盖回归扩大至全部九语种。 +- **影响**:保持接口、权限、业务触发条件及语言开放范围;补译使用机器初译与结构检查,尚未完成全量母语校审。技术示例、品牌、货币、变量与组件标签保留原意,验证证据位于忽略目录 `report/i18n-fix/`。 +- **回滚**:按本次文件差异还原语言包、文案调用、固定技术文字模块及对应测试,保留原有工作区修改;无需数据迁移。 +- **关联**:`i18next.config.js`、`src/i18n/locale-coverage.test.js`、`test/unit/i18n-render-regressions.test.js`。 + ## 2026-11-16 ### 修复 · 筛选卡纯色背景、模型名称搜索与三中心表格固定列 diff --git a/src/components/analytics/ChannelConsumption.jsx b/src/components/analytics/ChannelConsumption.jsx index 06f22c72..7d44aea2 100644 --- a/src/components/analytics/ChannelConsumption.jsx +++ b/src/components/analytics/ChannelConsumption.jsx @@ -17,6 +17,7 @@ along with this program. If not, see . 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 }) => { {icon} {title} - TOP {data.length} + {I18N_TECHNICAL_TEXT.TOP} {data.length} ) diff --git a/src/components/analytics/RiskControlBanLogs.jsx b/src/components/analytics/RiskControlBanLogs.jsx index 6c26f17b..ae5ab0f9 100644 --- a/src/components/analytics/RiskControlBanLogs.jsx +++ b/src/components/analytics/RiskControlBanLogs.jsx @@ -17,6 +17,7 @@ along with this program. If not, see . 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 = ({
- {t('共')} {banLogTotal || 0} {t('条')} + - - - + + + {tools.map(([name, Icon, command, selected = false]) => (
diff --git a/src/components/layout/headerbar/NewYearButton.jsx b/src/components/layout/headerbar/NewYearButton.jsx index 25dd5f3e..dea03813 100644 --- a/src/components/layout/headerbar/NewYearButton.jsx +++ b/src/components/layout/headerbar/NewYearButton.jsx @@ -17,6 +17,7 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { I18N_TECHNICAL_TEXT } from '../../../i18n/technicalText.js'; import React from 'react'; import { Button as AntButton } from 'antd'; import { Dropdown } from '@/components/ui'; @@ -51,7 +52,11 @@ const NewYearButton = ({ isNewYear, t }) => { > 🎉} + icon={ + + {I18N_TECHNICAL_TEXT.CELEBRATION_ICON} + + } aria-label={t('新年快乐')} className='ui-header-icon-action' /> diff --git a/src/components/playground/ChatArea.jsx b/src/components/playground/ChatArea.jsx index 330f4c25..7fc6941b 100644 --- a/src/components/playground/ChatArea.jsx +++ b/src/components/playground/ChatArea.jsx @@ -17,6 +17,7 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { I18N_TECHNICAL_TEXT } from '../../i18n/technicalText.js'; import { EyeOff as ActionEyeOff, Eye as ActionEye, @@ -909,7 +910,7 @@ const ChatArea = ({ className='flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-brand/95 dark:bg-brand-deep/30 backdrop-blur-sm border border-brand/80 dark:border-brand-deep/60 shadow-md text-xs text-brand-deep dark:text-brand-from hover:bg-brand/95 dark:hover:bg-brand-deep/50 transition' aria-label={t('查看对话历史摘要')} > - 📝 + {I18N_TECHNICAL_TEXT.NOTE_ICON} {t('历史已压缩,点击查看摘要')} diff --git a/src/components/playground/CodeViewer.jsx b/src/components/playground/CodeViewer.jsx index e005fa35..04569f92 100644 --- a/src/components/playground/CodeViewer.jsx +++ b/src/components/playground/CodeViewer.jsx @@ -17,6 +17,7 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { I18N_TECHNICAL_TEXT } from '../../i18n/technicalText.js'; import { Copy as ActionCopy, ChevronUp as ActionChevronUp, @@ -344,13 +345,13 @@ const CodeViewer = ({ content, title, language = 'json' }) => { - (+ + {I18N_TECHNICAL_TEXT.ADDITIONAL_TOKENS_PREFIX} {Math.round( (contentMetrics.length - PERFORMANCE_CONFIG.PREVIEW_LENGTH) / 1000, )} - K) + {I18N_TECHNICAL_TEXT.THOUSAND_TOKENS_SUFFIX} )} diff --git a/src/components/playground/CustomInputRender.jsx b/src/components/playground/CustomInputRender.jsx index 083ca35c..3a537193 100644 --- a/src/components/playground/CustomInputRender.jsx +++ b/src/components/playground/CustomInputRender.jsx @@ -17,6 +17,7 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { I18N_TECHNICAL_TEXT } from '../../i18n/technicalText.js'; import { AlertTriangle as ActionAlertTriangle, RotateCw as ActionRotateCw, @@ -274,7 +275,8 @@ const AttachmentChip = ({ file, onRemove, onRestore, onRetry, t }) => { {isUploading ? ( - {Math.round((file.progress || 0) * 100)}% · {formatBytes(file.size)} + {Math.round((file.progress || 0) * 100)} + {I18N_TECHNICAL_TEXT.PERCENT_SEPARATOR} {formatBytes(file.size)} ) : isFailed ? ( diff --git a/src/components/playground/CustomRequestEditor.jsx b/src/components/playground/CustomRequestEditor.jsx index cdbd1d3f..b0a83140 100644 --- a/src/components/playground/CustomRequestEditor.jsx +++ b/src/components/playground/CustomRequestEditor.jsx @@ -17,6 +17,7 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { I18N_TECHNICAL_TEXT } from '../../i18n/technicalText.js'; import { Edit as ActionEdit } from '@/components/common/icons/ActionIcons'; import { useEffectEvent } from '../../hooks/common/useEffectEvent'; import React, { useState, useEffect } from 'react'; @@ -184,7 +185,7 @@ const CustomRequestEditor = ({