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
@@ -9,6 +9,7 @@ import {
DialogTitle,
} from '@/components/ui/dialog';
import { Input } from '@/components/ui/input';
import { useI18n } from '@/lib/i18n';
type SaveProjectPlanDialogProps = {
open: boolean;
@@ -20,6 +21,7 @@ type SaveProjectPlanDialogProps = {
};
export function SaveProjectPlanDialog(props: SaveProjectPlanDialogProps) {
const { t } = useI18n();
const { open, onOpenChange, initialTitle, sourceText, saving = false, onSave } = props;
const [title, setTitle] = React.useState(initialTitle);
@@ -35,24 +37,24 @@ export function SaveProjectPlanDialog(props: SaveProjectPlanDialogProps) {
<Dialog open={open} onOpenChange={(nextOpen) => { if (!saving) onOpenChange(nextOpen); }}>
<DialogContent className="max-w-lg">
<DialogHeader>
<DialogTitle>Save as plan</DialogTitle>
<DialogDescription>Choose a title for the saved markdown plan file.</DialogDescription>
<DialogTitle>{t('saveProjectPlanDialog.title')}</DialogTitle>
<DialogDescription>{t('saveProjectPlanDialog.description')}</DialogDescription>
</DialogHeader>
<div className="space-y-3">
<div className="space-y-1.5">
<label className="typography-ui-label font-medium text-foreground">Title</label>
<label className="typography-ui-label font-medium text-foreground">{t('saveProjectPlanDialog.field.title')}</label>
<Input
value={title}
onChange={(event) => setTitle(event.target.value)}
placeholder="Plan title"
placeholder={t('saveProjectPlanDialog.field.titlePlaceholder')}
autoFocus
disabled={saving}
/>
</div>
<div className="space-y-1.5">
<label className="typography-ui-label font-medium text-foreground">Content preview</label>
<label className="typography-ui-label font-medium text-foreground">{t('saveProjectPlanDialog.field.contentPreview')}</label>
<div className="max-h-40 overflow-auto rounded-lg border border-border/70 bg-[var(--surface-subtle)] px-3 py-2 typography-meta text-foreground">
{sourceText}
</div>
@@ -60,9 +62,9 @@ export function SaveProjectPlanDialog(props: SaveProjectPlanDialogProps) {
</div>
<DialogFooter>
<Button variant="outline" onClick={() => onOpenChange(false)} disabled={saving}>Cancel</Button>
<Button variant="outline" onClick={() => onOpenChange(false)} disabled={saving}>{t('saveProjectPlanDialog.actions.cancel')}</Button>
<Button onClick={() => void onSave(trimmedTitle)} disabled={!trimmedTitle || saving}>
{saving ? 'Saving...' : 'Save'}
{saving ? t('saveProjectPlanDialog.actions.saving') : t('saveProjectPlanDialog.actions.save')}
</Button>
</DialogFooter>
</DialogContent>