Skip to content

feat(i18n): add Hebrew language with RTL layout - #257

Open
yossi-computers wants to merge 1 commit into
flick9000:mainfrom
yossi-computers:hebrew-translation
Open

yossi-computers wants to merge 1 commit into
flick9000:mainfrom
yossi-computers:hebrew-translation

Conversation

@yossi-computers

@yossi-computers yossi-computers commented Sep 29, 2026 •

Copy link
Copy Markdown

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactoring
  • Style
  • Localization
  • Other

Description

Adds Hebrew (he) to the app, including a right-to-left layout.

Localization

  • New app/src/i18n/locales/he.json (all keys) and app/public/icons/flags/he.svg (Twemoji flag, same style as the other flags).
  • Hebrew registered in astro.config.mjs and the languages list.

RTL layout (applies only when dir="rtl", set in Layout.astro for he)

  • Sidebar moves to the right (including the slide-in/slide-out animation on narrow windows), titlebar controls move to the left, and toggles, chevrons and the custom select are mirrored.
  • The script preview and the package ID input stay LTR.
  • All overrides live in one html[dir="rtl"] block at the end of style.css, so LTR languages are unchanged.

Translatable dialog strings

  • The update, OneDrive and restore-point dialogs and the manual-package messages were hardcoded in English in main.js / appinstall.js. They are now locale keys (dialog.*, install.manualAdded, install.invalidId) added to en.json. MainPage.astro renders them into a JSON <script> tag that the scripts read, and the English text stays in the code as a fallback. Other languages fall back to English until translated.

Bugfix

  • The sidebar logo used a relative src="logo.svg", so it didn't load on localized pages (/he/, /it/, …). It's now /logo.svg.

Tested with npm run build and a local tauri build on Windows 11. The Hebrew layout was checked visually. RTL rules are scoped to dir="rtl", so LTR styling is unchanged.

🤖 Generated with Claude Code

- Add Hebrew translation (he.json) and Israel flag icon
- Mirror the layout for right-to-left languages (dir="rtl"): sidebar on
  the right, titlebar controls on the left, flipped toggles/selects;
  the script preview and package ID input stay LTR
- Move hardcoded dialog strings (update, OneDrive, restore point,
  manual packages) into locale keys so every language can translate them
- Fix sidebar logo not loading on localized pages (/logo.svg)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant