================================== Documentation Translation Workflow ================================== --------------------------------------------------- How to maintain our portal in two or more languages --------------------------------------------------- :Authors: - Rénich Bon Ćirić :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 Spanish ``es-MX``. * ``en/``: Contains the counterpart documents in English ``en-US``, preserving the exact same subdirectory layout and filenames as ``es/``. 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 ------------------------------ 1. Create or edit the file at ``es/.rst``. 2. Create or update the counterpart file at ``en/.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: .. code-block:: bash make check Local Compilation ----------------- To build a single language or both languages locally: .. code-block:: bash 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 in ``en/``. * **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 between ``es/`` and ``en/``. * **Text tone**: Keep the tone consistent with the source document: technical, clear, and direct.