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, useState } from 'react';
|
||||
import {
|
||||
Button,
|
||||
@@ -35,6 +37,8 @@ import { articleHeadings, sanitizeArticleHtml } from './insightsContent';
|
||||
import ArticleRichEditor from './ArticleRichEditor';
|
||||
|
||||
export default function ArticleEditor({ initial, insights, onApply, onClose }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const [draft, setDraft] = useState(initial);
|
||||
const [errors, setErrors] = useState({});
|
||||
const [processingImage, setProcessingImage] = useState(false);
|
||||
@@ -96,7 +100,7 @@ export default function ArticleEditor({ initial, insights, onApply, onClose }) {
|
||||
footer={
|
||||
<div className='website-insights-editor-footer'>
|
||||
<div className='flex gap-2'>
|
||||
<Button onClick={close}>取消</Button>
|
||||
<Button onClick={close}>{t('取消')}</Button>
|
||||
<Button theme='solid' disabled={processingImage} onClick={apply}>
|
||||
{processingImage ? '图片处理中' : '保存'}
|
||||
</Button>
|
||||
@@ -185,11 +189,13 @@ export default function ArticleEditor({ initial, insights, onApply, onClose }) {
|
||||
'summary',
|
||||
'文章描述',
|
||||
<TextArea
|
||||
aria-label='文章描述'
|
||||
aria-label={t('文章描述')}
|
||||
validateStatus={errors.summary ? 'error' : 'default'}
|
||||
aria-invalid={Boolean(errors.summary)}
|
||||
value={draft.summary}
|
||||
placeholder='请输入文章描述,用于列表卡片摘要与详情页标题下方'
|
||||
placeholder={t(
|
||||
'请输入文章描述,用于列表卡片摘要与详情页标题下方',
|
||||
)}
|
||||
maxCount={200}
|
||||
rows={3}
|
||||
onChange={(value) => change('summary', value)}
|
||||
|
||||
Reference in New Issue
Block a user