Languages
The web UI speaks English and Arabic (Settings → General → Language and region). English, the default, reads left to right; Arabic reads right to left: the sidebar moves to the right, the board's columns run right to left, and everything mirrors with them. The page is served already set to the language chosen, so it's drawn the right way round from the start.
These docs in Arabic are README.ar.md, which the website shows under
/ar/docs/: keep it up to date with README.md (a test checks they have
the same sections).
- What's translated: hunt's own words: menus, buttons, headings, forms, messages and the choices the service offers (stages, reasons, kinds). What people wrote stays as written: names, postings, emails, notes, tags, and the change log's sentences (the service writes those, in English). The default stage names are translated where they're shown, and stay as they are in the database. The CLI speaks English.
- Region: how dates, times and numbers are written. Left on its default, it follows the language (Arabic month and day names, say).
- Numbers: the language's own digits (Arabic-Indic, ٠١٢٣, for Arabic), or always Western (0123) or Arabic-Indic. Addresses, emails and version numbers keep theirs. Amounts (£85k–100k/yr) read left to right inside Arabic text.
- Time zone (Settings → Calendar): what "today" and "now" are, for hunt and for the page:
when things were added, what's overdue, the calendar. Left empty, it's
the machine hunt runs on (a container is usually UTC). With one chosen,
the calendar feed gives its times in it (
TZID).
Adding a language
- Copy
src/web/i18n-ar.jstosrc/web/i18n-<code>.js, change its code, name, direction (ltrorrtl) and digits, and translate each phrase. Patterns fill{names}with the parts that vary;{n},{m},{n1}… match numbers only. A phrase left out shows in English. - Add it to
LANGUAGESinsrc/service.rs, serve it next to/i18n-ar.jsinsrc/api.rs, and load it insrc/web/index.htmlafteri18n.js.
The page is translated as it's drawn (src/web/i18n.js): the code writes
English, and each text, placeholder, title, aria-label and alt found in
the catalog is swapped for its translation. Anything inside
translate="no", or in the user-content list there, is left alone.