Add i18n foundation and translations (#1027)

* feat: add i18n foundation

* feat: localize sessions sidebar

* Localize multirun/scheduled tasks and fix dialog dropdown interactions

* localize git sidebar surface and add zh-CN keys

* feat(ui): localize context panel, diff/plan views, and context sidebar content

* fix(config): resolve user config home via fs/home before embedded home

* localize header/chat UI and complete model/worktree panel strings

* localize worktree + github issue/pr dialog flows

* localize settings sections and split settings i18n dictionaries

* localize additional settings sections and sidebars

* localize more settings pages and dialogs

* fix settings select trigger localization

* localize tunnel settings ui surface

* localize additional settings sections

* localize keyboard shortcuts labels in settings

* localize terminal and utility dialogs surfaces

* feat(i18n): localize remaining UI strings

* Add Ukrainian locale

* Add Spanish locale

* Add Brazilian Portuguese locale

* Polish locale translations
This commit is contained in:
Bohdan Triapitsyn
2026-04-26 14:03:39 +03:00
committed by GitHub
parent 87db2ea210
commit 7d7285655d
198 changed files with 24173 additions and 4365 deletions
@@ -15,11 +15,12 @@ import {
import { ScrollableOverlay } from '@/components/ui/ScrollableOverlay';
import { HistoryCommitRow } from './HistoryCommitRow';
import type { GitLogEntry, CommitFileEntry } from '@/lib/api/types';
import { useI18n } from '@/lib/i18n';
const LOG_SIZE_OPTIONS = [
{ label: '25 commits', value: 25 },
{ label: '50 commits', value: 50 },
{ label: '100 commits', value: 100 },
{ labelKey: 'gitView.history.logSize25', value: 25 },
{ labelKey: 'gitView.history.logSize50', value: 50 },
{ labelKey: 'gitView.history.logSize100', value: 100 },
];
interface HistorySectionProps {
@@ -53,6 +54,7 @@ export const HistorySection: React.FC<HistorySectionProps> = ({
showHeader = true,
branchDivider = null,
}) => {
const { t } = useI18n();
const [isOpen, setIsOpen] = React.useState(true);
if (!log) {
@@ -98,7 +100,7 @@ export const HistorySection: React.FC<HistorySectionProps> = ({
{log.all.length === 0 ? (
<div className="flex h-full items-center justify-center p-4">
<p className="typography-ui-label text-muted-foreground">
No commits found
{t('gitView.history.noCommits')}
</p>
</div>
) : hasSplitHistory && branchDivider ? (
@@ -148,7 +150,7 @@ export const HistorySection: React.FC<HistorySectionProps> = ({
className="rounded-xl border border-border/60 bg-background/70 overflow-hidden"
>
<CollapsibleTrigger className="flex w-full items-center justify-between px-3 h-10 hover:bg-transparent">
<h3 className="typography-ui-header font-semibold text-foreground">History</h3>
<h3 className="typography-ui-header font-semibold text-foreground">{t('gitView.history.title')}</h3>
<div className="flex items-center gap-2">
{isOpen && (
<div
@@ -165,12 +167,12 @@ export const HistorySection: React.FC<HistorySectionProps> = ({
className="data-[size=sm]:h-auto h-7 min-h-7 w-auto justify-between px-2 py-0"
disabled={isLogLoading}
>
<SelectValue placeholder="Commits" />
<SelectValue placeholder={t('gitView.history.commitsPlaceholder')} />
</SelectTrigger>
<SelectContent>
{LOG_SIZE_OPTIONS.map((option) => (
<SelectItem key={option.value} value={String(option.value)}>
{option.label}
{t(option.labelKey as never)}
</SelectItem>
))}
</SelectContent>