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>
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
-
Create the language tree
site/content/<lang>/ # translated site content (mirror of en tree) docs/<lang>/index.md # optional docs-root landing page -
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 } -
Translate core pages first (in priority order):
index→getting-started/quickstart→project/status→architecture/overview→reference/faq→ the rest. -
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> -
Terminology: add canonical translations for the project glossary to
site/terminology/<lang>.json(the audit checks consistency). Product names stay untranslated. -
RTL? If
dir: rtl, the layout flips automatically; code blocks and technical identifiers stay LTR via the[dir=rtl] code, [dir=rtl] prerules. Verify with the doctor's RTL checks (check_docs.py --rtl). -
Validate:
python scripts/docs/check_translations.py # coverage %, missing, stale python scripts/docs/check_docs.py # full doctor -
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.