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:
@@ -26,10 +26,10 @@
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
inset-inline-start: 0;
|
||||
width: min(90vw, 360px);
|
||||
max-width: 360px;
|
||||
border-right: 1px solid var(--border-base);
|
||||
border-inline-end: 1px solid var(--border-base);
|
||||
box-shadow: var(--folder-card-shadow);
|
||||
transform: translateX(0);
|
||||
transition: transform 0.25s ease, opacity 0.2s ease;
|
||||
@@ -41,6 +41,9 @@
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
[dir="rtl"] .session-sidebar-collapsed {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
.session-sidebar-backdrop {
|
||||
@apply absolute inset-0;
|
||||
@@ -54,7 +57,7 @@
|
||||
.session-sidebar-menu-button--floating {
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
left: 1rem;
|
||||
inset-inline-start: 1rem;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
@@ -128,7 +131,7 @@ session-sidebar-controls .selector-trigger-primary {
|
||||
.mobile-fullscreen-exit-wrapper {
|
||||
position: fixed;
|
||||
top: calc(env(safe-area-inset-top, 0px) + 12px);
|
||||
right: calc(env(safe-area-inset-right, 0px) + 12px);
|
||||
inset-inline-end: calc(env(safe-area-inset-right, 0px) + 12px);
|
||||
z-index: 1250;
|
||||
pointer-events: none;
|
||||
}
|
||||
@@ -143,11 +146,11 @@ session-sidebar-controls .selector-trigger-primary {
|
||||
}
|
||||
|
||||
.session-resize-handle--left {
|
||||
right: 0;
|
||||
inset-inline-end: 0;
|
||||
}
|
||||
|
||||
.session-resize-handle--right {
|
||||
left: 0;
|
||||
inset-inline-start: 0;
|
||||
}
|
||||
|
||||
.session-resize-handle:hover {
|
||||
@@ -160,14 +163,20 @@ session-sidebar-controls .selector-trigger-primary {
|
||||
}
|
||||
|
||||
.session-resize-handle--left::before {
|
||||
right: 0;
|
||||
inset-inline-end: 0;
|
||||
transform: translateX(50%);
|
||||
}
|
||||
[dir="rtl"] .session-resize-handle--left::before {
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.session-resize-handle--right::before {
|
||||
left: 0;
|
||||
inset-inline-start: 0;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
[dir="rtl"] .session-resize-handle--right::before {
|
||||
transform: translateX(50%);
|
||||
}
|
||||
|
||||
.session-list-header {
|
||||
@apply border-b relative;
|
||||
@@ -190,14 +199,14 @@ session-sidebar-controls .selector-trigger-primary {
|
||||
}
|
||||
|
||||
.session-item-base {
|
||||
@apply w-full flex flex-col gap-1 px-3 py-2.5 text-left transition-colors outline-none;
|
||||
@apply w-full flex flex-col gap-1 px-3 py-2.5 text-start transition-colors outline-none;
|
||||
font-family: var(--font-family-sans);
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
|
||||
.session-item-base.session-item-child {
|
||||
padding-left: 2.25rem;
|
||||
padding-inline-start: 2.25rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -206,7 +215,7 @@ session-sidebar-controls .selector-trigger-primary {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 1.125rem;
|
||||
inset-inline-start: 1.125rem;
|
||||
width: 1px;
|
||||
background-color: var(--text-secondary);
|
||||
opacity: 0.95;
|
||||
@@ -221,7 +230,7 @@ session-sidebar-controls .selector-trigger-primary {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 1.125rem;
|
||||
inset-inline-start: 1.125rem;
|
||||
width: 0.875rem;
|
||||
height: 1px;
|
||||
background-color: var(--text-secondary);
|
||||
@@ -231,11 +240,11 @@ session-sidebar-controls .selector-trigger-primary {
|
||||
}
|
||||
|
||||
.session-item-base.session-item-border-user {
|
||||
border-left: 4px solid var(--message-user-border);
|
||||
border-inline-start: 4px solid var(--message-user-border);
|
||||
}
|
||||
|
||||
.session-item-base.session-item-border-assistant {
|
||||
border-left: 4px solid var(--message-assistant-border);
|
||||
border-inline-start: 4px solid var(--message-assistant-border);
|
||||
}
|
||||
|
||||
.session-item-expander {
|
||||
|
||||
Reference in New Issue
Block a user