Kind: Interface
Source: atloria-monorepo/apps/api/src/l10n/translation-format.ts
B6 translation format contract — the PURE half of the AI-translate pipeline.
Two responsibilities, both side-effect-free and property-testable:
-
buildTranslationPrompt — the prompt handed to the doc-automation AI provider. It carries the "don't translate machinery" contract: directive lines (
:::tabs,:::,::include{…}), fenced code blocks, and glossary keep-terms must survive VERBATIM. The reader pipeline parses those directives (and B4 expands::includeat the serving seam), so a translated directive is a broken page, not a translated one. -
extractProtectedSegments / verifyDirectivesPreserved — the enforcement half. The worker verifies the model actually honored the contract before a machine translation is allowed to auto-publish; a violating result is kept as a draft for human review instead.
Properties
| Property | Type |
|---|---|
source | string |
target | string |
keep | boolean |
Was this page helpful?