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
+3 -1
View File
@@ -16,6 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import i18next from 'i18next';
import React from 'react';
import Loading from './ui/Loading';
import {
@@ -73,7 +75,7 @@ class ChunkErrorBoundary extends React.Component {
: 'Please refresh the page and try again.'}
</p>
<button type='button' onClick={() => window.location.reload()}>
Refresh
{i18next.t('刷新')}
</button>
</div>
</div>
+8 -3
View File
@@ -30,6 +30,7 @@ For commercial licensing, please contact support@quantumnous.com
* 页面只需 usePageGuide({...配置}) 后把三个组件放到对应位置;
* steps[].done 传布尔值即启用进度跟踪,不传则渲染为纯阅读步骤。
*/
import { Trans } from 'react-i18next';
import {
BookOpenText as ActionBookOpenText,
Compass as ActionCompass,
@@ -201,9 +202,13 @@ export const PageGuidePill = ({ guide, className = '' }) => {
{t('快速上手')} {progress.doneCount}/{progress.total}
{' · '}
<strong>
{t('下一步')}
{t(':')}
{nextStep?.working ? t('进行中') : nextStep?.title}
<Trans
t={t}
i18nKey='下一步:{{value}}'
values={{
value: nextStep?.working ? t('进行中') : nextStep?.title,
}}
/>
</strong>
</span>
<span className='page-guide-pill-go'>{t('继续')} →</span>
+10 -6
View File
@@ -16,6 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { useTranslation } from 'react-i18next';
import React, { useEffect, useRef, useState } from 'react';
import Quill, { Delta } from 'quill/core';
import BoldFormat from 'quill/formats/bold';
@@ -69,6 +71,8 @@ export default function RichTextEditor({
placeholder = '',
maxLength,
}) {
const { t } = useTranslation();
const host = useRef(null);
const picker = useRef(null);
const instance = useRef(null);
@@ -438,7 +442,7 @@ export default function RichTextEditor({
<div
className='rich-text-toolbar'
role='toolbar'
aria-label='富文本工具栏'
aria-label={t('富文本工具栏')}
>
<select
aria-label='段落格式'
@@ -450,9 +454,9 @@ export default function RichTextEditor({
)
}
>
<option value=''>正文段落</option>
<option value='2'>二级标题</option>
<option value='3'>三级标题</option>
<option value=''>{t('正文段落')}</option>
<option value='2'>{t('二级标题')}</option>
<option value='3'>{t('三级标题')}</option>
</select>
{tools.map(([name, Icon, command, selected = false]) => (
<button
@@ -471,8 +475,8 @@ export default function RichTextEditor({
<button
className='app-action-button'
type='button'
title='插入正文图片(单张不超过 2 MB)'
aria-label='插入正文图片'
title={t('插入正文图片(单张不超过 2 MB)')}
aria-label={t('插入正文图片')}
disabled={disabled || busy}
onMouseDown={(event) => event.preventDefault()}
onClick={() => {