# 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>
275 lines
6.2 KiB
CSS
275 lines
6.2 KiB
CSS
@import "github-markdown-css/github-markdown-light.css" layer(github-markdown-base);
|
|
|
|
@layer components {
|
|
.markdown-body {
|
|
max-width: none;
|
|
background-color: transparent;
|
|
font-family: var(--font-family-sans);
|
|
font-size: var(--font-size-base);
|
|
line-height: var(--line-height-normal);
|
|
font-weight: var(--font-weight-regular);
|
|
color: var(--text-primary);
|
|
/* Message containers may use `whitespace-pre-wrap` for plain text.
|
|
Markdown should always match assistant rendering (normal whitespace). */
|
|
white-space: normal;
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body blockquote,
|
|
.markdown-body table {
|
|
font-size: inherit;
|
|
line-height: inherit;
|
|
color: inherit;
|
|
}
|
|
|
|
/* Auto-detect text direction per block element for RTL language support (e.g. Hebrew, Arabic) */
|
|
.markdown-body p,
|
|
.markdown-body li,
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6,
|
|
.markdown-body blockquote,
|
|
.markdown-body td,
|
|
.markdown-body th {
|
|
unicode-bidi: plaintext;
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
font-family: inherit;
|
|
color: var(--markdown-heading-color, inherit);
|
|
font-weight: var(--font-weight-semibold);
|
|
line-height: 1.3;
|
|
margin-top: 0.9em;
|
|
margin-bottom: 0.55em;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: calc(var(--font-size-base) + 0.5px);
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: calc(var(--font-size-base) + 1px);
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: calc(var(--font-size-base) + 1.5px);
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: calc(var(--font-size-base) + 2px);
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
font-size: calc(var(--font-size-base) + 2.5px);
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: calc(var(--font-size-base) + 3px);
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2 {
|
|
border-bottom: none;
|
|
padding-bottom: 0;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
display: none;
|
|
}
|
|
|
|
.markdown-body strong {
|
|
font-weight: var(--font-weight-regular);
|
|
color: var(--markdown-accent, var(--message-assistant-border));
|
|
}
|
|
|
|
.markdown-body em {
|
|
font-style: italic;
|
|
border-bottom: none;
|
|
font-size: calc(var(--font-size-base) + 1.5px);
|
|
margin-top: 0.3em;
|
|
margin-bottom: 0.3em;
|
|
display: inline;
|
|
}
|
|
|
|
.markdown-body a {
|
|
color: var(--accent-primary);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body a:hover {
|
|
color: var(--accent-hover);
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.markdown-body code {
|
|
font-family: var(--font-family-mono);
|
|
font-size: var(--font-size-sm);
|
|
background-color: var(--surface-muted);
|
|
border: 1px solid var(--border-base);
|
|
border-radius: 4px;
|
|
padding: 0.15em 0.35em;
|
|
}
|
|
|
|
.markdown-body pre code {
|
|
padding: 0;
|
|
border: none;
|
|
background: transparent;
|
|
}
|
|
|
|
.markdown-body pre:not(.shiki) {
|
|
font-family: var(--font-family-mono);
|
|
font-size: var(--font-size-sm);
|
|
line-height: var(--line-height-normal);
|
|
background-color: var(--surface-code);
|
|
color: var(--text-primary);
|
|
border: 1px solid var(--border-base);
|
|
border-radius: 8px;
|
|
padding: 0.75rem;
|
|
margin: 1rem 0;
|
|
direction: ltr;
|
|
}
|
|
|
|
.markdown-body pre:not(.shiki) code,
|
|
.markdown-code-block pre:not(.shiki) code {
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
border-inline-start: 3px solid var(--border-base);
|
|
color: var(--text-secondary);
|
|
background-color: var(--surface-muted);
|
|
padding: 0.5rem 1rem;
|
|
border-start-start-radius: 0;
|
|
border-start-end-radius: 8px;
|
|
border-end-end-radius: 8px;
|
|
border-end-start-radius: 0;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding-inline-start: 1.5rem;
|
|
margin: 0.5rem 0;
|
|
}
|
|
|
|
.markdown-body ul {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
.markdown-body ol {
|
|
list-style-type: decimal;
|
|
}
|
|
|
|
.markdown-body ul li,
|
|
.markdown-body ol li {
|
|
margin: 0.25rem 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
margin: 1rem 0;
|
|
background-color: transparent;
|
|
}
|
|
|
|
.markdown-body th,
|
|
.markdown-body td {
|
|
border: 1px solid var(--border-base);
|
|
padding: 0.5rem 0.75rem;
|
|
text-align: start;
|
|
color: var(--text-primary);
|
|
background-color: transparent;
|
|
}
|
|
|
|
.markdown-body th {
|
|
background-color: var(--surface-secondary);
|
|
}
|
|
|
|
.markdown-body tbody > tr:nth-child(odd) > td {
|
|
background-color: var(--markdown-table-row-odd);
|
|
}
|
|
|
|
.markdown-body tbody > tr:nth-child(even) > td {
|
|
background-color: var(--markdown-table-row-even);
|
|
}
|
|
|
|
.markdown-code-block {
|
|
position: relative;
|
|
margin: 10px 0;
|
|
border-radius: 6px;
|
|
background-color: var(--surface-muted);
|
|
border: 1px solid var(--border-base);
|
|
}
|
|
|
|
.code-block-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 4px 8px;
|
|
background-color: var(--surface-secondary);
|
|
border-bottom: 1px solid var(--border-base);
|
|
/* border-top-left-radius: 6px;
|
|
border-top-right-radius: 6px; */
|
|
}
|
|
|
|
.code-block-language {
|
|
font-family: var(--font-family-mono);
|
|
color: var(--text-secondary);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.code-block-copy {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 4px 8px;
|
|
background-color: transparent;
|
|
border: 1px solid var(--border-base);
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
color: var(--text-secondary);
|
|
transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
|
|
margin-inline-start: auto;
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.code-block-copy:hover {
|
|
background-color: var(--surface-hover);
|
|
border-color: var(--accent-primary);
|
|
color: var(--accent-primary);
|
|
}
|
|
|
|
.code-block-copy .copy-icon {
|
|
width: 14px;
|
|
height: 14px;
|
|
}
|
|
|
|
.code-block-copy .copy-text {
|
|
font-family: var(--font-family-mono);
|
|
}
|
|
|
|
.markdown-code-block pre {
|
|
margin: 0 !important;
|
|
padding: 12px !important;
|
|
overflow-x: auto;
|
|
background-color: transparent !important;
|
|
border-radius: 0;
|
|
}
|
|
|
|
.markdown-code-block code {
|
|
background: transparent !important;
|
|
padding: 0 !important;
|
|
}
|
|
}
|