Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Draft for **2.3.0** (`versions.txt`). Compared to [v2.2.0](https://github.com/my

### Changed

- Indic console locales (Hindi, Kannada, Malayalam, Tamil, Telugu): IoT resource names (gateway, node, source, field, firmware, data repository, resource, virtual device, virtual assistant, payload, forward payload, quick ID, protocol, label, library, variable, chart interpolation) are native-script loanwords (Tamil கேட்வே, லேபிள், வேரியபிள், லினியர்), not Latin English and not calques such as நுழைவாயில். Product names and protocol abbreviations stay Latin. Relative timestamps (Last seen, Created on, No change since) follow the selected language (`Intl.RelativeTimeFormat`; under ~45 seconds still shows “a few seconds ago”).
- Console colour scheme is PatternFly **light**, **dark**, or **system** (follows the OS). Custom themes from the data repository (`labels.gui_theme`) are removed. The choice is stored in the browser (`localStorage` `mc-theme`). The header has a compact joined theme control and a locale dropdown (`🇬🇧 EN-UK`). Dark mode uses PatternFly tokens for labels, forms, topology, and widgets. Dashboard tiles no longer use a grey fill.
- Release workflow builds host binaries (Go 1.27.1 in Actions) and copies only those binaries into Alpine 3.24 images on the same runner (no artifact upload/download). Images are pushed to GHCR, Quay, and Docker Hub as a single multi-arch `:${VERSION}` tag (no per-arch tags). `main` republishes the `development` pre-release by deleting and recreating it.
- Policy **Import** uses `storage.Upsert` so `createdOn` / `modifiedOn` come from the backup file (same as other resources). Built-in policies are still skipped.
Expand Down
40 changes: 31 additions & 9 deletions docs/locales.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ This document is the standing guide for **web-console translations**: how they l
| Locale YAML | `web-console/public/locales/<lng>.yaml` |
| Language picker list | `web-console/src/i18n/languages.js` |
| i18n init / HTTP load | `web-console/src/i18n/i18n.js` |
| Relative time (fromNow) | `web-console/src/i18n/relativeTime.js` + `Components/Time/Time.jsx` |
| Default language | `en_GB` (`DEFAULT_LANGUAGE` in `web-console/src/Constants/Common.js`) |
| Runtime URL | `/locales/{{lng}}.yaml` (Vite public dir; packed into the server binary at release) |

The UI uses `i18next` + `react-i18next` + `i18next-http-backend`. YAML is parsed with `js-yaml`. Detection order is Redux stored language, then the browser; unknown codes fall back to `en_GB`. Hyphens are normalized to underscores (`en-GB` → `en_GB`).

Every registered language **must** have a YAML file with the **same keys** as `en_GB.yaml`. As of this writing that is **982 keys** (flat count, including nested `dialog.*`, `helper_text.*`, `error.*`, `opts.*`).
Relative times such as “5 minutes ago” are **not** YAML keys, except the under-45-seconds bucket (`a_few_seconds_ago` / `in_a_few_seconds`). `LastSeen` uses `Intl.RelativeTimeFormat` (`web-console/src/i18n/relativeTime.js`) with the console language (`ta_IN` → `ta-IN`) and the same coarse buckets as the old `fromNow()` (not “12 seconds ago”). Do not use moment locales for this.

Every registered language **must** have a YAML file with the **same keys** as `en_GB.yaml`. As of this writing that is **986 keys** (flat count, including nested `dialog.*`, `helper_text.*`, `error.*`, `opts.*`).

### Current languages

Expand Down Expand Up @@ -78,7 +81,7 @@ Leave these **exactly** as in English:
| Booleans | `'true'` / `'false'` → `True` / `False` |
| HTTP methods | `opts.http_method.*` → `GET` `POST` `PUT` `DELETE` |
| Protocols / brands | MQTT, HTTP, Ethernet, Serial, ESPHome, Tasmota, MySensors, Alexa, … |
| Chart interpolation ids | `Basis`, `Cardinal`, `CatmullRom`, `Linear`, `StepAfter`, … |
| Chart interpolation ids | English locales keep `Basis`, `Cardinal`, `CatmullRom`, `Linear`, `StepAfter`, …. Indic locales use native-script loanwords (Tamil பேசிஸ், லினியர், நேச்சுரல்), not a Latin mix in the same list. |
| Light codes | `CW WW`, `RGB`, `RGB CW`, `RGB CW WW` |

Do **not** swap ON and OFF. They are status values, not prose.
Expand All @@ -98,13 +101,32 @@ Goals: **easy**, **meaningful**, **professional**.
### Two families

**Indic (`ta_IN`, `hi_IN`, `kn_IN`, `ml_IN`, `te_IN`)**
Everyday verbs stay native. Product / IoT names stay **ASCII English**:

`Field`, `Node`, `Gateway`, `Source`, `Handler`, `Payload`, `Dashboard`, `Backup`, `Restore`, `Firmware`, `Widget`, `Chart`, `Task`, `Policy`, `Schedule`, `Statement`, `Resource`, `Token`, `Login`, `Disk`, `Panel`, `Filter`, `Event`, `Script`, `Server`, `Upload`, `Reboot`, `Reset`.

Example: Tamil `Field சேர்`, Hindi `Field जोड़ें`. Do not transliterate those names (not `फ़ील्ड`, `நோடு`, `గేట్‌వే`).

List titles: mark plurality (`Fields`, `Policy-கள்`, `Handlerകൾ`). Do not reuse the singular as the list title.
Everyday verbs stay native. Named IoT resources use **native-script loanwords**, not Latin English and not calques:

| English | ta | hi | kn | ml | te |
| --- | --- | --- | --- | --- | --- |
| Gateway | கேட்வே | गेटवे | ಗೇಟ್‌ವೇ | ഗേറ്റ്‌വേ | గేట్‌వే |
| Node | நோடு | नोड | ನೋಡ್ | നോഡ് | నోడ్ |
| Source | சோர்ஸ் | सोर्स | ಸೋರ್ಸ್ | സോഴ്‌സ് | సోర్స్ |
| Field | ஃபீல்டு | फील्ड | ಫೀಲ್ಡ್ | ഫീൽഡ് | ఫీల్డ్ |
| Firmware | ஃபார்ம்வேர் | फर्मवेयर | ಫರ್ಮ್‌ವೇರ್ | ഫേംവെയർ | ఫర్మ్‌వేర్ |
| Data repository | டேட்டா ரிப்பாசிட்டரி | डेटा रिपॉजिटरी | ಡೇಟಾ ರಿಪಾಸಿಟರಿ | ഡാറ്റ റിപ്പോസിറ്ററി | డేటా రిపాజిటరీ |
| Resource | ரிசோர்ஸ் | रिसोर्स | ರಿಸೋರ್ಸ್ | റിസോഴ്‌സ് | రిసోర్స్ |
| Virtual device | விர்ச்சுவல் டிவைஸ் | वर्चुअल डिवाइस | ವರ್ಚುವಲ್ ಡಿವೈಸ್ | വെർച്വൽ ഡിവൈസ് | వర్చువల్ డివైస్ |
| Virtual assistant | விர்ச்சுவல் அசிஸ்டண்ட் | वर्चुअल असिस्टेंट | ವರ್ಚುವಲ್ ಅಸಿಸ್ಟೆಂಟ್ | വെർച്വൽ അസിസ്റ്റന്റ് | వర్చువల్ అసిస్టెంట్ |
| Payload | பேலோடு | पेलोड | ಪೇಲೋಡ್ | പേലോഡ് | పేలోడ్ |
| Forward payload | ஃபார்வர்ட் பேலோடு | फ़ॉरवर्ड पेलोड | ಫಾರ್ವರ್ಡ್ ಪೇಲೋಡ್ | ഫോർവേഡ് പേലോഡ് | ఫార్వర్డ్ పేలోడ్ |
| Quick ID | குவிக் ஐடி | क्विक आईडी | ಕ್ವಿಕ್ ಐಡಿ | ക്വിക്ക് ഐഡി | క్విక్ ఐడి |
| Protocol | புரோட்டோக்கால் | प्रोटोकॉल | ಪ್ರೋಟೋಕಾಲ್ | പ്രോട്ടോക്കോൾ | ప్రోటోకాల్ |
| Label | லேபிள் | लेबल | ಲೇಬಲ್ | ലേബൽ | లేబుల్ |
| Library | லைப்ரரி | लाइब्रेरी | ಲೈಬ್ರರಿ | ലൈബ്രറി | లైబ్రరీ |
| Variable | வேரியபிள் | चर | ವೇರಿಯಬಲ್ | വേരിയബിൾ | వేరియబుల్ |

Do not use calques such as Tamil நுழைவாயில் / முனை / அடையாளம் / நெறிமுறை / குறிச்சொல் / நூலகம் for those names. Do not write Latin `Gateway` inside a Tamil sentence. Keep product names and protocol abbreviations Latin (MyController, MQTT, HTTP, JSON, API).

Plurals attach without a hyphen (`கேட்வேகள்`, not `கேட்வே-கள்`). Kannada/Telugu use ZWNJ before the suffix (`ನೋಡ್‌ಗಳು`, `నోడ్‌లు`); Malayalam uses `-ുകൾ` (`നോഡുകൾ`). Hindi often keeps the same form for singular and plural loanwords (`गेटवे`). Do not reuse a clearly singular form as a list title in ta/kn/ml/te.

Other UI verbs (Save, Backup, Restore, Upload, Reboot, Reset) stay native and distinct.

**European, Hebrew, Chinese**
Use the established professional IT term in that language. Keep a loanword when it is clearer than a coined calque (`Payload`, `Gateway`, `Handler`, `Dashboard`, `Widget`, `Firmware`, `Token` are often better than *carga útil*, *Pasarela*, *承載*, *מטען*).
Expand Down
2 changes: 2 additions & 0 deletions web-console/public/locales/de_DE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ never_expire: Läuft nie ab
new: Neu
new_password: Neues Passwort
no_change_since: Unverändert seit
a_few_seconds_ago: vor ein paar Sekunden
in_a_few_seconds: in ein paar Sekunden
no_dashboard_message: Es ist kein Dashboard zum Laden vorhanden.
no_dashboard_title: Keine Dashboards verfügbar
no_data: Keine Daten
Expand Down
2 changes: 2 additions & 0 deletions web-console/public/locales/en_GB.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ never_expire: Never Expire
new: New
new_password: New Password
no_change_since: No Change Since
a_few_seconds_ago: a few seconds ago
in_a_few_seconds: in a few seconds
no_dashboard_message: There is no dashboard available to load.
no_dashboard_title: No dashboards available
no_data: No data
Expand Down
2 changes: 2 additions & 0 deletions web-console/public/locales/en_US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ never_expire: Never Expire
new: New
new_password: New Password
no_change_since: No Change Since
a_few_seconds_ago: a few seconds ago
in_a_few_seconds: in a few seconds
no_dashboard_message: There is no dashboard available to load.
no_dashboard_title: No dashboards available
no_data: No data
Expand Down
2 changes: 2 additions & 0 deletions web-console/public/locales/es_ES.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ never_expire: Nunca caduca
new: Nuevo
new_password: Nueva contraseña
no_change_since: Sin cambios desde
a_few_seconds_ago: hace unos segundos
in_a_few_seconds: dentro de unos segundos
no_dashboard_message: No hay ningún Dashboard disponible para cargar.
no_dashboard_title: No hay Dashboards disponibles
no_data: Sin datos
Expand Down
2 changes: 2 additions & 0 deletions web-console/public/locales/fr_FR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ never_expire: N'expire jamais
new: Nouveau
new_password: Nouveau mot de passe
no_change_since: Aucun changement depuis
a_few_seconds_ago: il y a quelques secondes
in_a_few_seconds: dans quelques secondes
no_dashboard_message: Aucun tableau de bord n'est disponible.
no_dashboard_title: Aucun tableau de bord disponible
no_data: Aucune donnée
Expand Down
2 changes: 2 additions & 0 deletions web-console/public/locales/he_IL.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ never_expire: ללא תפוגה
new: חדש
new_password: סיסמה חדשה
no_change_since: ללא שינוי מאז
a_few_seconds_ago: לפני כמה שניות
in_a_few_seconds: בעוד כמה שניות
no_dashboard_message: אין לוח מחוונים לטעינה.
no_dashboard_title: אין לוחות מחוונים זמינים
no_data: אין נתונים
Expand Down
Loading
Loading