# 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>
552 lines
12 KiB
CSS
552 lines
12 KiB
CSS
/* Message item base styles */
|
|
.message-item-base {
|
|
@apply flex flex-col gap-2 p-3 w-full;
|
|
|
|
/* Markdown rendering uses these to theme emphasis + headings per message role. */
|
|
--markdown-accent: var(--message-user-border);
|
|
--markdown-heading-color: var(--message-user-border);
|
|
}
|
|
|
|
.message-item-header {
|
|
@apply flex flex-col;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
.message-item-header-row {
|
|
@apply w-full;
|
|
}
|
|
|
|
.message-item-header-row--top {
|
|
@apply flex justify-between items-start gap-2.5;
|
|
}
|
|
|
|
.message-item-header-row--meta {
|
|
@apply w-full;
|
|
}
|
|
|
|
.message-header-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
}
|
|
|
|
.message-item-header-row--bottom {
|
|
@apply flex items-start;
|
|
}
|
|
|
|
.message-speaker {
|
|
/* Allow agent meta to wrap to a second row with comfortable spacing. */
|
|
@apply flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs;
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
}
|
|
|
|
.message-speaker-primary {
|
|
@apply inline-flex items-center;
|
|
white-space: nowrap;
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
.message-agent-meta-inline {
|
|
@apply text-[11px] font-medium;
|
|
color: var(--message-assistant-border);
|
|
white-space: nowrap;
|
|
flex: 0 0 auto;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.message-agent-meta-inline--measure {
|
|
position: fixed;
|
|
left: -9999px;
|
|
top: -9999px;
|
|
visibility: hidden;
|
|
pointer-events: none;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.message-agent-meta-block {
|
|
@apply text-[11px] font-medium;
|
|
color: var(--message-assistant-border);
|
|
overflow-wrap: anywhere;
|
|
word-break: break-word;
|
|
line-height: 1.15;
|
|
}
|
|
|
|
.message-speaker-label {
|
|
font-weight: var(--font-weight-semibold);
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.message-speaker-label[data-role="user"] {
|
|
color: var(--message-user-border);
|
|
}
|
|
|
|
.message-speaker-label[data-role="assistant"] {
|
|
color: var(--message-assistant-border);
|
|
}
|
|
|
|
.message-agent-meta {
|
|
@apply text-xs text-[var(--message-assistant-border)];
|
|
}
|
|
|
|
.message-item-actions {
|
|
@apply flex items-center gap-2;
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
.message-action-group {
|
|
@apply flex items-center gap-0;
|
|
}
|
|
|
|
.message-action-button {
|
|
@apply bg-transparent border-0 text-[var(--text-muted)] cursor-pointer px-2 py-0.5 rounded text-xs font-semibold leading-none transition-all duration-200 flex items-center justify-center h-6;
|
|
}
|
|
|
|
.message-action-button:hover {
|
|
background-color: var(--surface-hover);
|
|
color: var(--accent-primary);
|
|
}
|
|
|
|
.message-action-button:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
.message-timestamp {
|
|
@apply text-[11px] text-[var(--text-muted)];
|
|
}
|
|
|
|
.assistant-message {
|
|
/* gap: 0.25rem; */
|
|
padding: 0.6rem 0.65rem;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
|
|
--markdown-accent: var(--message-assistant-border);
|
|
--markdown-heading-color: var(--text-primary);
|
|
}
|
|
|
|
.message-item-base:not(.assistant-message) {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.message-stream-block {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.message-step-start {
|
|
background-color: var(--message-assistant-bg);
|
|
border-inline-start: 4px solid var(--message-assistant-border);
|
|
margin-top: 0;
|
|
}
|
|
|
|
.message-step-finish {
|
|
background-color: var(--message-assistant-bg);
|
|
border-inline-start: 4px solid var(--message-assistant-border);
|
|
margin: 0;
|
|
}
|
|
|
|
.message-step-finish-flush {
|
|
margin-top: -0.125rem;
|
|
}
|
|
|
|
.message-step-usage {
|
|
@apply flex flex-wrap items-center gap-1 text-[10px] text-[var(--text-muted)];
|
|
}
|
|
|
|
.message-step-usage-chip {
|
|
@apply inline-flex items-center rounded-full border border-[var(--border-base)] px-2 py-0.5 text-[10px];
|
|
color: var(--text-primary);
|
|
font-weight: var(--font-weight-semibold);
|
|
}
|
|
|
|
.message-step-usage-chip::before {
|
|
content: attr(data-label);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
font-size: 9px;
|
|
color: var(--text-muted);
|
|
font-weight: var(--font-weight-medium);
|
|
margin-inline-end: 0.35rem;
|
|
}
|
|
|
|
.message-step-heading {
|
|
@apply flex flex-wrap items-center gap-2 text-xs;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
|
|
|
|
.message-queued-badge {
|
|
@apply inline-block font-bold px-3 py-1 rounded mb-3 text-xs tracking-wide;
|
|
background-color: var(--accent-primary);
|
|
color: var(--text-inverted);
|
|
}
|
|
|
|
.message-error-block {
|
|
@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);
|
|
}
|
|
|
|
.message-generating {
|
|
@apply text-sm italic py-2;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.message-sending {
|
|
@apply text-xs italic mt-1;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.message-attachments {
|
|
@apply flex flex-wrap gap-1.5 pt-2 mt-1;
|
|
border-top: 1px solid var(--border-base);
|
|
}
|
|
|
|
/* Image attachment preview popover.
|
|
Rendered via a Portal to avoid being clipped by the message stream scroller. */
|
|
.attachment-image-popover {
|
|
position: fixed;
|
|
padding: 8px;
|
|
background-color: var(--surface-base);
|
|
border: 1px solid var(--border-base);
|
|
border-radius: 10px;
|
|
box-shadow: var(--popover-shadow);
|
|
z-index: 1000;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.attachment-image-popover img {
|
|
display: block;
|
|
max-width: 320px;
|
|
max-height: 320px;
|
|
border-radius: 8px;
|
|
object-fit: contain;
|
|
}
|
|
|
|
.message-error {
|
|
@apply text-xs mt-1;
|
|
color: var(--status-error);
|
|
}
|
|
|
|
.generating-spinner {
|
|
@apply inline-block;
|
|
animation: pulse 1.5s ease-in-out infinite;
|
|
}
|
|
|
|
.message-text {
|
|
font-size: var(--font-size-base);
|
|
line-height: var(--line-height-normal);
|
|
word-wrap: break-word;
|
|
overflow-wrap: break-word;
|
|
color: inherit;
|
|
}
|
|
|
|
.message-text-assistant {
|
|
white-space: normal;
|
|
}
|
|
|
|
.message-text pre {
|
|
overflow-x: auto;
|
|
padding: 8px;
|
|
background-color: var(--surface-code);
|
|
border-radius: 4px;
|
|
direction: ltr;
|
|
}
|
|
|
|
.message-error-part {
|
|
color: var(--status-error);
|
|
font-size: var(--font-size-base);
|
|
padding: 8px;
|
|
background-color: var(--message-error-bg);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.message-reasoning {
|
|
@apply my-2 border rounded;
|
|
--reasoning-border-color: var(--border-strong, var(--border-base));
|
|
border-color: var(--reasoning-border-color);
|
|
background-color: var(--surface-secondary);
|
|
color: inherit;
|
|
}
|
|
|
|
.reasoning-container {
|
|
@apply p-2;
|
|
}
|
|
|
|
.reasoning-header {
|
|
@apply flex items-center gap-1.5 text-xs cursor-pointer select-none;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.reasoning-header:hover {
|
|
color: var(--accent-primary);
|
|
}
|
|
|
|
.reasoning-icon {
|
|
@apply text-xs;
|
|
transition: transform 150ms ease;
|
|
}
|
|
|
|
.reasoning-label {
|
|
font-weight: var(--font-weight-medium);
|
|
}
|
|
|
|
.message-step-card {
|
|
@apply flex flex-col gap-2 px-3 py-2;
|
|
color: inherit;
|
|
border-radius: 0;
|
|
}
|
|
|
|
.message-compaction-card {
|
|
@apply flex flex-col gap-1 px-3 py-2 text-xs;
|
|
background-color: var(--message-assistant-bg);
|
|
}
|
|
|
|
.message-compaction-card--auto {
|
|
background-color: var(--session-status-compacting-bg);
|
|
color: var(--session-status-compacting-fg);
|
|
}
|
|
|
|
.message-compaction-card--manual {
|
|
background-color: var(--message-user-bg);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.message-compaction-row {
|
|
@apply flex items-center gap-2;
|
|
justify-content: center;
|
|
}
|
|
|
|
.message-compaction-icon {
|
|
@apply inline-flex items-center;
|
|
color: inherit;
|
|
}
|
|
|
|
.message-compaction-label {
|
|
font-weight: var(--font-weight-medium);
|
|
}
|
|
|
|
.message-step-start {
|
|
background-color: var(--message-assistant-bg);
|
|
border-inline-start: 4px solid var(--message-assistant-border);
|
|
}
|
|
|
|
.message-step-finish {
|
|
background-color: var(--message-assistant-bg);
|
|
border-inline-start: 4px solid var(--message-assistant-border);
|
|
}
|
|
|
|
.message-step-heading {
|
|
@apply flex flex-wrap items-center gap-2 text-xs;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.message-step-title {
|
|
font-weight: var(--font-weight-semibold);
|
|
color: var(--text-primary);
|
|
@apply flex items-center justify-between w-full;
|
|
}
|
|
|
|
.message-step-title-left {
|
|
@apply flex items-center gap-2 text-[var(--text-muted)];
|
|
}
|
|
|
|
.message-step-title-left span:last-child {
|
|
@apply font-medium text-[11px];
|
|
}
|
|
|
|
.message-step-time {
|
|
@apply text-[11px] text-[var(--text-muted)] font-normal ms-auto;
|
|
}
|
|
|
|
.message-step-meta-inline {
|
|
@apply inline-flex flex-wrap items-center gap-2 text-[11px] font-medium;
|
|
color: var(--message-assistant-border);
|
|
}
|
|
|
|
/* Keep reasoning meta as a single unit so it drops to the next line when needed. */
|
|
.message-reasoning-label .message-step-meta-inline {
|
|
flex-wrap: nowrap;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
|
|
.message-step-reason {
|
|
@apply text-[11px] font-medium;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.message-step-finish-spacer {
|
|
@apply mt-4;
|
|
}
|
|
|
|
.message-reasoning-card {
|
|
--reasoning-border-color: var(--border-strong, var(--border-base));
|
|
background-color: var(--message-assistant-bg);
|
|
border-inline-start: 4px solid var(--message-assistant-border);
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0;
|
|
}
|
|
|
|
.message-reasoning-header {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 0.5rem;
|
|
transition: background-color 0.2s ease, box-shadow 0.2s ease;
|
|
}
|
|
|
|
.message-reasoning-header:hover {
|
|
background-color: var(--surface-hover);
|
|
}
|
|
|
|
.message-reasoning-toggle {
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
width: auto;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
gap: 0.65rem;
|
|
background: none;
|
|
border: none;
|
|
padding: 0.25rem 0.6rem;
|
|
font: inherit;
|
|
color: inherit;
|
|
text-align: start;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s ease, box-shadow 0.2s ease;
|
|
}
|
|
|
|
.message-reasoning-actions {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
padding: 0.25rem 0.6rem 0.25rem 0;
|
|
}
|
|
|
|
.message-reasoning-toggle:hover {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.message-reasoning-toggle:focus-visible {
|
|
outline: none;
|
|
box-shadow: 0 0 0 1px var(--border-base);
|
|
}
|
|
|
|
.message-reasoning-label {
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
font-size: 0.75rem;
|
|
font-weight: var(--font-weight-medium);
|
|
color: var(--message-assistant-border);
|
|
}
|
|
|
|
.message-reasoning-label-primary {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
white-space: nowrap;
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
.message-step-meta-inline--measure {
|
|
position: fixed;
|
|
left: -9999px;
|
|
top: -9999px;
|
|
visibility: hidden;
|
|
pointer-events: none;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.message-reasoning-meta-row {
|
|
padding: 0 0.6rem 0.15rem 0.6rem;
|
|
}
|
|
|
|
.message-reasoning-meta {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.message-reasoning-indicator {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 1.5rem;
|
|
padding: 0 0.75rem;
|
|
border: 1px solid var(--reasoning-border-color, var(--border-base));
|
|
border-radius: 0.375rem;
|
|
background-color: transparent;
|
|
color: var(--text-muted);
|
|
font-weight: var(--font-weight-semibold);
|
|
font-size: 0.75rem;
|
|
line-height: 1;
|
|
letter-spacing: 0.01em;
|
|
transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
|
|
}
|
|
|
|
.message-reasoning-toggle:hover .message-reasoning-indicator {
|
|
background-color: var(--surface-hover);
|
|
border-color: var(--accent-primary);
|
|
color: var(--accent-primary);
|
|
}
|
|
|
|
.message-reasoning-indicator:active {
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
.message-reasoning-time {
|
|
font-size: 11px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.message-reasoning-expanded {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.35rem;
|
|
}
|
|
|
|
.message-reasoning-body {
|
|
padding: 0;
|
|
background-color: var(--surface-code);
|
|
margin: 0.75rem;
|
|
}
|
|
|
|
.message-reasoning-output {
|
|
@apply flex flex-col;
|
|
margin: 0;
|
|
padding: 0.75rem;
|
|
border: 1px solid var(--reasoning-border-color, var(--border-base));
|
|
max-height: 30rem;
|
|
overflow-y: auto;
|
|
scrollbar-width: thin;
|
|
scrollbar-color: var(--border-base) transparent;
|
|
scrollbar-gutter: stable both-edges;
|
|
background-color: var(--surface-code);
|
|
}
|
|
|
|
.message-reasoning-text {
|
|
font-family: var(--font-family-mono);
|
|
font-size: var(--font-size-xs);
|
|
line-height: var(--line-height-tight);
|
|
color: var(--text-primary);
|
|
white-space: pre-wrap;
|
|
margin: 0;
|
|
unicode-bidi: plaintext;
|
|
}
|