Expand description
Bidirectional keyword translation via canonical AST (T38, T39).
§T38: poet translate — bidirectional translation
Translates VibeScript source from one locale to another by:
- Parsing the source (any locale’s keywords are normalised to canonical English by the parser).
- Re-emitting the source with the target locale’s keywords.
This preserves the AST structure — only keywords change. Identifiers, strings, and comments are preserved. The translation is not a re-authoring; it is a keyword substitution.
§T39: Tier-2 identifiers via Aura rdfs:label
Tier-2 identifiers are multi-lingual labels for identifiers that
preserve meaning. An IRI like clinic:hasCondition can have an
rdfs:label in multiple locales: “has condition” (en), “有病情”
(zh). These labels are metadata, not separate identifiers.
Reference: docs/vibescript-full-impl-PLAN.md §8.8 T38, T39.
Structs§
- Keyword
Translator - A keyword translator — maps canonical English keywords to a target locale’s keywords.
- Tier2
Label - A tier-2 identifier label — an
rdfs:labelfor an IRI in a specific locale (T39). - Tier2
Registry - A registry of tier-2 identifier labels (T39).
Functions§
- translate_
source - Translate source from any locale to a target locale.