Repository navigation
Omarchy in 50 languages - #15326
Omarchy in 50 languages#15326
Conversation
Registry, English source catalogs, and runtime translation for the menu, Quickshell desktop, and CLI notifications, with English as the default and per-string fallback. omarchy-language also sets the system locale. Danish ships as the first complete translation. Co-Authored-By: Muse <[email protected]>
Menu, shell, and CLI catalogs for every language in the registry, mirroring the English keys and placeholders. Co-Authored-By: Muse <[email protected]>
Every chapter under manual/<code>/, mirroring the English structure, links, and code blocks. Co-Authored-By: Muse <[email protected]>
Co-Authored-By: Muse <[email protected]>
Declare textFormat on newly dynamic Text bindings, translate the ConfirmDialog Delete/Uninstall buttons, and point source-level test assertions and the yt-dlp fixture at the catalog mechanism. Co-Authored-By: Muse <[email protected]>
English labels move to search-only terms so routing is identical in every language; omarchy-language only hands off to a terminal when privileged locale work remains and persists after applying; CLI catalogs switch to %1 tokens so translations can reorder arguments; catalog rebuilds skip the guard batch; leftover prompts and tooltips join the catalogs. Co-Authored-By: Muse <[email protected]>
|
Individual PRs only add the English side; a scheduled workflow extracts embedded English, translates whatever the source-hash manifest marks pending (one Muse runner per language), and lands it as an auto-merging PR gated on the structural i18n check. Co-Authored-By: Muse <[email protected]>
Codex review of the sync automationCodex reviewed
Verification on One heads-up: |
Merged
|
| Surface | Cost |
|---|---|
omarchy-i18n lookup |
2.5 ms median per call (n=30); only on notification paths |
| Menu parse (396 items) | 0.396 ms vs 0.401 ms pre-i18n — unchanged |
MenuModel.applyTranslations (Danish) |
0.067 ms for all 396 items |
| Catalog JSON parse (shell + menu) | ~0.1 ms |
| CLI benchmark | indistinguishable from quattro (omarchy 5.2 vs 5.5 ms, omarchy commands 202 vs 206 ms, omarchy screenshot --help 193 vs 192 ms) |
| Menu guard budget | 67 ms batch (budget 200 ms), slowest guard 38 ms |
| Theme switch budget | 66 ms (budget 500 ms) |
| Idle shell | no processes spawned over 30 s — the language layer is FileView watches (inotify), no timers, no polling |
Full and structural test/shell.d/i18n-test.sh, ./test/cli, extract-scan --check, and the Agents, tray, clipboard, bar, battery, channel, and image-picker tests all pass on the merged branch. test/shell.d/menu-guards-test.sh still fails on uncovered omarchy-dock guard readers, but it fails identically on quattro itself, so it predates this PR.
Still needs repository settings after merge: MUSE_API_KEY and I18N_SYNC_TOKEN secrets, "Allow auto-merge" enabled, and i18n-check required on quattro. The sync workflow itself cannot run until it lands on quattro, so its first live run should be watched.
Qt.formatDate and a bare Qt.locale() follow the system LANG, which only catches up at the next login. The bar clock, the calendar heading, and the week start now use the language's formatLocale; the month title takes the standalone month name, and the date patterns that vary by language live in the catalog. The remaining clock labels go through I18n.t(). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Picked from the menu there is no terminal for sudo, so the switch used to open a floating terminal just to ask for a password. Generating the locale and setting LANG now run as one elevated script: pkexec without a terminal, sudo with one, so there is a single prompt either way. A cancelled prompt still leaves the language unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The status notification and the power panel's time left were assembled in English. The line, its durations, and the holding/charging phrases now come from the catalog, and the power reading is joined with no-break spaces so a longer language wraps between the parts instead of inside "13.1W / 53Wh". Tests now pin the language to English, so a machine set to another language does not fail assertions on English output. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every panel, bar widget, indicator, dialog, and menu string the earlier pass missed now goes through I18n.t(), and the notifications, menu prompts, and confirmations the commands show go through omarchy-i18n: hero phrases, tooltips, statuses, section headers, empty states, the polkit and lock prompts, gum's Yes/No buttons, and the agents panel's sign-in help. Values that are stored, compared, or answered over IPC stay English and are translated only where they are displayed. Sentences are whole keys with placeholders, with a separate key for exactly one where English pluralizes, and dates use the language's formatLocale rather than the system locale. Terminal output, usage text, and diagnostics stay English. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A translated label can be much longer than the English it replaced, and a button laid out at a fixed width (the DNS provider pills) let it spill over its border. The label now spends half its padding first, then shrinks to fit, and elides only when even the smallest size does not. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The catalogs loaded asynchronously, so bindings evaluated at startup got the raw key back, briefly showing it and logging QString::arg warnings for keys with placeholders. They are small local files, now read synchronously. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Third-party shell plugins can ship their own catalogs as i18n/<code>.json and read them through Commons.Translations, which follows the language live and falls back from pt-BR to pt to English per string. The omarchy skill's plugin guide shows how, and the omarchy-app skill gives apps a small JSON-backed QTranslator so they keep plain qsTr() and switch with the desktop, with templates that build and test as written. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The extractor only knew a few exact property names, so tooltipText, activeTooltipText, leftLabel, and hero phrase lists slipped past it. It now flags any display-text property, every literal on such a line, and bare string-list items, skips identifiers, and honors an "i18n: ignore" line marker for values that must stay English. Muse now gets reference translations from the same areas and guidance for playful phrases, Qt date patterns, short units, and plural pairs, so new strings match the terms each language already uses. The key-reference check also skips __pycache__, which tests can leave in bin/. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fills the shell strings in all 49 languages and the command strings in the 30 that ran after they landed, recorded in the translation manifest. The rest are pending for the next sync. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Nothing in Omarchy escapes a percent sign, and Turkish writes it before the number, so "%%2" is a correct translation of "%2%". The test now counts placeholders the way the sync script's validator does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A misplaced brace nested the Uninstall row inside the Keep in Dock row, so it drew over it instead of below, and vanished with it when there was no dock to keep apps in. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A catalog value can now be an object of CLDR plural categories, and each translation supplies exactly the forms its language's counts reach: one and other in English, one/few/many in Russian, six in Arabic, one in Japanese. The rules live in Plural.js for the shell and plural.jq for omarchy-i18n, checked against each other in every language; the sync script asks plural.jq which forms Muse must return. I18n.tn() and omarchy-i18n --count pick the form. Numbers follow the language through the registry's decimal separator and digits, taken from Qt: I18n.formatNumber() in the shell, and omarchy-i18n localizes plain-number arguments (or --number for one value). I18n also exposes rightToLeft from the registry, Util.readingKey() maps Left and Right along the reading direction, and OMARCHY_LANGUAGE_FILE pins the shell's language the way it already pinned omarchy-i18n's, so tests no longer follow the machine's language. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every string that counts something is now a plural entry, read with I18n.tn() or omarchy-i18n --count, replacing the separate "…One" keys and the English-only count == 1 branches. Every displayed number goes through I18n.formatNumber() or a plain-number argument to omarchy-i18n, so Danish reads "13,1 W" and Persian its own digits. Arabic, Hebrew, Persian, and Urdu mirror the panels, menus, notifications, and dialogs with LayoutMirroring. Things placed by explicit x arithmetic (slider knobs, ticks, the day-length strip, toggle knobs) follow the mirroring, back and forward glyphs swap, and Left/Right keys move along the reading direction. The bar keeps the user's arrangement, the dock strip keeps its slot order, and the Wi-Fi QR code and transport controls are never mirrored. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The plugin guide covers plural entries through Commons.Translations.tn(),
numbers through I18n.formatNumber(), and what mirroring does and doesn't
flip. The app template's Translator now picks plural forms for
qsTr("%n clips", "", n), loads English plural forms from en.json, takes
the locale from Omarchy's registry so numbers match the desktop, and sets
the layout direction for a mirrored root; it builds and tests as written.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
#14675, the runtime's fingerprint-readers detector, merged into quattro as 81fd2d23ca6e. The pin moves from its head to that merge commit, and both Touch ID integration tests run against it. That runtime also has omacom/omarchy#15326, so the reset prints its prompts through omarchy-i18n. The factory-reset test sources the reset's functions with only its stubs and the system PATH, so every prompt failed with "command not found"; it now links the runtime's omarchy-i18n and its catalogs into the fixture. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Since this branch was cut, omacom#15326 moved the Taildrop arrival notice's text to omarchy-i18n and omacom#13353 gave every file the glyph instead of an image preview; the click still opens the file with xdg-open, a .desktop included. The guard merges cleanly onto the new notice. omacom#13353's test reads the busctl call the notice makes, so the two .desktop cases are redone in that form: assert_notification takes --no-open and checks that the toast carries no omarchy-exec-argv hint and no copy of the path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Since this branch was cut, quattro builds panel content on first open (omacom#15044), routes every string through I18n with catalogs (omacom#15326), restyled the copy menu for right-to-left layouts, and qualifies palette references for Qt 6.12. The branch's intent is ported onto that structure rather than the old one restored. The machine list, its search field and the shared copy menu now live inside the lazily built content, so root-level code reaches them through `panel.loadedContent` like the panel's other items, and every root caller tolerates them being null before the first open. The account-switch reset still records the last account seen while the panel has never opened, so the first open after a switch is not mistaken for one. The shared copy menu takes quattro's right-to-left placement, opening from whichever end the row's copy button sits at, and `Commons.Color`. The machine count, search placeholder, loading and no-match texts get English catalog entries, with the counts formatted for the language. Co-Authored-By: Claude Opus 5.5 <[email protected]>
WWAN / Mobile Broadband Support RequestHardware: HP laptop with built-in HP lt4120 Snapdragon X5 LTE modem ( Request: Environment:
|
The commands under test call each other: omarchy-battery-status runs omarchy-i18n, and omarchy-i18n reads OMARCHY_PATH. A test run from a checkout had neither on hand, so any test whose command reaches another one failed with `omarchy-i18n: command not found` or `OMARCHY_PATH: unbound variable`. test/shell.d/i18n-test.sh already exports both for itself; base-test.sh, which the rest source, did not. bash test/shell on quattro: 32 of 419 files fail. With these two lines: 17 of 419, and every one of the 17 also fails before this change, so nothing new fails. Four of the fifteen are a regression from the language work (omacom#15326): battery-status, crash-capture, hyprland-workspace-layout and keybindings-menu pass at 84cfb93^ and fail at 84cfb93.
The regression assertion matched the bare word, so the i18n comment upstream added in omacom#15326 ("Profile names are powerprofilesctl ids") tripped it and the test failed on current quattro even though the provider routes through the wrapper. Match an invocation with a subcommand instead, which is what the guard is meant to catch.
Resolve conflicts with the virtualized machine list (omacom#7623) and the panel translations (omacom#15326): publishPeers now writes the cached _peers that the visible peers list derives from, the offline switch sits beside the counted MACHINES header, and the new switch, empty-state and Offline strings are English catalog entries. The runtime fixture builds the lazily created panel content (omacom#15044), feeds statuses as full peer fetches, and qualifies its palette references (omacom#14553). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CFeF4GVPAdJb4fXF29e79S
What this does
Omarchy now speaks the same 50 languages as omarchy.org (the
fifty-languagesroster: 56 site editions collapse to 50 languages because the regional English editions share English text). English remains the default and the per-string fallback.Pick a language under Setup > Language — native names, English first, searchable by English name, checkmark on the current one — or run
omarchy language <code>. The menu, the Quickshell desktop, and Omarchy's own notifications switch immediately (the shell watches the language file, no restart), and the system locale is set to match so third-party apps follow on the next login.How it works
default/i18n/locales.json— the 50-language registry (native/English names, format locale, glibc locale, direction), mirrored from omarchy-site.default/i18n/<code>/{menu,shell,cli}.json— string catalogs; English inen/is the source of truth and every language mirrors its keys and placeholders exactly (397 menu ids, 166 shell keys, 111 CLI keys).manual/<code>/— the full manual, all 51 chapters per language (2,499 files), same structure, links, and code blocks as English.bin/omarchy-language— show/set/list; persists~/.config/omarchy/language, generates the glibc locale when needed, and writesLANGin/etc/locale.conf(leavingLC_*alone, same convention asinstall/config/locale.sh). Launched from the menu without a terminal, it continues in a floating terminal for thesudostep, likeomarchy-default-browser --install.bin/omarchy-i18n— prints acli.jsonstring in the current language; 49 commands' notifications now route through it.shell/Commons/I18n.qml— shell singleton layering the currentshell.jsonover English; 151 QML call sites plus the audio/monitor/clipboard JS models (via an optionaltrargument, so Node tests still assert English).MenuModel.applyTranslationsretitles shipped rows before the user extension merges (user retitles win; English labels stay searchable via search-only terms, never routable aliases), plus alanguagesprovider for the picker.noto-fonts+noto-fonts-cjkalready cover every script in the roster, so no font installs are needed.docs/i18n.mddocuments the architecture, how to add strings, and the translator brief. Danish was the pilot, verified live in the running shell; the remaining 48 catalog sets and all manuals were translated with one agent per language and validated for key/placeholder parity, heading/URL/code-fence parity, and completeness.Deliberately not translated (yet)
manual: falsethere); these translations are ahead of it and can be picked up later.Keeping translations in sync
Individual PRs only add the English side. The
i18n-checkworkflow validates structure on PRs (English freshness, placeholders, no English literals embedded directly in code) without requiring translations. TheSync translationsworkflow — modeled on omarchy-site's — then converges the rest: a credential-less runner extracts any embedded English into a patch that a separate trusted job path-checks, validates, and publishes; one credential-less Muse runner per language translates whateverdefault/i18n/translation-manifest.json(per-unit English source hashes) marks pending; and everything lands as an auto-merging PR gated oni18n-check. The exception is an extraction that changed executable code underbin/orshell/— that PR deliberately waits for human review instead of auto-merging. Tooling:scripts/i18n-sync.py(also runnable locally). Needs theMUSE_API_KEYsecret, anI18N_SYNC_TOKENsecret (fine-grained PAT with contents + pull-requests write, so the bot PR actually triggers checks —GITHUB_TOKENPRs do not), "Allow auto-merge" enabled, andi18n-checkas a required check onquattro.i18n-checkruns on every PR and passes trivially when nothing i18n-relevant changed, so requiring it cannot block unrelated PRs.Tests
New
test/shell.d/i18n-test.sh: registry shape, English menu catalog freshness againstomarchy-menu.jsonc, exact key/placeholder parity for all 49 languages, referenced-key checks both ways, complete manuals, andomarchy-language/omarchy-i18nbehavior against stubbed locale files.