Documentation Translation Workflow¶
How to maintain our portal in two or more languages¶
- Authors:
Rénich Bon Ćirić <renich@mx-os.mx>
- Copyright:
CC-BY-SA 4.0 or later
- Organization:
Fundación MxOS, A.C.
Description¶
This guide documents the workflow for writing, translating, and maintaining bilingual documentation across the MxOS Foundation.
Parallel Language Tree Architecture¶
Every MxOS Foundation documentation repository is a standalone Sphinx project that organizes its sources into parallel directory trees with 1:1 file parity:
es/: Contains the source documents in Mexican Spanishes-MX.en/: Contains the counterpart documents in Englishen-US, preserving the exact same subdirectory layout and filenames ases/.
This design eliminates .po and .mo catalogs, ensuring both languages remain native, readable .rst documents directly validated by crstlint and sphinx-build -W.
Step-by-Step Translation Process¶
Whenever you create or modify a document in es/, reflect the change in the corresponding file under en/ within the same commit.
Editing in Spanish and English¶
Create or edit the file at
es/<path>.rst.Create or update the counterpart file at
en/<path>.rst, keeping the filename and all.. toctree::or:doc:targets identical.
Parity and Syntax Verification¶
Before committing your changes, run the repository check target to verify 1:1 file parity between es/ and en/, validate RST syntax, and confirm both languages build with zero warnings:
make check
Local Compilation¶
To build a single language or both languages locally:
make build-es
make build-en
make build
Translation Style Rules¶
1:1 structural parity: Every file present in
es/must exist at the exact same relative path inen/.Exact underline length: Always adjust heading adornment lines
=,-,^, and"to match the exact character count of the translated English heading.Preserve filenames and paths: Document paths inside
.. toctree::and:doc:must not be translated, as filenames remain identical betweenes/anden/.Text tone: Keep the tone consistent with the source document: technical, clear, and direct.