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

@@ -141,13 +141,13 @@
.message-step-start {
background-color: var(--message-assistant-bg);
border-left: 4px solid var(--message-assistant-border);
border-inline-start: 4px solid var(--message-assistant-border);
margin-top: 0;
}
.message-step-finish {
background-color: var(--message-assistant-bg);
border-left: 4px solid var(--message-assistant-border);
border-inline-start: 4px solid var(--message-assistant-border);
margin: 0;
}
@@ -172,7 +172,7 @@
font-size: 9px;
color: var(--text-muted);
font-weight: var(--font-weight-medium);
margin-right: 0.35rem;
margin-inline-end: 0.35rem;
}
.message-step-heading {
@@ -189,7 +189,7 @@
}
.message-error-block {
@apply text-sm p-3 rounded border-l-[3px] my-2;
@apply text-sm p-3 rounded border-s-[3px] my-2;
color: var(--status-error);
background-color: var(--message-error-bg);
border-color: var(--status-error);
@@ -258,6 +258,7 @@
padding: 8px;
background-color: var(--surface-code);
border-radius: 4px;
direction: ltr;
}
.message-error-part {
@@ -335,12 +336,12 @@
.message-step-start {
background-color: var(--message-assistant-bg);
border-left: 4px solid var(--message-assistant-border);
border-inline-start: 4px solid var(--message-assistant-border);
}
.message-step-finish {
background-color: var(--message-assistant-bg);
border-left: 4px solid var(--message-assistant-border);
border-inline-start: 4px solid var(--message-assistant-border);
}
.message-step-heading {
@@ -363,7 +364,7 @@
}
.message-step-time {
@apply text-[11px] text-[var(--text-muted)] font-normal ml-auto;
@apply text-[11px] text-[var(--text-muted)] font-normal ms-auto;
}
.message-step-meta-inline {
@@ -390,7 +391,7 @@
.message-reasoning-card {
--reasoning-border-color: var(--border-strong, var(--border-base));
background-color: var(--message-assistant-bg);
border-left: 4px solid var(--message-assistant-border);
border-inline-start: 4px solid var(--message-assistant-border);
margin-top: 0;
margin-bottom: 0;
padding: 0;
@@ -424,7 +425,7 @@
padding: 0.25rem 0.6rem;
font: inherit;
color: inherit;
text-align: left;
text-align: start;
cursor: pointer;
transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
@@ -546,4 +547,5 @@
color: var(--text-primary);
white-space: pre-wrap;
margin: 0;
unicode-bidi: plaintext;
}