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

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

## Summary

This PR adds full Hebrew (he) locale support to the UI, including a
complete translation of all user-facing strings and comprehensive RTL
layout support across all components.

## What was done

### Hebrew translation
- Full translation of all i18n message files for the `he` locale (17
translation files)
- Registered the language in the i18n system and the language picker

### RTL support
- Automatic direction detection (`dir="rtl"`) when Hebrew is selected
- Replaced physical CSS properties (`left`/`right`) with logical
equivalents (`inline-start`/`inline-end`) across the project
- Fixed resize direction, file path alignment, and textarea padding
- Fixed navigation button positioning in textarea for RTL
- Fixed scrollbar direction in RTL
- Fixed code block direction and selector alignment
- Fixed Monaco editor direction in the file viewer
- Auto-detect text direction in reasoning block (`dir="auto"` +
`unicode-bidi: plaintext`)

### Adapted components
- `session-layout` — sidebar and resize handle
- `prompt-input` — text direction and buttons
- `message-base` — message blocks and reasoning
- `message-timeline` — timeline bar
- `right-panel` — right side panel
- `tool-call` — tool call display
- `settings-screen` — settings page
- `selector` — selection component
- `instance-shell` — main shell

## New files

```
packages/ui/src/lib/i18n/messages/he/
  advancedSettings.ts
  app.ts
  commands.ts
  dialogs.ts
  filesystem.ts
  folderSelection.ts
  index.ts
  instance.ts
  loadingScreen.ts
  logs.ts
  markdown.ts
  messaging.ts
  remoteAccess.ts
  session.ts
  settings.ts
  time.ts
  toolCall.ts
```

## Suggested testing
- Switch language to Hebrew and verify all strings are translated
- Verify RTL layout is correct across all screens (session, settings,
file viewer)
- Verify that English text inside a reasoning block is displayed LTR
- Switch back to English and verify everything returns to LTR

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Shantur Rathore <i@shantur.com>
This commit is contained in:
MusiCode1
2026-03-24 23:09:52 +02:00
committed by GitHub
parent 3bad0afd7d
commit 1c68f5d288
49 changed files with 1334 additions and 123 deletions

View File

@@ -35,7 +35,9 @@
}
.prompt-input {
@apply w-full pl-3 pr-10 pt-2.5 border text-sm resize-none outline-none transition-colors;
@apply w-full pt-2.5 border text-sm resize-none outline-none transition-colors;
padding-inline-start: 2.5rem;
padding-inline-end: 0.75rem;
font-family: inherit;
background-color: var(--surface-base);
color: var(--text-primary);
@@ -65,8 +67,8 @@
.prompt-input-overlay {
position: absolute;
bottom: 1rem;
left: 0.75rem;
right: 0.75rem;
inset-inline-start: 0.75rem;
inset-inline-end: 0.75rem;
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
@@ -81,11 +83,13 @@
color: var(--text-primary);
}
/* Navigation buttons container (expand, prev, next) */
/* Navigation buttons container (expand, prev, next).
Intentionally at inline-start (left in LTR, right in RTL) so buttons never overlap
the scrollbar, which browsers always place at inline-end. */
.prompt-nav-buttons {
position: absolute;
top: 0.25rem;
right: 0.25rem;
inset-inline-start: 0.25rem;
bottom: 0.25rem;
display: flex;
flex-direction: column;
@@ -160,6 +164,11 @@
@apply opacity-60 cursor-not-allowed;
}
/* In RTL: override dir="auto" which defaults to LTR on empty textarea */
[dir="rtl"] .prompt-input {
direction: rtl;
}
.prompt-input::placeholder {
color: var(--text-muted);
}
@@ -256,7 +265,7 @@
display: none;
position: absolute;
bottom: calc(100% + 6px);
left: 0;
inset-inline-start: 0;
padding: 8px;
background-color: var(--surface-base);
border: 1px solid var(--border-base);
@@ -335,6 +344,7 @@
.prompt-input {
min-height: 0;
padding: 0.5rem 0.75rem;
padding-inline-start: 2.5rem; /* preserve space for nav buttons */
padding-bottom: 0.75rem;
}