-
-
Notifications
You must be signed in to change notification settings - Fork 18
Translating
DOCSight uses JSON-based translation files. This guide explains how to add a new language or improve an existing translation.
Existing languages: English (en), Deutsch (de), French (fr), Spanish (es)
Translations live in two places:
app/
i18n/ # Core UI strings (~500 keys)
en.json # Source of truth
de.json
fr.json
es.json
template.json # Empty skeleton for new languages
modules/
backup/i18n/ # Module-specific strings
bnetz/i18n/
bqm/i18n/
journal/i18n/
mqtt/i18n/
reports/i18n/
smokeping/i18n/
speedtest/i18n/
weather/i18n/
Each i18n/ directory contains:
-
en.json-- the source of truth (all keys must exist here first) -
template.json-- auto-generated skeleton with empty values -
<lang>.json-- one file per language (e.g.de.json,fr.json)
Copy template.json to <lang>.json in every i18n/ directory:
# Core
cp app/i18n/template.json app/i18n/pt.json
# All modules
for dir in app/modules/*/i18n/; do
cp "$dir/template.json" "$dir/pt.json"
doneThe core file (app/i18n/<lang>.json) must have a _meta block at the top:
{
"_meta": {
"language_name": "Portugues",
"flag": "\ud83c\uddf5\ud83c\uddf9"
},
"nav": "Navegacao",
...
}-
language_nameis shown in the language picker. -
flagis a flag emoji for the language.
Module files do not have _meta.
Open en.json side-by-side and translate each value. Keep the keys unchanged.
// en.json
"health_good": "Good",
"health_marginal": "Marginal",
// pt.json
"health_good": "Bom",
"health_marginal": "Marginal",Important rules:
- Translate values only, never keys.
- Keep HTML tags (e.g.
<b>,<a href='...'>) intact. - Keep placeholders like
{dir},{count},{0},{1},{name}intact. - Arrays (like
month_namesandisp_options) must have the same number of elements asen.json. Translate each element in order.
// en.json
"month_names": ["January", "February", ..., "December"],
// pt.json
"month_names": ["Janeiro", "Fevereiro", ..., "Dezembro"],Run the validation script to check for missing or extra keys:
python scripts/i18n_check.py --validateA clean run prints:
All <N> language file(s) are in sync with en.json.
If keys are missing or extra, the script tells you exactly which ones.
Run DOCSight and switch to your language in Settings > Language. Walk through the main views to check for truncation, missing strings, or formatting issues.
Create a PR with your <lang>.json files. The title should be something like i18n: add Portuguese translation. No other files need to change -- the language picker detects new files automatically.
When new keys are added to en.json, existing translations will be missing those keys. Run validation to find them:
python scripts/i18n_check.py --validateThen add the missing keys to each affected language file.
If you add keys to en.json, regenerate all template.json files:
python scripts/i18n_check.py --generateThis overwrites every template.json with an empty skeleton matching the current en.json.
- Start with the core file. It has ~500 keys and covers the entire UI. Module files are small (5-10 keys each).
-
en.jsonis always the source of truth. Never add a key to a translation file that does not exist inen.json. - Partial translations work. Missing keys fall back to English at runtime, so you can submit an incomplete translation and improve it later.
- Use a JSON-aware editor to catch syntax errors (trailing commas, missing quotes) before committing.
Home | Quick Start | Configuration | API Reference | GitHub
- Quick Start
- Installation
- Running without Docker
- Podman Quadlet
- Configuration
- Reverse Proxy
- Example Compose Stacks
- Dashboard
- Connection Monitor
- Signal Trends
- Before/After Comparison
- Channel Timeline & Compare
- Event Log
- Smart Capture
- Gaming Quality Index
- Modulation Performance
- Cable Segment Utilization
- In-App Glossary
- Speedtest Tracker
- BNetzA Breitbandmessung
- ThinkBroadband BQM
- Smokeping
- Weather
- Netzbremse (Peering)
- Home Assistant (MQTT)
- Prometheus Metrics