Files
CodeNomad/packages/ui/src/styles/messaging/message-section.css
MusiCode1 1c68f5d288 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>
2026-03-24 21:09:52 +00:00

288 lines
6.3 KiB
CSS

.message-stream-container {
@apply relative flex-1 min-h-0 flex flex-col overflow-hidden;
}
.connection-status {
@apply grid items-center px-4 py-2 gap-4;
grid-template-columns: 1fr auto 1fr;
grid-template-areas: "info shortcut meta";
background-color: var(--surface-secondary);
border-bottom: 1px solid var(--border-base);
}
.connection-status-menu {
display: none;
grid-area: menu;
}
.connection-status--compact {
grid-template-columns: auto 1fr auto;
grid-template-areas:
"menu shortcut meta"
"info info info";
row-gap: 0.5rem;
}
.connection-status--compact .connection-status-menu {
display: flex;
align-items: center;
justify-content: flex-start;
}
.connection-status--compact .connection-status-info {
justify-self: stretch;
width: 100%;
justify-content: center;
text-align: center;
}
.connection-status--compact .connection-status-usage {
justify-content: center;
width: 100%;
}
.connection-status--compact .connection-status-shortcut {
justify-self: center;
}
.connection-status--compact .connection-status-meta {
justify-self: end;
}
.session-sidebar-menu-button {
@apply inline-flex items-center justify-center border rounded-md px-2 py-1 text-sm font-medium;
border-color: var(--border-base);
background-color: transparent;
color: var(--text-primary);
transition: color 0.2s ease, background-color 0.2s ease;
}
.session-sidebar-menu-button:hover {
background-color: var(--surface-hover);
}
.session-sidebar-menu-button:focus-visible {
@apply ring-2 ring-offset-1;
ring-color: var(--accent-primary);
ring-offset-color: var(--surface-secondary);
}
.session-sidebar-menu-icon {
font-size: var(--font-size-base);
line-height: 1;
}
.status-indicator {
@apply flex items-center gap-1.5 text-xs;
color: var(--text-muted);
}
.status-indicator .status-dot {
@apply w-2 h-2 rounded-full;
}
.status-indicator .status-text {
display: inline-block;
}
@media (max-width: 1024px) {
.status-indicator .status-text {
display: none;
}
}
.connection-status-info {
@apply flex flex-wrap items-center gap-3 text-sm font-medium;
grid-area: info;
justify-self: center;
justify-content: center;
text-align: center;
}
.connection-status-usage {
@apply flex flex-wrap items-center justify-center gap-2 text-xs;
color: var(--text-primary);
}
.connection-status-shortcut {
grid-area: shortcut;
justify-self: center;
text-align: center;
}
.connection-status-meta {
grid-area: meta;
justify-self: end;
}
.connection-status-text {
color: var(--text-muted);
}
.connection-status-shortcut-action {
@apply flex items-center justify-center gap-2;
}
.connection-status-button {
@apply inline-flex items-center gap-2 px-3 py-1 text-sm font-medium border rounded-md transition-colors;
border-color: var(--border-base);
background-color: var(--surface-base);
color: var(--text-primary);
}
/* Make the command palette trigger stand out in the header. */
.connection-status-button.command-palette-button {
border-radius: 0;
@apply text-sm px-2 py-1 border border-base transition-colors;
background-color: var(--surface-base);
color: var(--text-primary);
}
.connection-status-button.command-palette-button:hover {
background-color: var(--surface-hover);
color: var(--text-primary);
}
.connection-status-button:hover {
background-color: var(--surface-hover);
}
.connection-status-button:focus-visible {
@apply ring-2 ring-offset-1;
ring-color: var(--accent-primary);
ring-offset-color: var(--surface-secondary);
}
.connection-status-shortcut-hint {
@apply inline-flex items-center;
color: var(--text-secondary);
}
@media (pointer: coarse) {
.connection-status-shortcut-hint {
display: none;
}
.connection-status-button {
width: 100%;
justify-content: center;
}
}
@media (max-width: 640px) {
.connection-status {
grid-template-columns: auto 1fr auto;
grid-template-areas:
"menu shortcut meta"
"info info info";
row-gap: 0.5rem;
}
.connection-status-menu {
display: flex;
align-items: center;
justify-content: flex-start;
}
.connection-status-info {
justify-self: stretch;
width: 100%;
justify-content: center;
text-align: center;
}
.connection-status-usage {
justify-content: center;
width: 100%;
}
.connection-status-shortcut {
justify-self: center;
}
.connection-status-meta {
justify-self: end;
}
}
.message-scroll-button-wrapper {
position: absolute;
inset-inline-end: 1rem;
bottom: 1rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
align-items: flex-end;
}
.message-scroll-button {
@apply inline-flex items-center justify-center;
width: 2.75rem;
height: 2.75rem;
border-radius: 9999px;
border: 1px solid var(--border-base);
background-color: transparent;
color: var(--text-primary);
box-shadow: var(--scroll-elevation-shadow);
transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.message-scroll-button:hover {
background-color: var(--surface-hover);
transform: translateY(-1px);
}
.message-scroll-button:focus-visible {
outline: none;
box-shadow: 0 0 0 2px var(--surface-base), 0 0 0 4px var(--accent-primary);
}
.message-scroll-icon {
font-size: var(--font-size-lg);
color: var(--accent-primary);
}
.message-quote-popover {
position: absolute;
z-index: 5;
display: flex;
align-items: center;
justify-content: center;
pointer-events: none;
}
.message-quote-button-group {
pointer-events: auto;
display: inline-flex;
border-radius: 9999px;
border: 1px solid var(--list-item-highlight-border);
background-color: var(--list-item-highlight-bg-solid);
box-shadow: var(--panel-shadow);
overflow: hidden;
}
.message-quote-button {
pointer-events: auto;
@apply inline-flex items-center justify-center;
padding: 0.35rem 0.9rem;
font-size: 0.8rem;
font-weight: 500;
border: none;
background-color: transparent;
color: var(--text-primary);
transition: background-color 0.2s ease, color 0.2s ease;
}
.message-quote-button + .message-quote-button {
border-inline-start: 1px solid var(--list-item-highlight-border);
}
.message-quote-button:hover {
background-color: var(--surface-hover);
}
.message-quote-button:focus-visible {
outline: none;
box-shadow: inset 0 0 0 2px var(--accent-primary);
}