fix(i18n): 补齐九种语言的翻译并修复国际化检查
补齐页面缺译,统一动态文案的整句插值方式。
This commit is contained in:
+25
-19
@@ -1019,11 +1019,11 @@ function renderPriceSimpleCore({
|
||||
|
||||
const parts = [];
|
||||
// base: model ratio
|
||||
parts.push(i18next.t('模型: {{ratio}}'));
|
||||
parts.push(i18next.t('模型: {{ratio}}', { ratio: modelRatio }));
|
||||
|
||||
// cache part (label differs when with image)
|
||||
if (shouldShowCache) {
|
||||
parts.push(i18next.t('缓存: {{cacheRatio}}'));
|
||||
parts.push(i18next.t('缓存: {{cacheRatio}}', { cacheRatio }));
|
||||
}
|
||||
|
||||
if (hasSplitCacheCreation) {
|
||||
@@ -1031,37 +1031,43 @@ function renderPriceSimpleCore({
|
||||
parts.push(
|
||||
i18next.t(
|
||||
'缓存创建: 5m {{cacheCreationRatio5m}} / 1h {{cacheCreationRatio1h}}',
|
||||
{ cacheCreationRatio5m, cacheCreationRatio1h },
|
||||
),
|
||||
);
|
||||
} else if (shouldShowCacheCreation5m) {
|
||||
parts.push(i18next.t('缓存创建: 5m {{cacheCreationRatio5m}}'));
|
||||
parts.push(
|
||||
i18next.t('缓存创建: 5m {{cacheCreationRatio5m}}', {
|
||||
cacheCreationRatio5m,
|
||||
}),
|
||||
);
|
||||
} else if (shouldShowCacheCreation1h) {
|
||||
parts.push(i18next.t('缓存创建: 1h {{cacheCreationRatio1h}}'));
|
||||
parts.push(
|
||||
i18next.t('缓存创建: 1h {{cacheCreationRatio1h}}', {
|
||||
cacheCreationRatio1h,
|
||||
}),
|
||||
);
|
||||
}
|
||||
} else if (shouldShowLegacyCacheCreation) {
|
||||
parts.push(i18next.t('缓存创建: {{cacheCreationRatio}}'));
|
||||
parts.push(
|
||||
i18next.t('缓存创建: {{cacheCreationRatio}}', { cacheCreationRatio }),
|
||||
);
|
||||
}
|
||||
|
||||
// image part
|
||||
if (image) {
|
||||
parts.push(i18next.t('图片输入: {{imageRatio}}'));
|
||||
parts.push(i18next.t('图片输入: {{imageRatio}}', { imageRatio }));
|
||||
}
|
||||
|
||||
parts.push(`{{ratioType}}: {{groupRatio}}`);
|
||||
|
||||
let result = i18next.t(parts.join(' * '), {
|
||||
ratio: modelRatio,
|
||||
ratioType: ratioLabel,
|
||||
groupRatio: finalGroupRatio,
|
||||
cacheRatio: cacheRatio,
|
||||
cacheCreationRatio: cacheCreationRatio,
|
||||
cacheCreationRatio5m: cacheCreationRatio5m,
|
||||
cacheCreationRatio1h: cacheCreationRatio1h,
|
||||
imageRatio: imageRatio,
|
||||
});
|
||||
parts.push(
|
||||
i18next.t('{{ratioType}}: {{groupRatio}}', {
|
||||
ratioType: ratioLabel,
|
||||
groupRatio: finalGroupRatio,
|
||||
}),
|
||||
);
|
||||
let result = parts.join(' * ');
|
||||
|
||||
if (isSystemPromptOverride) {
|
||||
result += '\n\r' + i18next.t('系统提示覆盖');
|
||||
result += `\n\r${i18next.t('系统提示覆盖')}`;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user