fix(i18n): make unlisted terms target-aware

This commit is contained in:
Tianyi Cui
2026-07-23 21:55:07 +08:00
parent 6046a13a29
commit 89ae483af9
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -21,6 +21,9 @@ describe('translation prompt rendering', () => {
expect(en).not.toContain('{{')
expect(en).toContain('plain source stays plain (必须)')
expect(en).toContain('When the target language is English, use the "English" column without a Chinese gloss')
expect(en).toContain('for a Chinese target, use an established Chinese rendering')
expect(en).toContain('for an English target, use the established English technical term')
expect(en).toContain('does an English target use established English terminology')
expect(en).toContain('The parser removes exactly one framing escape')
const zh = renderTranslationPrompt(document, { sourceLanguage: 'Chinese', terminology })
expect(zh).toContain('from Chinese to English')