Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
5 changes: 3 additions & 2 deletions bin/omarchy-locale-generate
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ if (( $# != 1 )) || [[ ! $code =~ ^[a-z]{2,3}(-[A-Za-z]{2})?$ ]]; then
fi

# The code only selects a locale from the registry; nothing the caller passes
# reaches locale.gen or locale-gen itself.
# reaches locale.gen or locale-gen itself. The country part is optional
# because Esperanto has no country: glibc ships it as plain eo.UTF-8.
locale=$(jq -r --arg code "$code" '.[$code].locale // empty' "$registry")
if [[ ! $locale =~ ^[a-z]{2,3}_[A-Z]{2}\.UTF-8$ ]]; then
if [[ ! $locale =~ ^[a-z]{2,3}(_[A-Z]{2})?\.UTF-8$ ]]; then
echo "Unknown language code: $code" >&2
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion default/agents/skills/omarchy-app/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ files committed.
switch replaces files and symlinks, so re-arm the watcher on every change.
Fall back to `#FFD60A` when Omarchy isn't there. `templates.md` has the
`Theme` class. Never change Omarchy's config.
- **Speak the user's language.** Omarchy runs in 50 languages, and the app
- **Speak the user's language.** Omarchy runs in 51 languages, and the app
follows the one picked under Setup > Language, live, like the theme. Write
every visible string as `qsTr("Save")` in QML or `tr("Save")` in C++, with
`%1` placeholders filled by `.arg()` rather than sentences glued together,
Expand Down
2 changes: 1 addition & 1 deletion default/agents/skills/omarchy/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Text {

## Translations

Omarchy runs in 50 languages, and a plugin should follow the one picked under Setup > Language the way the built-in plugins do: live, without a shell restart. Ship the plugin's strings as flat JSON catalogs in an `i18n/` directory beside its QML, one file per Omarchy language code (`en.json`, `da.json`, `pt-BR.json`; `$OMARCHY_PATH/default/i18n/locales.json` lists all 50), and read them through `Commons.Translations`:
Omarchy runs in 51 languages, and a plugin should follow the one picked under Setup > Language the way the built-in plugins do: live, without a shell restart. Ship the plugin's strings as flat JSON catalogs in an `i18n/` directory beside its QML, one file per Omarchy language code (`en.json`, `da.json`, `pt-BR.json`; `$OMARCHY_PATH/default/i18n/locales.json` lists all 51), and read them through `Commons.Translations`:

```qml
import qs.Commons as Commons
Expand Down
1,611 changes: 1,611 additions & 0 deletions default/i18n/eo/REVIEW.md

Large diffs are not rendered by default.

145 changes: 145 additions & 0 deletions default/i18n/eo/build-review.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
#!/usr/bin/env python3
"""Build a review sheet for Esperanto native speakers.
Produces a single Markdown file listing every translated string grouped by
catalog, so a reviewer can go through them in context and flag awkward
wording. Strings whose English source is unchanged (brand names, technical
tokens, clock-format previews) are listed separately so the reviewer knows
those are intentional.
"""
import json
import pathlib

ROOT = pathlib.Path(__file__).resolve().parents[3]
I18N = ROOT / "default" / "i18n"
EN, EO = I18N / "en", I18N / "eo"

TITLES = {
"menu.json": "Menu (`menu.json`) — 413 keys",
"shell.json": "Shell (`shell.json`) — 558 keys",
"cli.json": "CLI and notifications (`cli.json`) — 306 keys",
"keybindings.json": "Keybinding descriptions (`keybindings.json`) — 189 keys",
}

lines = [
"# Esperanto (`eo`) translation — review sheet",
"",
"Omarchy ships in 51 languages. Esperanto was added because it has no",
"country: glibc provides it as `eo.UTF-8` rather than `eo_XX.UTF-8`,",
"so `bin/omarchy-locale-generate` needed its locale pattern widened to",
"accept a country-less locale.",
"",
"This sheet lists every translated string, grouped by catalog, so a",
"native speaker can check wording, register and consistency. Please flag",
"anything that sounds unnatural, too literal, or inconsistent with",
"another string.",
"",
"## Conventions already applied",
"",
"- **Left in English on purpose:** brand and product names (Omarchy,",
" Hyprland, Neovim, Firefox, Steam, Rust…), technical tokens (DNS, DHCP,",
" SSH, AUR, TUI, GPU), commands, file paths, URLs and key names.",
"- **Plurals:** Esperanto uses only `one` (n = 1) and `other` per CLDR, so",
" plural entries carry those two categories. Esperanto marks the plural in",
" the noun (`-oj` for a count), so forms read `1 memorigo` /",
" `5 memorigoj`.",
"- **Placeholders:** every `%1`, `%2`… is preserved from the English source,",
" order sometimes changed to suit Esperanto word order.",
"- **Register:** consumer desktop software — short, direct, imperative.",
"",
"## Things a reviewer should look hardest at",
"",
"1. **Verb forms.** Esperanto has one past, one present, and a conditional;",
" English has more tenses than that. Check that each CLI string reads as",
" a natural state or instruction rather than a forced translation.",
"2. **Imperatives.** Menu actions and toggles were rendered as infinitives",
" (`Ŝalti`, `Forigi`). Check these feel right for menu items.",
"3. **Capitalisation of ALL-CAPS headers** (`BAR, KONEKTOJ, FONTOJ`).",
"4. **Register of `trigger.*` status labels** such as",
" `Stay Awake` → `Resti veka` — English uses adjectives here in some",
" places and verb phrases in others; the Esperanto may need to follow",
" the surrounding pattern more strictly.",
"5. **The loading phrases** (`bluetooth.phrase1…`, `power.chargingPhrase…`,",
" `network.phrase1…`, `tailscale.phrase1…`, `dropbox.phrase1…`). These are",
" playful rotating status text. They were translated literally in tone;",
" check whether they still feel light rather than technical.",
"6. **Idioms in the notifications panel**, e.g.",
" `Step aside for …` → `Paŝi flanken por …` and",
" `stay on %1` (Wi-Fi band) → `Resti sur %1`.",
"",
"## Open questions for the reviewer",
"",
"- Esperanto has no fixed UI convention for a *Settings / Setup* menu.",
" `setup` was translated as **Agordo** (singular, “arrangement/setup”).",
" Some Esperanto localisation guides prefer **Agordoj** or",
" **Konfigurado**. Which reads most naturally here?",
"- `appearance` became **Aspekto**, `trigger` became **Ŝaltilo**. Both are",
" fine literally, but `Ŝaltilo` reads slightly like “switch” rather than",
" “the toggles section”. Is there a better collective noun?",
"- The `clock.*` entries that are Qt date patterns (`MMMM d`, `%1 %2`) were",
" left in English because the shell hands them straight to Qt, which",
" formats them through the `formatLocale`. Please confirm Esperanto’s",
" month names do come out localised through `Qt.locale(\"eo\")` on a real",
" install — this has not been verified on-device yet.",
"",
]


def value_text(value):
if isinstance(value, dict):
return " / ".join(f"{k}: {v}" for k, v in value.items())
return value


total = 0
for name in ("menu.json", "shell.json", "cli.json", "keybindings.json"):
en = json.loads((EN / name).read_text(encoding="utf-8"))
eo = json.loads((EO / name).read_text(encoding="utf-8"))

same, changed = [], []
for key in en:
if en[key] == eo.get(key):
same.append(key)
else:
changed.append(key)

lines += [f"## {TITLES[name]}", ""]
lines += [
f"{len(changed)} strings translated, {len(same)} intentionally left in",
"English (brand names and technical tokens).",
"",
"<details>",
"<summary>Translated strings</summary>",
"",
"| Key | English | Esperanto |",
"| --- | --- | --- |",
]
for key in changed:
e = str(value_text(en[key])).replace("|", "\\|")
t = str(value_text(eo[key])).replace("|", "\\|")
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Resolved
lines.append(f"| `{key}` | {e} | {t} |")
lines += ["", "</details>", ""]

lines += [
"<details>",
"<summary>Left in English (%d, for reference)</summary>" % len(same),
"",
]
for key in same:
lines.append(f"- `{key}`: {value_text(en[key])}")
lines += ["", "</details>", ""]
total += len(changed)

lines += [
"## Totals",
"",
f"- Translated and needing review: **{total}** strings",
"- Untranslated on purpose: brand names, technical tokens, Qt date patterns,",
" and clock-format previews (where only weekday and month words translate,",
" so most of those preview strings are effectively unchanged).",
"",
]

dest = ROOT / "default" / "i18n" / "eo" / "REVIEW.md"
dest.write_text("\n".join(lines), encoding="utf-8")
print(f"wrote {dest} ({total} strings for review, {len(lines)} lines)")
Loading