fix(i18n): 补齐九语翻译并修复国际化检查
补齐历史缺译并统一整句插值。九语覆盖 100%,静态检查及 713 项单测通过。
This commit is contained in:
@@ -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={() => {
|
||||
|
||||
Reference in New Issue
Block a user