Skip to content

feat(menu): write the multi-user entries in the Omarchy language - #11

Merged
lbssousa merged 1 commit into
mainfrom
feat/menu-i18n
Nov 5, 2026
Merged

lbssousa merged 1 commit into
mainfrom
feat/menu-i18n

Conversation

@lbssousa

@lbssousa lbssousa commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

The Omarchy menu translates only its own rows (default/i18n/<code>/menu.json), never an extension's, so System › Switch User and Setup › Users stayed in English whatever language Omarchy showed.

  • share/menu-labels.json: the six labels in every language Omarchy has (49 besides English), reusing Omarchy's own words for user, password and remove in each.
  • omarchy-mu-menu-sync reads the language as omarchy-i18n does ($OMARCHY_LANGUAGE_FILE or ~/.config/omarchy/language) and writes the labels in it, keeping the English label in searchTerms, as the menu does for its own rows. An unknown, invalid or missing language is English. Actions and when gates are untouched.
  • omarchy-mu-menu-sync.path (user) reruns it when the language changes. It comes with omarchy-mu-login.service (Also=); on upgrades from before 0.11.0 it is enabled where the login unit is, and it is disabled on removal.
  • README and CHANGELOG (Unreleased).
English pt-BR
Switch User Trocar de usuário
Users Usuários
Add User Adicionar usuário
Remove User Remover usuário
Administrator Rights Permissões de administrador
Change Password Alterar senha

Notes

  • The translations are machine-written; languages such as si, ta, sw, ga and uz deserve a native speaker's look.
  • The path unit watches %h/.config/omarchy/language; with another XDG_CONFIG_HOME, a change shows at the next login.
  • The upgrade step is tied to 0.11.0; adjust if the next release is numbered otherwise.

Test plan

  • tests/sh/menu-sync.test.sh: 9 passed, including English without a language file, pt-BR labels with search terms, following a change back to English, bad codes, and the catalog matching the block's entries and Omarchy's locales.json
  • Every tests/sh/*.test.sh and node --test tests/js/ (22 passed)
  • Sync run against a copy of a real omarchy-menu.jsonc in pt-BR
  • just lint (shellcheck 0.11.0 over bin/, lib/, scripts/ and tests/sh/, qmllint): clean
  • Installed package: switch language with omarchy language <code> and see the entries follow without logging out (checked on a real machine: pt-BR → de → pt-BR)

🤖 Generated with Claude Code

The menu translates only its own rows (default/i18n/<code>/menu.json),
never an extension's, so Switch User and Setup › Users stayed in English
whatever language Omarchy showed. omarchy-mu-menu-sync now writes their
labels from share/menu-labels.json, which has every language Omarchy has,
in the language ~/.config/omarchy/language names, and keeps the English
label as a search term the way the menu does for its own rows. Anything
it lacks is English.

It runs at each login, as before, and when the language changes:
omarchy-mu-menu-sync.path, enabled along with omarchy-mu-login.service
(Also=), on upgrade where that one is, and disabled on removal.

A test checks the catalog against the block's labelled entries and
against Omarchy's locales.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lbssousa
lbssousa merged commit 12a4f3d into main Nov 5, 2026
1 check passed
@lbssousa
lbssousa deleted the feat/menu-i18n branch November 5, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant