fix(i18n): refine Chinese prose and prompt validation

This commit is contained in:
Tianyi Cui
2026-07-15 20:39:24 +08:00
parent 168a3b9fe7
commit 3383c20c63
12 changed files with 42 additions and 26 deletions

View File

@@ -37,7 +37,6 @@ try {
translationRules,
terminology,
})
if (englishSource.includes('{{') || chineseSource.includes('{{')) throw new Error('rendered prompt contains an unresolved placeholder')
if (!englishSource.includes('[English](example.md) | 中文')) throw new Error('English-source render does not carry the Chinese switcher instruction')
if (!chineseSource.includes('English | [中文](example.zh.md)')) throw new Error('Chinese-source render does not carry the English switcher instruction')