Files
my-NexusTradingForexBot/docs/contributing/add-language.md
T
gavindiazandClaude Code 3a005ddcc6
Docs / Validate documentation (push) Canceled after 0s
Docs / Deploy GitHub Pages (push) Canceled after 0s
CI Final Summary (AI) / AI Final Summary (push) Canceled after 0s
CI Final Summary (AI) / Push/PR event feed (push) Canceled after 0s
CI / CI Integrity and Change Classification (push) Canceled after 0s
CI / Code Quality & Tests (push) Canceled after 0s
Dependency Lock & Migration Safety / Dependency drift (lock vs pyproject) (push) Canceled after 0s
Dependency Lock & Migration Safety / Migration safety (fail-loud + version postconditions) (push) Canceled after 0s
JS Tests / Frontend JS Unit Tests (push) Canceled after 0s
Security / CodeQL Analysis (push) Canceled after 0s
Security / Trivy Vulnerability Scan (push) Canceled after 0s
Tests (OS Matrix) / Py Tests (macos-latest) (push) Canceled after 0s
Tests (OS Matrix) / Py Tests (windows-latest) (push) Canceled after 0s
CI / Extended Validation (Tier 2) (push) Canceled after 0s
CI / Heavy CI (database-provider) (push) Canceled after 0s
CI / Heavy CI (e2e) (push) Canceled after 0s
CI / Heavy CI (integration) (push) Canceled after 0s
CI / Heavy CI (model-validation) (push) Canceled after 0s
CI / Heavy CI (research-backtest) (push) Canceled after 0s
CI / Aggregate CI Results (push) Canceled after 0s
chore(repo): initial import of Nexus Trading Forex Bot into self-hosted hosting
Full project import for the self-hosted code hosting
(https://code.aifunny.ltd/gavindiaz/my-NexusTradingForexBot.git).

Includes the live-freshness + scaler-hash fixes for the permanent
STALE dashboard (tick_pipeline now_utc stamps; infer_probabilities
computes model_input_hash on the actual scaled 70D tensor), the
data-fetch default-path fix, the g29 web-auth test fixes, and a
Chinese user manual (使用手册.md) for the web dashboard.

Scratch diagnostic scripts (check*.py, contain a live web-auth token)
and the .kilo/ agent-worktree directory are gitignored, not committed.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-23 23:24:54 +08:00

2.1 KiB

title, description, lang
title description lang
Adding a Language The step-by-step recipe for adding a new language to the Nexus documentation platform. en

Adding a Language

The multilingual architecture is data-driven: adding Turkish, French, Russian, Chinese or Japanese is a directory + registry entry — no code changes.

Recipe

  1. Create the language tree

    site/content/<lang>/            # translated site content (mirror of en tree)
    docs/<lang>/index.md            # optional docs-root landing page
    
  2. Register the language in scripts/docs/site_config.py:

    LANGUAGES = {
        "en": {"name": "English", "dir": "ltr"},
        "fa": {"name": "فارسی",   "dir": "rtl"},
        ...
        "tr": {"name": "Türkçe",  "dir": "ltr"},   # ← new
    }
    
  3. Translate core pages first (in priority order): index → getting-started/quickstart → project/status → architecture/overview → reference/faq → the rest.

  4. Mark every page with front-matter:

    lang: tr
    translation-status: partial   # complete when the whole source page is translated
    source-revision: en:index@<date-or-hash>
    
  5. Terminology: add canonical translations for the project glossary to site/terminology/<lang>.json (the audit checks consistency). Product names stay untranslated.

  6. RTL? If dir: rtl, the layout flips automatically; code blocks and technical identifiers stay LTR via the [dir=rtl] code, [dir=rtl] pre rules. Verify with the doctor's RTL checks (check_docs.py --rtl).

  7. Validate:

    python scripts/docs/check_translations.py   # coverage %, missing, stale
    python scripts/docs/check_docs.py           # full doctor
    
  8. PR: docs-only PR per the contribution guide; CI runs the same validation.

Coverage reporting

check_translations.py prints a per-language coverage table from actual inspection (English word-count parity per section), e.g.:

DOCUMENTATION TRANSLATION AUDIT
en: 100%   fa: 100%   es: 100%   ar: 100%   de: 100%

Coverage numbers come from the audit — never hand-written.