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
+12 -18
View File
@@ -128,14 +128,12 @@ export default function SettingClaudeModel(props) {
<Form.TextArea
label={t('Claude请求头覆盖')}
field={'claude.model_headers_settings'}
placeholder={
t('为一个 JSON 文本,例如:') +
'\n' +
JSON.stringify(CLAUDE_HEADER, null, 2)
}
extraText={
t('示例') + '\n' + JSON.stringify(CLAUDE_HEADER, null, 2)
}
placeholder={t('为一个 JSON 文本,例如:\n{{value}}', {
value: JSON.stringify(CLAUDE_HEADER, null, 2),
})}
extraText={t('示例\n{{value}}', {
value: JSON.stringify(CLAUDE_HEADER, null, 2),
})}
autosize={{ minRows: 6, maxRows: 12 }}
trigger='blur'
stopValidateWithError
@@ -159,16 +157,12 @@ export default function SettingClaudeModel(props) {
<Form.TextArea
label={t('缺省 MaxTokens')}
field={'claude.default_max_tokens'}
placeholder={
t('为一个 JSON 文本,例如:') +
'\n' +
JSON.stringify(CLAUDE_DEFAULT_MAX_TOKENS, null, 2)
}
extraText={
t('示例') +
'\n' +
JSON.stringify(CLAUDE_DEFAULT_MAX_TOKENS, null, 2)
}
placeholder={t('为一个 JSON 文本,例如:\n{{value}}', {
value: JSON.stringify(CLAUDE_DEFAULT_MAX_TOKENS, null, 2),
})}
extraText={t('示例\n{{value}}', {
value: JSON.stringify(CLAUDE_DEFAULT_MAX_TOKENS, null, 2),
})}
autosize={{ minRows: 6, maxRows: 12 }}
trigger='blur'
stopValidateWithError
+10 -16
View File
@@ -119,11 +119,9 @@ export default function SettingGeminiModel(props) {
<Col xs={24} sm={12} md={8} lg={8} xl={8}>
<Form.TextArea
label={t('Gemini安全设置')}
placeholder={
t('为一个 JSON 文本,例如:') +
'\n' +
JSON.stringify(GEMINI_SETTING_EXAMPLE, null, 2)
}
placeholder={t('为一个 JSON 文本,例如:\n{{value}}', {
value: JSON.stringify(GEMINI_SETTING_EXAMPLE, null, 2),
})}
field={'gemini.safety_settings'}
extraText={t(
'default为默认设置,可单独设置每个分类的安全等级',
@@ -147,11 +145,9 @@ export default function SettingGeminiModel(props) {
<Col xs={24} sm={12} md={8} lg={8} xl={8}>
<Form.TextArea
label={t('Gemini版本设置')}
placeholder={
t('为一个 JSON 文本,例如:') +
'\n' +
JSON.stringify(GEMINI_VERSION_EXAMPLE, null, 2)
}
placeholder={t('为一个 JSON 文本,例如:\n{{value}}', {
value: JSON.stringify(GEMINI_VERSION_EXAMPLE, null, 2),
})}
field={'gemini.version_settings'}
extraText={t('default为默认设置,可单独设置每个模型的版本')}
autosize={{ minRows: 6, maxRows: 12 }}
@@ -191,15 +187,13 @@ export default function SettingGeminiModel(props) {
<Form.TextArea
field={'gemini.supported_imagine_models'}
label={t('支持的图像模型')}
placeholder={
t('例如:') +
'\n' +
JSON.stringify(
placeholder={t('例如:\n{{value}}', {
value: JSON.stringify(
['gemini-2.0-flash-exp-image-generation'],
null,
2,
)
}
),
})}
onChange={(value) =>
setInputs({
...inputs,
@@ -189,7 +189,9 @@ export default function SettingGlobalModel(props) {
<Form.TextArea
label={t('禁用思考处理的模型列表')}
field={'global.thinking_model_blacklist'}
placeholder={t('例如:') + '\n' + thinkingExample}
placeholder={t('例如:\n{{thinkingExample}}', {
thinkingExample: thinkingExample,
})}
rows={4}
rules={[
{
@@ -255,7 +257,9 @@ export default function SettingGlobalModel(props) {
<Form.TextArea
label={t('强制 Responses 协议的模型列表')}
field={'general_setting.force_responses_models'}
placeholder={t('例如:') + '\n' + forceResponsesExample}
placeholder={t('例如:\n{{forceResponsesExample}}', {
forceResponsesExample: forceResponsesExample,
})}
rows={4}
extraText={t('多个模型用逗号或换行分隔。留空则该功能不生效')}
onChange={(value) =>
@@ -80,7 +80,7 @@ const SettingModelCategory = () => {
showError(message || t('加载分类失败'));
}
} catch (error) {
showError(t('加载分类失败: ') + error.message);
showError(t('加载分类失败: {{message}}', { message: error.message }));
} finally {
setLoading(false);
}
@@ -181,8 +181,10 @@ const SettingModelCategory = () => {
}
} catch (error) {
showError(
(editingCategory.id === 0 ? t('创建失败: ') : t('保存失败: ')) +
error.message,
t('{{value}}{{message}}', {
value: editingCategory.id === 0 ? t('创建失败: ') : t('保存失败: '),
message: error.message,
}),
);
}
};
@@ -199,7 +201,7 @@ const SettingModelCategory = () => {
showError(message || t('删除失败'));
}
} catch (error) {
showError(t('删除失败: ') + error.message);
showError(t('删除失败: {{message}}', { message: error.message }));
}
};
@@ -215,7 +217,7 @@ const SettingModelCategory = () => {
showError(message || t('重置失败'));
}
} catch (error) {
showError(t('重置失败: ') + error.message);
showError(t('重置失败: {{message}}', { message: error.message }));
}
};
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { I18N_TECHNICAL_TEXT } from '../../../i18n/technicalText.js';
import React, { useEffect, useState, useRef } from 'react';
import {
Button,
@@ -836,7 +837,7 @@ export default function SettingVideoModel(props) {
fontSize: 12,
}}
>
{'"metadata": { "mode": "pro", "resolution": "1080P" }'}
{I18N_TECHNICAL_TEXT.VIDEO_METADATA_EXAMPLE}
</pre>
<div style={{ marginTop: 4 }}>
{t('未传入选档值时,将按上面配置的「默认档位」计费。')}