Selaa lähdekoodia

fix(i18n): align translation briefing link rules

pku-xht 2 viikkoa sitten
vanhempi
sitoutus
b7e195a7e6
2 muutettua tiedostoa jossa 6 lisäystä ja 4 poistoa
  1. 4 2
      scripts/translation-brief.spec.ts
  2. 2 2
      scripts/translation-brief.ts

+ 4 - 2
scripts/translation-brief.spec.ts

@@ -215,7 +215,8 @@ describe('brief rendering', () => {
     expect(brief).toContain('## First-occurrence notes')
     expect(brief).toContain('agent(智能体)')
     expect(brief).toContain('首次出现 annotations attach to the document-wide first occurrence only')
-    expect(brief).toContain('use an existing `.zh.md` sibling for Chinese')
+    expect(brief).toContain('targets in the active bilingual corpus use `.zh.md` for Chinese')
+    expect(brief).toContain('a missing in-scope counterpart is an error')
     expect(brief).toContain('verify-translation-pairing --write docs/foo.md')
   })
 
@@ -267,7 +268,8 @@ describe('brief rendering', () => {
       scope: { kind: 'units', bundles: [bundle], firstOccurrenceNotes: [] },
     })
     expect(brief).toContain('exactly what the new Chinese states')
-    expect(brief).toContain('use the `.md` sibling for English when a pair exists')
+    expect(brief).toContain('targets in the active bilingual corpus use `.md` for English')
+    expect(brief).toContain('targets outside the corpus keep the authored path')
     expect(brief).toContain('verify-translation-pairing --write docs/foo.md')
   })
 

+ 2 - 2
scripts/translation-brief.ts

@@ -386,7 +386,7 @@ const ZH_TARGET_DIGEST = [
   '- Nothing added, nothing dropped: the Chinese must state exactly what the new English states.',
   '- Write natural institutional technical Chinese, not word-by-word gloss; terse stays terse.',
   '- Code fences byte-identical to the English side, comments included; inline code spans verbatim.',
-  '- Repository-relative document links keep the same semantic target and exact query/fragment; use an existing `.zh.md` sibling for Chinese, otherwise keep the original target. The switcher remains the cross-locale exception.',
+  '- Repository-relative document links keep the same semantic target and exact query/fragment; targets in the active bilingual corpus use `.zh.md` for Chinese, a missing in-scope counterpart is an error, and targets outside the corpus keep the authored path. The switcher remains the cross-locale exception.',
   '- Structure mirrors the counterpart: heading depths and order, list kinds and item counts, table rows and columns.',
   '- 首次出现 annotations attach to the document-wide first occurrence only; later occurrences use the bare form, and an empty 首次出现 cell means never gloss.',
   '- Typography: one half-width space between Chinese and Latin or digits; full-width punctuation in Chinese prose; 顿号 for enumerations; second person is 你.',
@@ -398,7 +398,7 @@ const EN_TARGET_DIGEST = [
   '- Nothing added, nothing dropped: the English must state exactly what the new Chinese states.',
   '- Write concise professional developer prose, not word-by-word gloss; terse stays terse.',
   '- Code fences byte-identical to the Chinese side, comments included; inline code spans verbatim.',
-  '- Repository-relative document links keep the same semantic target and exact query/fragment; use the `.md` sibling for English when a pair exists, otherwise keep the original target. The switcher remains the cross-locale exception.',
+  '- Repository-relative document links keep the same semantic target and exact query/fragment; targets in the active bilingual corpus use `.md` for English, a missing in-scope counterpart is an error, and targets outside the corpus keep the authored path. The switcher remains the cross-locale exception.',
   '- Structure mirrors the counterpart: heading depths and order, list kinds and item counts, table rows and columns.',
   '- One physical line per paragraph; exactly one trailing newline.',
 ]