The translation-index.xml Format
Reference information for the elements, attributes, and layout rules used in the translation-index.xml file.
File Location
The file is located at .contentfusion/i18n/translation-index.xml.
File Example
<translation-index version="1">
<include href="publication-a.xml"/>
<entry lang="de-DE"><source href="../../en/topics/install.dita" sha="b225cee9d0ca041bfd5765cb10165571e2250150"/><target href="../../de-DE/topics/install.dita" sha="08971eb314de5eecb3b299d064f96f1d4"/></entry>
<entry lang="fr-FR"><source href="../../en/topics/install.dita" sha="b225cee9d0ca041bfd5765cb10165571e2250150"/><target href="../../fr-FR/topics/install.dita" sha="500c34a518243af8ef106ae1fd17dc4bc4543ef6"/></entry>
</translation-index>
Element: translation-index
<translation-index>
| Attribute | Required | Description |
|---|---|---|
version |
yes | Must be 1 for the current format. |
Element: entry lang
<entry lang="..."/>
One row per (language, source file) pair. The lang
attribute is a BCP 47 language tag (for example fr,
fr-FR, de-DE) and must match the tag you use for
translation jobs.
Each entry contains exactly one <source> and one
<target> child, written inline on the same line as the
<entry>.
| Child | Attributes | Description |
|---|---|---|
<source> |
href, sha |
Path to the source-language file and its Git blob SHA-1 at the time of the last recorded translation. |
<target> |
href, sha |
Path to the translated file and its Git blob SHA-1 at the time of the last recorded translation. |
Path Rules (href)
- Paths are relative to the index file's directory (not the workspace root), using
POSIX
/separators even on Windows. - Both source and target paths are required so you can copy the index together with translated files across branches or refactor folder layout without losing the pairing.
- Paths must resolve to files inside the workspace.
Layout Rules
- Use one
<entry>per line, and keep child elements inline. Do not use pretty-printed multiline entries. - Sort entries by
lang, then by sourcehref, within each file that contains entries. - The agent enforces this order when it writes the file. If you edit the file manually, following the same order helps reduce merge noise.
Element: include href
<include href="..."/>
Optional. This element pulls in another index fragment from a path relative to the current file's directory. Use it in the following situations:
- Several product areas in one repository each maintain their own fragment.
- You want one fragment per target language.
- You want to keep the main index small to make reviews and conflict resolution easier.
Rules:
- By default, the agent appends new entries to the root index file. You can instruct it (in agent-instructions.md) to record entries for a given language or product area in a specific fragment instead. For example, "track French translations in .contentfusion/i18n/translation-index-fr.xml."
- When the agent updates an existing entry, it edits the file where that entry is declared.
- For entries stored in a separate fragment to be considered when the
agent determines what is already translated in a later job, the root index must include
that fragment with an
<include>. If a fragment is written but not included, it is not consulted, so its files are detected as missing again in the next job. - Included files must exist. A missing include is an error.
- Circular includes are rejected.