Skip to content

feat(i18n): Hebrew locale + full RTL support#492

Merged
rathlinus merged 1 commit into
bulwarkmail:mainfrom
shukiv:feat/hebrew-locale-rtl
Jul 7, 2026
Merged

feat(i18n): Hebrew locale + full RTL support#492
rathlinus merged 1 commit into
bulwarkmail:mainfrom
shukiv:feat/hebrew-locale-rtl

Conversation

@shukiv

@shukiv shukiv commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Hebrew (he) as a fully-translated right-to-left locale, the RTL infrastructure the app was missing, an Auto language mode, and Gmail-style RTL compose editing.

Included

Hebrew locale — full locales/he/common.json at parity with en (0 missing/0 extra, passes translation tests); he wired through routing, request loader, client message map, and the language switcher (+ Israel flag).

RTL support (app was LTR-only) — dir on <html> (server) + client effect on switch; i18n/direction.ts covers he and fa (Persian was an upstream locale rendered LTR). Physical→logical Tailwind sweep across ~100 files (ml/mr/pl/pr→ms/me/ps/pe, text-left/right→text-start/end, border-l/r→border-s/e, key absolute offsets). Mirror directional lucide icons under dir=rtl. Component fixes: toggle-knob direction, language-dropdown width/anchor, email-row hover-actions side + fade, unread-dot.

English fallback — server + client deep-merge en as base under the active locale, so any untranslated key shows English instead of a raw message key (benefits every locale).

Auto language — switcher gains an Auto option (default): server detects browser via Accept-Language, client resolves the same; explicit pick overrides. getEffectiveLocale() guards Intl.* against the auto sentinel.

Compose RTL editing (Gmail-style) — a "Right-to-left editing support" toggle (default off); when on, a toolbar button sets per-paragraph direction via a small TipTap TextDirection extension; dir round-trips into sent HTML.

Localized relative timeformatDate relative mode uses Intl.RelativeTimeFormat (natural grammar): "an hour ago" / "לפני שעה", "2 days ago" / "לפני יומיים".

Testing

  • npm run typecheck passes.
  • he passes the translation parity tests. The other failing locale tests are pre-existing on main (locales already missing keys, e.g. settings.advanced.sender_avatars.*) — untouched by this PR.
  • Exercised live across mail list, settings, calendar, contacts, and compose in Hebrew/RTL.

Notes

  • RTL class sweep is mechanical; logical props are identical to physical in LTR.
  • A few absolute left/right positioning cases outside the already-fixed row/nav may need per-case follow-up.

@shukiv

shukiv commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author
image image image

@rathlinus

Copy link
Copy Markdown
Member

please fix the merge commits, will merge then

@shukiv
shukiv force-pushed the feat/hebrew-locale-rtl branch from 4c14c68 to 4bfd78d Compare July 7, 2026 22:01
@shukiv

shukiv commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Done — rebased onto latest main and squashed to a single linear commit, no merge commits. Ready to merge.

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.

2 participants