Translation Module Boundaries
This document turns the translation workflow surface into concrete first modules and types for a native-core implementation.
It is not the hosted translation product contract. It is the local semantic foundation that a higher-level product can build on.
Purpose
The existing workflow-surface document explains what belongs in Core at a high level. This document names the first implementable modules so a Rust port does not have to invent the structure from scratch.
First Core modules
translation_candidates
Responsibilities:
- select missing entries
- select targeted entries for re-run
- preserve source-locale and normal catalog semantics
- expose stable candidate identity for downstream retry and reporting
Primary type:
TranslationCandidate
Suggested fields:
idlocalesource_textmessage_contextcommentsorigin_hints
terminology
Responsibilities:
- load glossary entries
- load protected terms
- normalize legacy and rich glossary forms
- select the relevant glossary subset for a batch
Primary types:
GlossaryEntryProtectedTerm
Suggested GlossaryEntry fields:
sourcepreferredbannednotespreserve_in_english
Suggested ProtectedTerm fields:
value- optional
notes - optional
scopes
qa
Responsibilities:
- evaluate translated candidates
- emit deterministic issues
- classify retryable vs. review-only signals
- avoid known false positives around placeholders and inert literals
Primary type:
QaIssue
Suggested fields:
codemessageseverityretryableentry_id
The issue model should be expressive enough to cover:
- structural problems
- terminology/protected-term issues
- review signals such as stale metadata
po_metadata
Responsibilities:
- parse compact
#. AI ...lines - format metadata back into PO-safe form
- generate short translation hashes
- detect stale metadata
Primary type:
AiMetadata
Suggested fields:
versionmodelconfidencestatusdatehashissuesrisk_tags
reports
Responsibilities:
- represent flagged entries
- represent unresolved entries
- aggregate counts and top issue classes
Primary type:
TranslationReport
Suggested fields:
localetranslated_countretried_countunresolved_countflagged_itemsissue_counts
workflow
Responsibilities:
- batch-shaping helpers
- bounded orchestration primitives where host-neutral
- retry-oriented decision support
This module should stop short of auth, HTTP transport, or billing concerns.
Type surface to preserve
The first public or semi-public Core surface should include:
TranslationCandidateGlossaryEntryProtectedTermQaIssueAiMetadataTranslationReport
The purpose is not to freeze every field forever. The purpose is to keep the rewrite from losing the behavior downstream workflows already rely on.
Boundary rules
These modules belong in Core only while they remain:
- host-neutral
- local-workflow oriented
- independent of account or provider concerns
The following stay outside Core:
- remote translation execution
- auth and login
- provider/model routing
- billing and entitlement logic
- product-tier policy packs
Relationship to the higher-level product
The higher-level product should be able to compose these Core modules into:
- project discovery
- request building
- remote translation calls
- retry coordination
- incremental writeback
- report emission
without re-implementing the semantic logic in a separate stack.