fix(i18n): 补齐九语翻译并修复国际化检查

补齐历史缺译并统一整句插值。九语覆盖 100%,静态检查及 713 项单测通过。
This commit is contained in:
zhanjunhao
2026-11-17 14:10:25 +08:00
parent 936ece78ff
commit ac9bbfd472
146 changed files with 16591 additions and 11007 deletions
+21 -6
View File
@@ -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 {
Bot as ActionBot,
ArrowRight as ActionArrowRight,
@@ -144,7 +146,9 @@ const StatusPill = ({ status }) => {
);
};
const BetaBadge = () => <span className='brain-beta'>BETA</span>;
const BetaBadge = () => (
<span className='brain-beta'>{I18N_TECHNICAL_TEXT.BETA}</span>
);
const expertPresentation = {
'management-report': { icon: BriefcaseBusiness, tone: 'is-sage' },
@@ -2031,7 +2035,8 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
<div className='brain-skill-list' aria-label={t('审核技能')}>
{(expert.skills || []).map((skill) => (
<span key={skill.id} title={skill.description}>
<CheckCircle2 size={12} /> {skill.name} · v
<CheckCircle2 size={12} /> {skill.name}{' '}
{I18N_TECHNICAL_TEXT.VERSION_PREFIX}
{skill.version}
</span>
))}
@@ -2306,7 +2311,11 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
{safeDate(activeRun.created_at, i18n.language)}
</span>
<span>
{t('计费状态')}: {t(activeRun.billing_status)}
<Trans
t={t}
i18nKey='计费状态: {{label}}'
values={{ label: t(activeRun.billing_status) }}
/>
</span>
{activeRun.started_at > 0 &&
activeRun.finished_at > 0 && (
@@ -2335,7 +2344,8 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
{(expertById.get(activeRun.expert_id)?.skills || []).map(
(skill) => (
<small key={skill.id}>
{skill.name} · v{skill.version} · {skill.license}
{skill.name} {I18N_TECHNICAL_TEXT.VERSION_PREFIX}
{skill.version} · {skill.license}
</small>
),
)}
@@ -2533,7 +2543,11 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
{runErrorMessages[activeRun.error_code] &&
failureReason.reason && (
<p className='brain-error-reason'>
{t('失败原因')}:{t(failureReason.reason)}
<Trans
t={t}
i18nKey='失败原因:{{label}}'
values={{ label: t(failureReason.reason) }}
/>
</p>
)}
{(failureReason.raw || activeRun.error_code) && (
@@ -2644,7 +2658,8 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
{Math.ceil(
Number(runDetail.artifact.size_bytes || 0) / 1024,
)}{' '}
KiB · {t('恶意软件扫描已通过')}
{I18N_TECHNICAL_TEXT.KIB_SEPARATOR}{' '}
{t('恶意软件扫描已通过')}
</span>
</div>
<Button