Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

feat(editor): per-clip crop export, HUD/RecStage redesign, real waveforms and theme readability

Etienne Lescot1f25410bf3dc
diff --git a/electron/electron-env.d.ts b/electron/electron-env.d.ts
index 912f3c8ce..4d0366ecb 100644
--- a/electron/electron-env.d.ts
+++ b/electron/electron-env.d.ts
@@ -56,6 +56,7 @@ interface Window {
callback: (prefs: import("./ipc/handlers").RecordingPrefs) => void,
) => () => void;
onSourceSelectorClosed: (callback: () => void) => () => void;
+ onAutoStartRecording: (callback: () => void) => () => void;
onAiEditionChatEvent: (
callback: (event: import("../src/native/contracts").AiEditionChatEvent) => void,
) => () => void;
@@ -207,7 +208,14 @@ interface Window {
message?: string;
error?: string;
}>;
- openVideoFilePicker: () => Promise<{ success: boolean; path?: string; canceled?: boolean }>;
+ openVideoFilePicker: () => Promise<{
+ success: boolean;
+ path?: string;
+ // Browser-mode shim only: a blob: URL has no meaningful basename, so
+ // the shim carries the picked File's real name here for the label.
+ name?: string;
+ canceled?: boolean;
+ }>;
setCurrentVideoPath: (path: string) => Promise<{ success: boolean }>;
setCurrentRecordingSession: (
session: import("../src/lib/recordingSession").RecordingSession | null,
diff --git a/electron/ipc/handlers.ts b/electron/ipc/handlers.ts
index 9a7bea713..c4873896b 100644
--- a/electron/ipc/handlers.ts
+++ b/electron/ipc/handlers.ts
@@ -1709,6 +1709,15 @@ export function registerIpcHandlers(
ipcMain.handle("start-new-recording", () => {
_switchToHud?.();
+ const hudWindow = getMainWindow();
+ if (hudWindow && !hudWindow.isDestroyed()) {
+ const sendAutoStart = () => hudWindow.webContents.send("hud-auto-start-recording");
+ if (hudWindow.webContents.isLoading()) {
+ hudWindow.webContents.once("did-finish-load", sendAutoStart);
+ } else {
+ sendAutoStart();
+ }
+ }
return { success: true };
});
diff --git a/electron/preload.ts b/electron/preload.ts
index 553e83619..87f051ab1 100644
--- a/electron/preload.ts
+++ b/electron/preload.ts
@@ -84,6 +84,11 @@ contextBridge.exposeInMainWorld("electronAPI", {
ipcRenderer.on("source-selector-closed", listener);
return () => ipcRenderer.removeListener("source-selector-closed", listener);
},
+ onAutoStartRecording: (callback: () => void) => {
+ const listener = () => callback();
+ ipcRenderer.on("hud-auto-start-recording", listener);
+ return () => ipcRenderer.removeListener("hud-auto-start-recording", listener);
+ },
requestCameraAccess: () => {
return ipcRenderer.invoke("request-camera-access");
},
diff --git a/electron/windows.ts b/electron/windows.ts
index 60dbc9df4..a421f4add 100644
--- a/electron/windows.ts
+++ b/electron/windows.ts
@@ -18,6 +18,51 @@ const ASSET_BASE_URL_ARG = `--asset-base-url=${pathToFileURL(`${ASSET_BASE_DIR}$
let hudOverlayWindow: BrowserWindow | null = null;
+interface HudBounds {
+ x: number;
+ y: number;
+ width: number;
+ height: number;
+}
+
+// Smoothly tweens the HUD's bounds instead of snapping, so every content-driven
+// resize (recording state changing which controls are shown, a device popover
+// opening, etc.) reads as a fluid grow/shrink rather than a jarring jump.
+let hudResizeAnimationTimer: NodeJS.Timeout | null = null;
+const HUD_RESIZE_DURATION_MS = 160;
+const HUD_RESIZE_FRAME_MS = 1000 / 60;
+const easeOutCubic = (t: number) => 1 - (1 - t) ** 3;
+
+function animateHudBounds(win: BrowserWindow, from: HudBounds, to: HudBounds) {
+ if (hudResizeAnimationTimer) {
+ clearInterval(hudResizeAnimationTimer);
+ hudResizeAnimationTimer = null;
+ }
+
+ const start = Date.now();
+ hudResizeAnimationTimer = setInterval(() => {
+ if (win.isDestroyed()) {
+ if (hudResizeAnimationTimer) clearInterval(hudResizeAnimationTimer);
+ hudResizeAnimationTimer = null;
+ return;
+ }
+
+ const t = Math.min(1, (Date.now() - start) / HUD_RESIZE_DURATION_MS);
+ const e = easeOutCubic(t);
+ win.setBounds({
+ x: Math.round(from.x + (to.x - from.x) * e),
+ y: Math.round(from.y + (to.y - from.y) * e),
+ width: Math.round(from.width + (to.width - from.width) * e),
+ height: Math.round(from.height + (to.height - from.height) * e),
+ });
+
+ if (t >= 1) {
+ if (hudResizeAnimationTimer) clearInterval(hudResizeAnimationTimer);
+ hudResizeAnimationTimer = null;
+ }
+ }, HUD_RESIZE_FRAME_MS);
+}
+
ipcMain.on("hud-overlay-hide", () => {
if (hudOverlayWindow && !hudOverlayWindow.isDestroyed()) {
hudOverlayWindow.minimize();
@@ -72,9 +117,25 @@ ipcMain.on("hud-overlay-set-size", (_event, width: number, height: number) => {
const centerX = bounds.x + bounds.width / 2;
const bottomY = bounds.y + bounds.height;
- hudOverlayWindow.setBounds({
- x: Math.round(centerX - nextWidth / 2),
- y: Math.round(bottomY - nextHeight),
+ // Growing height keeps the bottom edge anchored (so the vertical tray grows
+ // upward from where the user left it), but that alone can push the top edge
+ // above the screen — e.g. switching to the tall vertical layout while sitting
+ // low/mid-screen. The drag handle lives at the tray's start (top, in vertical
+ // mode), so an off-screen top edge makes the HUD both invisible and
+ // undraggable back into view. Clamp both axes to the display's work area so
+ // the window (and its drag handle) always stays fully reachable.
+ const nextX = Math.min(
+ Math.max(workArea.x, Math.round(centerX - nextWidth / 2)),
+ workArea.x + workArea.width - nextWidth,
+ );
+ const nextY = Math.min(
+ Math.max(workArea.y, Math.round(bottomY - nextHeight)),
+ workArea.y + workArea.height - nextHeight,
+ );
+
+ animateHudBounds(hudOverlayWindow, bounds, {
+ x: nextX,
+ y: nextY,
width: nextWidth,
height: nextHeight,
});
@@ -239,12 +300,12 @@ export function createSourceSelectorWindow(): BrowserWindow {
const { width, height } = screen.getPrimaryDisplay().workAreaSize;
const win = new BrowserWindow({
- width: 620,
- height: 420,
- minHeight: 350,
- maxHeight: 500,
- x: Math.round((width - 620) / 2),
- y: Math.round((height - 420) / 2),
+ width: 680,
+ height: 580,
+ minHeight: 420,
+ maxHeight: 680,
+ x: Math.round((width - 680) / 2),
+ y: Math.round((height - 580) / 2),
frame: false,
resizable: false,
alwaysOnTop: true,
diff --git a/index.html b/index.html
index 510c15ddd..a7ee0237c 100644
--- a/index.html
+++ b/index.html
@@ -1,5 +1,5 @@
<!doctype html>
-<html lang="en" class="dark">
+<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
diff --git a/src/components/ai-edition/EditorEmptyState.test.tsx b/src/components/ai-edition/EditorEmptyState.test.tsx
index 2a32b72a0..0fc7b7ff3 100644
--- a/src/components/ai-edition/EditorEmptyState.test.tsx
+++ b/src/components/ai-edition/EditorEmptyState.test.tsx
@@ -1,9 +1,15 @@
import "@testing-library/jest-dom";
import { act, cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
+import type { ReactElement } from "react";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import { I18nProvider } from "@/contexts/I18nContext";
import { useProjectStore } from "@/lib/ai-edition/store/projectStore";
import { EditorEmptyState } from "./EditorEmptyState";
+function renderWithI18n(ui: ReactElement) {
+ return render(<I18nProvider>{ui}</I18nProvider>);
+}
+
const bridgeMocks = vi.hoisted(() => ({
create: vi.fn(),
save: vi.fn(),
@@ -100,7 +106,7 @@ describe("EditorEmptyState (new editor)", () => {
lastSavedAt: new Date(),
});
- render(<EditorEmptyState hasProject={true} />);
+ renderWithI18n(<EditorEmptyState hasProject={true} />);
expect(screen.getByText(/add a video to get started/i)).toBeInTheDocument();
// ponytail: no "Open project" button when a project is already loaded —
@@ -109,7 +115,7 @@ describe("EditorEmptyState (new editor)", () => {
});
it("shows both import + open-project buttons when no project is loaded", () => {
- render(<EditorEmptyState hasProject={false} />);
+ renderWithI18n(<EditorEmptyState hasProject={false} />);
expect(screen.getByText(/no project open/i)).toBeInTheDocument();
expect(
@@ -150,7 +156,7 @@ describe("EditorEmptyState (new editor)", () => {
},
});
- render(<EditorEmptyState hasProject={true} />);
+ renderWithI18n(<EditorEmptyState hasProject={true} />);
await act(async () => {
fireEvent.click(screen.getByRole("button", { name: /import video/i }));
@@ -178,7 +184,7 @@ describe("EditorEmptyState (new editor)", () => {
document: sampleDoc,
});
- render(<EditorEmptyState hasProject={false} />);
+ renderWithI18n(<EditorEmptyState hasProject={false} />);
await act(async () => {
fireEvent.click(screen.getByRole("button", { name: /new project \+ import video/i }));
@@ -201,7 +207,7 @@ describe("EditorEmptyState (new editor)", () => {
});
bridgeMocks.save.mockResolvedValue({ success: true, document: sampleDoc });
- render(<EditorEmptyState hasProject={false} />);
+ renderWithI18n(<EditorEmptyState hasProject={false} />);
await act(async () => {
fireEvent.click(screen.getByRole("button", { name: /open project/i }));
@@ -214,7 +220,7 @@ describe("EditorEmptyState (new editor)", () => {
});
it("shows the unsupported-format dialog when a non-.openscreen file is dropped", async () => {
- render(<EditorEmptyState hasProject={false} />);
+ renderWithI18n(<EditorEmptyState hasProject={false} />);
const file = new File([new Uint8Array([0, 1, 2])], "recording.mp4", { type: "video/mp4" });
const dropZone = screen.getByText(/no project open/i).parentElement?.parentElement
diff --git a/src/components/ai-edition/EditorEmptyState.tsx b/src/components/ai-edition/EditorEmptyState.tsx
index f9c34e622..306e62d49 100644
--- a/src/components/ai-edition/EditorEmptyState.tsx
+++ b/src/components/ai-edition/EditorEmptyState.tsx
@@ -16,6 +16,7 @@
import { AlertCircle, Film, FolderOpen, Upload, X } from "lucide-react";
import { useCallback, useRef, useState } from "react";
import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog";
+import { useScopedT } from "@/contexts/I18nContext";
import { migrateProjectDataToAxcutDocument } from "@/lib/ai-edition/document/migrate";
import { useProjectStore } from "@/lib/ai-edition/store/projectStore";
import { nativeBridgeClient } from "@/native";
@@ -34,6 +35,8 @@ export function EditorEmptyState({
hasProject,
showLoadProjectButton = true,
}: EditorEmptyStateProps) {
+ const t = useScopedT("editor");
+ const tc = useScopedT("common");
const [isDraggingOver, setIsDraggingOver] = useState(false);
const [dropError, setDropError] = useState<DropError>(null);
const lastDropErrorRef = useRef<Exclude<DropError, null>>("unsupported-format");
@@ -58,7 +61,7 @@ export function EditorEmptyState({
try {
const projectId = await ensureProject();
if (!projectId) return;
- const label = result.path.split(/[\\/]/).pop() || "Recording";
+ const label = result.name || result.path.split(/[\\/]/).pop() || "Recording";
await addAsset(result.path, label);
} catch (err) {
setDropError("load-failed");
@@ -151,7 +154,7 @@ export function EditorEmptyState({
{isDraggingOver ? (
<div className={styles.previewEmptyDropOverlay}>
<Upload className={styles.previewEmptyDropIcon} />
- <p className={styles.previewEmptyDropLabel}>Drop a .openscreen project file</p>
+ <p className={styles.previewEmptyDropLabel}>{t("emptyState.dropOverlay")}</p>
</div>
) : null}
@@ -167,8 +170,8 @@ export function EditorEmptyState({
/>
<DialogTitle className={styles.previewEmptyDialogTitle}>
{lastDropErrorRef.current === "unsupported-format"
- ? "Unsupported format"
- : "Could not open project"}
+ ? t("emptyState.dropErrors.unsupportedFormatTitle")
+ : t("emptyState.dropErrors.couldNotOpenTitle")}
</DialogTitle>
</div>
</DialogHeader>
@@ -178,8 +181,8 @@ export function EditorEmptyState({
</div>
<p className={styles.previewEmptyDialogMessage}>
{lastDropErrorRef.current === "unsupported-format"
- ? "Only .openscreen project files are supported. Drop a recording to import it, or use the buttons above."
- : "We couldn't read that project file. Try re-opening it from the file picker."}
+ ? t("emptyState.dropErrors.unsupportedFormatMessage")
+ : t("emptyState.dropErrors.couldNotOpenMessage")}
</p>
</div>
<button
@@ -188,7 +191,7 @@ export function EditorEmptyState({
className={styles.previewEmptyDialogClose}
>
<X className={styles.previewEmptyDialogCloseIcon} />
- Close
+ {tc("actions.close")}
</button>
</DialogContent>
</Dialog>
@@ -197,12 +200,10 @@ export function EditorEmptyState({
<img src="./openscreen.png" alt="" aria-hidden="true" className={styles.previewEmptyLogo} />
<div className={styles.previewEmptyHeading}>
<h2 className={styles.previewEmptyTitle}>
- {hasProject ? "Add a video to get started" : "No project open"}
+ {hasProject ? t("emptyState.titleHasAsset") : t("emptyState.title")}
</h2>
<p className={styles.previewEmptyDescription}>
- {hasProject
- ? "Import a recording to begin editing."
- : "Create a new project or open an existing one."}
+ {hasProject ? t("emptyState.descriptionHasAsset") : t("emptyState.description")}
</p>
</div>
<div className={styles.previewEmptyActions}>
@@ -212,7 +213,7 @@ export function EditorEmptyState({
className={styles.previewEmptyPrimaryButton}
>
<Film className={styles.previewEmptyButtonIcon} />
- {hasProject ? "Import video" : "New project + import video"}
+ {hasProject ? t("emptyState.importVideoButton") : t("emptyState.newProjectButton")}
</button>
{showLoadProjectButton && !hasProject ? (
<button
@@ -221,16 +222,14 @@ export function EditorEmptyState({
className={styles.previewEmptySecondaryButton}
>
<FolderOpen className={styles.previewEmptyButtonIcon} />
- Open project
+ {t("emptyState.loadProjectButton")}
</button>
) : null}
</div>
- <p className={styles.previewEmptyHint}>
- Supported formats: MP4, MOV, WebM, MKV, AVI, M4V, WMV.
- </p>
+ <p className={styles.previewEmptyHint}>{t("emptyState.supportedFormats")}</p>
<p className={styles.previewEmptyDragHint}>
<Upload className={styles.previewEmptyDragHintIcon} />
- Or drop a .openscreen project file here.
+ {t("emptyState.dragDropHint")}
</p>
</div>
</div>
diff --git a/src/components/ai-edition/ExportDialog.tsx b/src/components/ai-edition/ExportDialog.tsx
index 99f1e03dd..c46645a4e 100644
--- a/src/components/ai-edition/ExportDialog.tsx
+++ b/src/components/ai-edition/ExportDialog.tsx
@@ -11,6 +11,7 @@
import { Download, FileVideo, Loader2 } from "lucide-react";
import { useEffect, useRef, useState } from "react";
import { toast } from "sonner";
+import { useScopedT } from "@/contexts/I18nContext";
import {
type DocumentExportOptions,
type ExportVideoCodec,
@@ -34,12 +35,16 @@ type Phase = "idle" | "configuring" | "rendering" | "writing" | "done" | "error"
const QUALITY_OPTIONS: Array<{
value: ExportQuality;
- label: string;
- hint: string;
+ labelKey: string;
+ hintKey: string;
}> = [
- { value: "medium", label: "720p", hint: "Smaller file" },
- { value: "good", label: "1080p", hint: "Recommended" },
- { value: "source", label: "Source", hint: "Match recording" },
+ { value: "medium", labelKey: "exportQuality.low", hintKey: "exportDialog.qualitySmallerFile" },
+ { value: "good", labelKey: "exportQuality.medium", hintKey: "exportDialog.qualityRecommended" },
+ {
+ value: "source",
+ labelKey: "exportQuality.high",
+ hintKey: "exportDialog.qualityMatchRecording",
+ },
];
interface ExportDialogProps {
@@ -49,6 +54,8 @@ interface ExportDialogProps {
}
export function ExportDialog({ open, onClose, document }: ExportDialogProps) {
+ const t = useScopedT("editor");
+ const ts = useScopedT("settings");
const [format, setFormat] = useState<ExportFormat>("mp4");
const [quality, setQuality] = useState<ExportQuality>("good");
const [fps, setFps] = useState<24 | 30 | 60>(60);
@@ -82,7 +89,7 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {
const asset =
document.assets.find((a) => a.id === document.project.primaryAssetId) ?? document.assets[0];
if (!asset) {
- setError("Add a video before exporting.");
+ setError(t("exportDialog.addVideoBeforeExporting"));
setPhase("error");
return;
}
@@ -129,32 +136,35 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {
try {
const result = await exportAxcutDocument(document, options);
if (!result.success || !result.blob) {
- throw new Error(result.error ?? "Export failed");
+ throw new Error(result.error ?? t("exportDialog.exportFailed"));
}
setPhase("writing");
const arrayBuffer = await result.blob.arrayBuffer();
const writeResult = await window.electronAPI?.writeExportToPath?.(arrayBuffer, pickedPath);
if (!writeResult?.success) {
- throw new Error(writeResult?.error ?? "Failed to write file");
+ throw new Error(writeResult?.error ?? t("exportDialog.failedToWriteFile"));
}
setSavedPath(pickedPath);
setPhase("done");
- toast.success(`${format === "gif" ? "GIF" : "Video"} exported`, {
- description: pickedPath,
- action: {
- label: "Show in folder",
- onClick: () => {
- void window.electronAPI?.revealInFolder?.(pickedPath);
+ toast.success(
+ format === "gif" ? t("exportDialog.exportedGif") : t("exportDialog.exportedVideo"),
+ {
+ description: pickedPath,
+ action: {
+ label: t("exportDialog.showInFolder"),
+ onClick: () => {
+ void window.electronAPI?.revealInFolder?.(pickedPath);
+ },
},
},
- });
+ );
// Touch the bridge so it stays referenced even when export
// is invoked from a non-Electron shim.
void nativeBridgeClient.aiEdition.llmGetSnapshot;
} catch (err) {
setError(err instanceof Error ? err.message : String(err));
setPhase("error");
- toast.error("Export failed", {
+ toast.error(t("exportDialog.exportFailed"), {
description: err instanceof Error ? err.message : String(err),
});
}
@@ -168,8 +178,8 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {
<ModalShell
open={open}
onClose={handleClose}
- title="Export"
- subtitle="Render the timeline to a file"
+ title={t("exportDialog.title")}
+ subtitle={t("exportDialog.subtitle")}
>
<div style={{ display: "flex", flexDirection: "column", gap: 18 }}>
<div
@@ -181,14 +191,14 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {
>
<FormatToggle
active={format === "mp4"}
- label="MP4"
+ label={ts("exportFormat.mp4")}
icon={<FileVideo size={18} />}
onClick={() => setFormat("mp4")}
disabled={isBusy}
/>
<FormatToggle
active={format === "gif"}
- label="GIF"
+ label={ts("exportFormat.gif")}
icon={<Download size={18} />}
onClick={() => setFormat("gif")}
disabled={isBusy}
@@ -206,7 +216,7 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {
marginBottom: 8,
}}
>
- Quality
+ {t("exportDialog.quality")}
</div>
<div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 8 }}>
{QUALITY_OPTIONS.map((q) => (
@@ -228,9 +238,9 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {
font: "500 13px/1 var(--font-body)",
}}
>
- <span style={{ color: "var(--fg)", fontWeight: 600 }}>{q.label}</span>
+ <span style={{ color: "var(--fg)", fontWeight: 600 }}>{ts(q.labelKey)}</span>
<span style={{ font: "500 11px var(--font-body)", color: "var(--muted)" }}>
- {q.hint}
+ {t(q.hintKey)}
</span>
</button>
))}
@@ -253,7 +263,7 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {
marginBottom: 8,
}}
>
- Frame rate
+ {t("exportDialog.frameRate")}
</div>
<div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 6 }}>
{([24, 30, 60] as const).map((r) => (
@@ -279,7 +289,7 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {
marginBottom: 8,
}}
>
- Codec
+ {t("exportDialog.codec")}
</div>
<div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 6 }}>
{(
@@ -297,8 +307,8 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {
style={segStyle(codec === value)}
title={
value === "h264"
- ? "Best compatibility"
- : "May not be supported by every system encoder"
+ ? t("exportDialog.codecBestCompatibility")
+ : t("exportDialog.codecMaySupportVary")
}
>
{label}
@@ -320,7 +330,7 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {
marginBottom: 8,
}}
>
- Frame rate
+ {t("exportDialog.frameRate")}
</div>
<div style={{ display: "grid", gridTemplateColumns: "repeat(4, 1fr)", gap: 6 }}>
{GIF_FRAME_RATES.map((r) => (
@@ -346,7 +356,7 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {
marginBottom: 8,
}}
>
- Size
+ {t("exportDialog.size")}
</div>
<div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 6 }}>
{(Object.keys(GIF_SIZE_PRESETS) as GifSizePreset[]).map((s) => (
@@ -363,7 +373,7 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {
</div>
</div>
<div className={styles.paneRow} style={{ margin: 0 }}>
- <span className="label">Loop GIF</span>
+ <span className="label">{t("exportDialog.loopGif")}</span>
<button
type="button"
className={`${styles.toggle} ${gifLoop ? styles.isOn : ""}`}
@@ -379,7 +389,8 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {
letterSpacing: "0.04em",
}}
>
- {gifFrameRate} FPS · {gifSizeLabel} · {gifLoop ? "Loop on" : "Loop off"}
+ {gifFrameRate} FPS · {gifSizeLabel} ·{" "}
+ {gifLoop ? t("exportDialog.loopOn") : t("exportDialog.loopOff")}
</div>
</section>
)}
@@ -407,7 +418,7 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {
onClick={handleClose}
disabled={isBusy}
>
- {phase === "done" ? "Close" : "Cancel"}
+ {phase === "done" ? t("exportDialog.close") : t("exportDialog.cancel")}
</button>
<button
type="button"
@@ -419,15 +430,15 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {
<>
<Loader2 size={14} className="animate-spin" />
{phase === "rendering"
- ? "Rendering…"
+ ? t("exportDialog.rendering")
: phase === "writing"
- ? "Saving…"
- : "Starting…"}
+ ? t("exportDialog.saving")
+ : t("exportDialog.starting")}
</>
) : (
<>
<Download size={14} />
- Export {format === "gif" ? "GIF" : "MP4"}
+ {format === "gif" ? t("exportDialog.exportGif") : t("exportDialog.exportMp4")}
</>
)}
</button>
@@ -488,6 +499,7 @@ function ProgressBlock({
pct: number;
savedPath: string | null;
}) {
+ const t = useScopedT("editor");
if (phase === "idle" || phase === "configuring") {
return (
<div
@@ -501,7 +513,7 @@ function ProgressBlock({
textAlign: "center",
}}
>
- Pick a format and press Export to start.
+ {t("exportDialog.pickFormatAndExport")}
</div>
);
}
@@ -517,7 +529,8 @@ function ProgressBlock({
font: "500 12px var(--font-body)",
}}
>
- Saved to <span style={{ fontFamily: "var(--font-mono)" }}>{savedPath}</span>
+ {t("exportDialog.savedTo")}{" "}
+ <span style={{ fontFamily: "var(--font-mono)" }}>{savedPath}</span>
</div>
);
}
@@ -533,7 +546,7 @@ function ProgressBlock({
font: "500 12px var(--font-body)",
}}
>
- {error ?? "Export failed."}
+ {error ?? t("exportDialog.exportFailedGeneric")}
</div>
);
}
@@ -560,7 +573,7 @@ function ProgressBlock({
}}
>
<span style={{ font: "500 12px var(--font-body)", color: "var(--fg-2)" }}>
- {phase === "writing" ? "Writing file…" : "Rendering frames"}
+ {phase === "writing" ? t("exportDialog.writingFile") : t("exportDialog.renderingFrames")}
</span>
<span
style={{
@@ -598,8 +611,8 @@ function ProgressBlock({
}}
>
{total > 0
- ? `${current} / ${total} frames · ETA ${Math.max(0, Math.round(eta))}s`
- : "Preparing encoder…"}
+ ? t("exportDialog.framesEta", { current, total, eta: Math.max(0, Math.round(eta)) })
+ : t("exportDialog.preparingEncoder")}
</div>
</div>
);
diff --git a/src/components/ai-edition/LeftPanel.tsx b/src/components/ai-edition/LeftPanel.tsx
index 535c55347..e35c39ed6 100644
--- a/src/components/ai-edition/LeftPanel.tsx
+++ b/src/components/ai-edition/LeftPanel.tsx
@@ -3,6 +3,7 @@ import { useCallback, useEffect, useRef, useState } from "react";
import { createPortal } from "react-dom";
import { toast } from "sonner";
import { AI_FEATURES_ENABLED } from "@/components/video-editor/featureFlags";
+import { useScopedT } from "@/contexts/I18nContext";
import { type AxcutAsset, ensureDocument } from "@/lib/ai-edition/schema";
import { useProjectStore } from "@/lib/ai-edition/store/projectStore";
import { useChatPromptBus } from "@/lib/ai-edition/store/useChatPromptBus";
@@ -59,6 +60,7 @@ function MediaList({
transcriptReadyIds?: Set<string>;
assetStatuses?: Record<string, "pending" | "running" | "failed">;
}) {
+ const t = useScopedT("editor");
if (assets.length === 0) {
return (
<p
@@ -70,7 +72,7 @@ function MediaList({
lineHeight: 1.5,
}}
>
- No media in this project yet. Import a video below.
+ {t("leftPanel.emptyHint")}
</p>
);
}
@@ -145,14 +147,14 @@ function MediaList({
}}
aria-label={
status === "complete"
- ? "Transcript ready"
+ ? t("mediaStage.transcriptReady")
: status === "running"
- ? "Transcribing"
+ ? t("mediaStage.transcribing")
: status === "pending"
- ? "Pending transcription"
+ ? t("mediaStage.pendingTranscription")
: status === "failed"
- ? "Transcription failed"
- : "No transcript"
+ ? t("mediaStage.transcriptionFailed")
+ : t("mediaStage.noTranscript")
}
/>
<span className={styles.timecode}>{tc}</span>
@@ -174,6 +176,7 @@ export function MediaPane({
assetStatuses?: Record<string, "pending" | "running" | "failed">;
onRegenerateAsset?: (assetId: string, language: string) => Promise<void>;
}) {
+ const t = useScopedT("editor");
const projectId = useProjectStore((s) => s.projectId);
const document = useProjectStore((s) => s.document);
const addAsset = useProjectStore((s) => s.addAsset);
@@ -183,17 +186,18 @@ export function MediaPane({
const handleImport = async () => {
if (!projectId) {
- toast.error("Open a project first");
+ toast.error(t("mediaStage.openProjectFirst"));
return;
}
const picker = await window.electronAPI?.openVideoFilePicker();
if (!picker?.success || !picker.path) return;
setBusy(true);
try {
- await addAsset(picker.path);
- toast.success(`Added ${basename(picker.path)}`);
+ const label = picker.name || basename(picker.path);
+ await addAsset(picker.path, label);
+ toast.success(t("mediaStage.added", { label }));
} catch (err) {
- toast.error("Could not add asset", {
+ toast.error(t("mediaStage.couldNotAddAsset"), {
description: err instanceof Error ? err.message : String(err),
});
} finally {
@@ -210,7 +214,7 @@ export function MediaPane({
return (
<aside className={styles.panel}>
<header className={styles.panelHead}>
- <h2>Media</h2>
+ <h2>{t("leftPanel.mediaTitle")}</h2>
</header>
<div style={{ padding: "10px var(--sp-3) 8px" }}>
<div
@@ -228,7 +232,7 @@ export function MediaPane({
<Search size={14} />
<input
type="text"
- placeholder="Search…"
+ placeholder={t("leftPanel.searchPlaceholder")}
value={query}
onChange={(e) => setQuery(e.target.value)}
style={{
@@ -244,7 +248,7 @@ export function MediaPane({
<button
type="button"
onClick={() => setQuery("")}
- aria-label="Clear search"
+ aria-label={t("leftPanel.clearSearch")}
style={{
background: "transparent",
border: 0,
@@ -272,7 +276,7 @@ export function MediaPane({
disabled={!projectId || busy}
>
<Plus size={14} />
- Import media
+ {t("mediaStage.importMedia")}
</button>
{document?.transcript ? (
<div
@@ -297,7 +301,7 @@ export function MediaPane({
background: "var(--success)",
}}
/>
- TRANSCRIPT READY
+ {t("leftPanel.transcriptReadyBadge")}
</div>
) : null}
<SourceTranscriptModal
@@ -369,6 +373,8 @@ function ModelQuickPopover({
onConfigChange: () => void;
onOpenFullSettings: () => void;
}) {
+ const t = useScopedT("editor");
+ const tc = useScopedT("common");
const [screen, setScreen] = useState<"models" | "providers">("models");
const [browseProviderId, setBrowseProviderId] = useState(llmConfig.provider);
const [models, setModels] = useState<string[]>([]);
@@ -416,7 +422,7 @@ function ModelQuickPopover({
onConfigChange();
onClose();
} else {
- setModelsError(result.error ?? "Could not select model");
+ setModelsError(result.error ?? t("chat.selectModelFailed"));
}
} finally {
setBusy(false);
@@ -478,12 +484,12 @@ function ModelQuickPopover({
}}
>
<ArrowLeft size={14} />
- {screen === "models" ? "Change provider" : "Back"}
+ {screen === "models" ? t("chat.changeProvider") : t("chat.back")}
</button>
<button
type="button"
onClick={onClose}
- aria-label="Close"
+ aria-label={tc("actions.close")}
style={{
background: "transparent",
border: "none",
@@ -503,16 +509,16 @@ function ModelQuickPopover({
{browseDef?.label ?? browseProviderId}
</div>
<div style={{ fontSize: 11.5, color: "var(--muted)" }}>
- Current model:{" "}
+ {t("chat.currentModel")}{" "}
{browseProviderId === llmConfig.provider
? llmConfig.model
- : (browseDef?.defaultModel ?? "Not selected")}
+ : (browseDef?.defaultModel ?? t("chat.notSelected"))}
</div>
</div>
<input
value={search}
onChange={(e) => setSearch(e.target.value)}
- placeholder={modelsLoading ? "Loading models…" : "Search models…"}
+ placeholder={modelsLoading ? t("chat.loadingModels") : t("chat.searchModels")}
disabled={modelsLoading || !models.length}
style={{
width: "100%",
@@ -527,10 +533,10 @@ function ModelQuickPopover({
{!models.length ? (
<div style={{ fontSize: 12, color: "var(--muted)", padding: "8px 0" }}>
{modelsLoading
- ? "Loading models…"
+ ? t("chat.loadingModels")
: modelsError
- ? `Couldn't fetch live models (${modelsError}); open provider settings to type a model id manually.`
- : "No models available from this provider."}
+ ? t("chat.fetchModelsFailed", { error: modelsError })
+ : t("chat.noModelsAvailable")}
</div>
) : (
<div>
@@ -566,7 +572,7 @@ function ModelQuickPopover({
))}
{filteredModels.length === 0 ? (
<div style={{ fontSize: 12, color: "var(--muted)" }}>
- No models match this search.
+ {t("chat.noModelsMatch")}
</div>
) : null}
</div>
@@ -609,7 +615,7 @@ function ModelQuickPopover({
})}
{connectedProviders.length === 0 ? (
<div style={{ fontSize: 12, color: "var(--muted)", marginBottom: 8 }}>
- No connected providers yet.
+ {t("chat.noProvidersConnected")}
</div>
) : null}
<button
@@ -632,7 +638,7 @@ function ModelQuickPopover({
marginTop: 6,
}}
>
- Provider settings…
+ {t("chat.providerSettings")}
</button>
</>
)}
@@ -644,6 +650,8 @@ function ModelQuickPopover({
}
function ChatStripPanel() {
+ const t = useScopedT("editor");
+ const tc = useScopedT("common");
const projectId = useProjectStore((s) => s.projectId);
const [messages, setMessages] = useState<ChatDisplayMessage[]>([]);
const [input, setInput] = useState("");
@@ -806,7 +814,7 @@ function ChatStripPanel() {
try {
await applyAgentDocument(result.document);
} catch (err) {
- toast.error("Could not apply the agent's edits", {
+ toast.error(t("chat.applyEditsFailed"), {
description: err instanceof Error ? err.message : String(err),
});
}
@@ -822,10 +830,10 @@ function ChatStripPanel() {
]);
void refreshSessions(projectId);
} else {
- toast.error(result.error ?? "Chat failed");
+ toast.error(result.error ?? t("chat.chatFailed"));
}
} catch (err) {
- toast.error("Chat failed", {
+ toast.error(t("chat.chatFailed"), {
description: err instanceof Error ? err.message : String(err),
});
} finally {
@@ -863,7 +871,7 @@ function ChatStripPanel() {
messageId,
);
if (!result.success) {
- toast.error(result.error ?? "Rewind failed");
+ toast.error(result.error ?? t("chat.rewindFailed"));
setRewindFor(null);
return;
}
@@ -880,16 +888,16 @@ function ChatStripPanel() {
})),
);
setInput(result.prompt);
- toast.success("Rewound to the start of that message");
+ toast.success(t("chat.rewoundSuccess"));
} catch (err) {
- toast.error("Rewind failed", {
+ toast.error(t("chat.rewindFailed"), {
description: err instanceof Error ? err.message : String(err),
});
} finally {
setRewindFor(null);
}
},
- [projectId, activeSessionId, applyAgentDocument],
+ [projectId, activeSessionId, applyAgentDocument, t],
);
useEffect(() => {
@@ -912,7 +920,7 @@ function ChatStripPanel() {
};
}, [rewindFor]);
- const modelLabel = llmConfig ? llmConfig.model : "Configure AI Model";
+ const modelLabel = llmConfig ? llmConfig.model : t("chat.configureModel");
const providerSupportsReasoning = Boolean(
llmConfig &&
PROVIDER_DEFINITIONS.find((d) => d.id === llmConfig.provider)?.supportsReasoningEffort,
@@ -937,17 +945,17 @@ function ChatStripPanel() {
setLlmConfig({ ...llmConfig, reasoningEffort: effort });
setReasoningOpen(false);
} else {
- toast.error(result.error ?? "Could not update reasoning effort");
+ toast.error(result.error ?? t("chat.reasoningEffortUpdateFailed"));
}
} catch (err) {
- toast.error("Could not update reasoning effort", {
+ toast.error(t("chat.reasoningEffortUpdateFailed"), {
description: err instanceof Error ? err.message : String(err),
});
} finally {
setReasoningBusy(false);
}
},
- [llmConfig],
+ [llmConfig, t],
);
const toggleReasoningOpen = useCallback(() => {
@@ -1002,7 +1010,7 @@ function ChatStripPanel() {
try {
const result = await nativeBridgeClient.aiEdition.chatCompact(projectId, activeSessionId);
if (!result) {
- toast.info("Not enough history to compact yet.");
+ toast.info(t("chat.notEnoughHistory"));
return;
}
setMessages(
@@ -1015,15 +1023,15 @@ function ChatStripPanel() {
checkpointId: m.checkpointId ?? null,
})),
);
- toast.success("Compacted earlier context");
+ toast.success(t("chat.compactedSuccess"));
} catch (err) {
- toast.error("Compact failed", {
+ toast.error(t("chat.compactFailed"), {
description: err instanceof Error ? err.message : String(err),
});
} finally {
setCompactNowPending(false);
}
- }, [projectId, activeSessionId, compactNowPending]);
+ }, [projectId, activeSessionId, compactNowPending, t]);
const newChat = useCallback(async () => {
if (!projectId) return;
@@ -1033,11 +1041,11 @@ function ChatStripPanel() {
setActiveSessionId(created.id);
setMessages([]);
} catch (err) {
- toast.error("Could not create conversation", {
+ toast.error(t("chat.createSessionFailed"), {
description: err instanceof Error ? err.message : String(err),
});
}
- }, [projectId]);
+ }, [projectId, t]);
const selectSession = useCallback((id: string) => {
setActiveSessionId(id);
@@ -1055,12 +1063,12 @@ function ChatStripPanel() {
setMessages([]);
}
} catch (err) {
- toast.error("Could not delete conversation", {
+ toast.error(t("chat.deleteSessionFailed"), {
description: err instanceof Error ? err.message : String(err),
});
}
},
- [projectId, activeSessionId],
+ [projectId, activeSessionId, t],
);
const handleRename = useCallback(
@@ -1078,12 +1086,12 @@ function ChatStripPanel() {
setSessions((prev) => prev.map((s) => (s.id === id ? updated : s)));
}
} catch (err) {
- toast.error("Could not rename conversation", {
+ toast.error(t("chat.renameSessionFailed"), {
description: err instanceof Error ? err.message : String(err),
});
}
},
- [projectId],
+ [projectId, t],
);
// ponytail: inline session rename. Click the title to edit, Enter saves,
@@ -1117,17 +1125,17 @@ function ChatStripPanel() {
activeSessionId,
);
const runAddTrim = useCallback(() => {
- const raw = window.prompt("Add skip range\nFormat: startSec-endSec (e.g. 1.2-3.4)", "5-8");
+ const raw = window.prompt(t("chat.addSkipRangePrompt"), "5-8");
if (!raw) return;
const m = raw.match(/^\s*(\d+(?:\.\d+)?)\s*[-–]\s*(\d+(?:\.\d+)?)\s*$/);
if (!m) {
- toast.error("Use startSec-endSec, e.g. 1.2-3.4");
+ toast.error(t("chat.addSkipRangeFormatError"));
return;
}
const startSec = Number(m[1]);
const endSec = Number(m[2]);
if (!Number.isFinite(startSec) || !Number.isFinite(endSec) || endSec <= startSec) {
- toast.error("endSec must be greater than startSec.");
+ toast.error(t("chat.addSkipRangeOrderError"));
return;
}
const op: AxcutTimelineOperation = {
@@ -1135,8 +1143,8 @@ function ChatStripPanel() {
startSec,
endSec,
};
- void queueTimelineOp(op, `Added skip ${startSec}–${endSec}s.`);
- }, [queueTimelineOp]);
+ void queueTimelineOp(op, t("chat.addSkipRangeApplied", { startSec, endSec }));
+ }, [queueTimelineOp, t]);
return (
<aside className={styles.panel}>
@@ -1145,16 +1153,19 @@ function ChatStripPanel() {
<div className={styles.chatStripRow}>
<span
className={styles.ctxPill}
- title={`${budget.usedTokens} / ${budget.budgetTokens} estimated tokens`}
+ title={t("chat.contextTooltip", {
+ usedTokens: budget.usedTokens,
+ budgetTokens: budget.budgetTokens,
+ })}
>
<span className={styles.d} aria-hidden />
- {Math.min(100, Math.round(budget.ratio * 100))}% context
+ {t("chat.contextPercent", { percent: Math.min(100, Math.round(budget.ratio * 100)) })}
</span>
<span className={styles.stripActions}>
<button
type="button"
- title="Compact context"
- aria-label="Compact context"
+ title={t("chat.compactContext")}
+ aria-label={t("chat.compactContext")}
className={styles.iconBtn}
onClick={() => void compactNow()}
disabled={!activeSessionId || compactNowPending}
@@ -1177,8 +1188,8 @@ function ChatStripPanel() {
</button>
<button
type="button"
- title="AI settings"
- aria-label="AI settings"
+ title={t("chat.aiSettings")}
+ aria-label={t("chat.aiSettings")}
onClick={() => setSettingsOpen(true)}
>
<svg
@@ -1195,12 +1206,10 @@ function ChatStripPanel() {
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" />
</svg>
</button>
- </span>
- <span className={styles.stripActions}>
<button
type="button"
- title="History"
- aria-label="History"
+ title={t("chat.history")}
+ aria-label={t("chat.history")}
onClick={() => setChatsOpen(true)}
>
<svg
@@ -1220,8 +1229,8 @@ function ChatStripPanel() {
</button>
<button
type="button"
- title="New conversation"
- aria-label="New conversation"
+ title={t("chat.newConversation")}
+ aria-label={t("chat.newConversation")}
onClick={newChat}
>
<svg
@@ -1297,19 +1306,20 @@ function ChatStripPanel() {
flex: 1,
cursor: "text",
}}
- title="Click to rename"
+ title={t("chat.clickToRename")}
onClick={() => {
const current = sessions.find((s) => s.id === activeSessionId);
if (current) beginEditTitle(activeSessionId, current.title);
}}
>
- {sessions.find((s) => s.id === activeSessionId)?.title ?? "Conversation"}
+ {sessions.find((s) => s.id === activeSessionId)?.title ??
+ t("chat.untitledConversation")}
</span>
)}
<button
type="button"
- title="Rename conversation"
- aria-label="Rename conversation"
+ title={t("chat.renameConversation")}
+ aria-label={t("chat.renameConversation")}
disabled={editingSessionId === activeSessionId}
onClick={() => {
const current = sessions.find((s) => s.id === activeSessionId);
@@ -1339,12 +1349,12 @@ function ChatStripPanel() {
</button>
<button
type="button"
- title="Delete conversation"
- aria-label="Delete conversation"
+ title={t("chat.deleteConversation")}
+ aria-label={t("chat.deleteConversation")}
onClick={() => {
const current = sessions.find((s) => s.id === activeSessionId);
if (!current) return;
- if (window.confirm(`Delete "${current.title}"?`)) {
+ if (window.confirm(t("chat.confirmDeleteConversation", { title: current.title }))) {
void handleDelete(activeSessionId);
}
}}
@@ -1375,8 +1385,8 @@ function ChatStripPanel() {
</button>
<button
type="button"
- title="Add skip range"
- aria-label="Add skip range"
+ title={t("chat.addSkipRange")}
+ aria-label={t("chat.addSkipRange")}
disabled={!activeSessionId || queueBusy}
onClick={runAddTrim}
style={{
@@ -1390,7 +1400,7 @@ function ChatStripPanel() {
whiteSpace: "nowrap",
}}
>
- + skip
+ {t("chat.skipButtonShort")}
</button>
</div>
) : null}
@@ -1407,7 +1417,7 @@ function ChatStripPanel() {
lineHeight: 1.5,
}}
>
- No messages yet. Ask the agent to cut silences, tighten pauses, or add captions.
+ {t("chat.emptyState")}
</p>
) : (
<>
@@ -1415,7 +1425,7 @@ function ChatStripPanel() {
<div className={styles.msg} key={i}>
<div className={styles.msgHead}>
<span className={styles.msgAuthor}>
- {m.role === "user" ? "You" : "OpenScreen"}
+ {m.role === "user" ? t("chat.authorUser") : t("chat.authorAssistant")}
</span>
{m.time ? (
<span
@@ -1440,8 +1450,8 @@ function ChatStripPanel() {
<button
type="button"
data-rewind-trigger="true"
- title="Rewind to this message"
- aria-label="Rewind to this message"
+ title={t("chat.rewindToMessage")}
+ aria-label={t("chat.rewindToMessage")}
aria-expanded={rewindFor?.messageId === m.id}
onClick={(event) => {
const rect = event.currentTarget.getBoundingClientRect();
@@ -1483,12 +1493,12 @@ function ChatStripPanel() {
) : null}
<button
type="button"
- title="Copy message"
- aria-label="Copy message"
+ title={t("chat.copyMessage")}
+ aria-label={t("chat.copyMessage")}
onClick={() => {
void navigator.clipboard.writeText(m.content).then(
- () => toast.success("Copied to clipboard"),
- () => toast.error("Couldn't copy"),
+ () => toast.success(t("chat.copiedToClipboard")),
+ () => toast.error(t("chat.copyFailed")),
);
}}
style={{
@@ -1529,7 +1539,7 @@ function ChatStripPanel() {
color: "var(--success)",
}}
>
- applied: {call.summary}
+ {t("chat.appliedPrefix")} {call.summary}
</div>
))}
</div>
@@ -1539,7 +1549,7 @@ function ChatStripPanel() {
{busy ? (
<div className={styles.msg} aria-live="polite">
<div className={styles.msgHead}>
- <span className={styles.msgAuthor}>OpenScreen</span>
+ <span className={styles.msgAuthor}>{t("chat.authorAssistant")}</span>
</div>
<div
className={styles.msgBubble}
@@ -1550,7 +1560,7 @@ function ChatStripPanel() {
className="animate-spin"
style={{ marginRight: 6, verticalAlign: "middle" }}
/>
- Thinking…
+ {t("chat.thinking")}
</div>
</div>
) : null}
@@ -1560,7 +1570,7 @@ function ChatStripPanel() {
<div className={styles.chatInput}>
<textarea
- placeholder="Describe the edit you want."
+ placeholder={t("chat.composerPlaceholder")}
value={input}
onChange={(e) => setInput(e.target.value)}
onKeyDown={(e) => {
@@ -1575,7 +1585,7 @@ function ChatStripPanel() {
ref={modelButtonRef}
type="button"
className={styles.modelPicker}
- aria-label="Model"
+ aria-label={t("chat.modelLabel")}
aria-haspopup="menu"
aria-expanded={modelPopoverOpen}
onClick={toggleModelPopoverOpen}
@@ -1601,7 +1611,7 @@ function ChatStripPanel() {
ref={reasoningButtonRef}
type="button"
className={styles.reasoningBtn}
- aria-label="Reasoning effort"
+ aria-label={t("chat.reasoningEffortLabel")}
aria-haspopup="menu"
aria-expanded={reasoningOpen}
onClick={toggleReasoningOpen}
@@ -1673,8 +1683,8 @@ function ChatStripPanel() {
<button
type="button"
className={styles.sendBtn}
- title="Send (Enter)"
- aria-label="Send"
+ title={t("chat.sendTitle")}
+ aria-label={t("chat.send")}
onClick={() => void send()}
disabled={busy || !input.trim()}
>
@@ -1714,7 +1724,7 @@ function ChatStripPanel() {
<div
data-rewind-confirmation="true"
role="dialog"
- aria-label="Confirm rewind"
+ aria-label={t("chat.rewindConfirmTitle")}
style={{
position: "fixed",
left: rewindFor.anchor.left - 130,
@@ -1728,7 +1738,9 @@ function ChatStripPanel() {
zIndex: 1000,
}}
>
- <strong style={{ display: "block", marginBottom: 4 }}>Rewind here?</strong>
+ <strong style={{ display: "block", marginBottom: 4 }}>
+ {t("chat.rewindConfirmTitle")}
+ </strong>
<p
style={{
font: "400 12px/1.4 var(--font-body)",
@@ -1736,8 +1748,7 @@ function ChatStripPanel() {
margin: "0 0 8px",
}}
>
- The agent's edits and follow-up turns after this point get rolled back. Project,
- conversation, and agent state will be restored.
+ {t("chat.rewindConfirmBody")}
</p>
<div style={{ display: "flex", justifyContent: "flex-end", gap: 6 }}>
<button
@@ -1753,7 +1764,7 @@ function ChatStripPanel() {
cursor: "pointer",
}}
>
- Cancel
+ {tc("actions.cancel")}
</button>
<button
type="button"
@@ -1768,7 +1779,7 @@ function ChatStripPanel() {
cursor: "pointer",
}}
>
- Rewind
+ {t("chat.rewindConfirm")}
</button>
</div>
</div>,
@@ -1779,9 +1790,11 @@ function ChatStripPanel() {
);
}
-const RAIL_BUTTONS: Array<{ id: LeftTab; label: string; icon: React.ElementType }> = [
- ...(AI_FEATURES_ENABLED ? [{ id: "chat" as LeftTab, label: "Chat", icon: MessageSquare }] : []),
- { id: "media", label: "Media", icon: Film },
+const RAIL_BUTTONS: Array<{ id: LeftTab; labelKey: string; icon: React.ElementType }> = [
+ ...(AI_FEATURES_ENABLED
+ ? [{ id: "chat" as LeftTab, labelKey: "leftRail.chat", icon: MessageSquare }]
+ : []),
+ { id: "media", labelKey: "leftRail.media", icon: Film },
];
export function LeftRail({
@@ -1791,14 +1804,15 @@ export function LeftRail({
active: LeftTab;
onChange: (id: LeftTab) => void;
}) {
+ const t = useScopedT("editor");
return (
- <aside className={`${styles.rail} ${styles.leftRail}`} aria-label="Left tools">
- {RAIL_BUTTONS.map(({ id, label, icon: Icon }) => (
+ <aside className={`${styles.rail} ${styles.leftRail}`} aria-label={t("leftRail.ariaLabel")}>
+ {RAIL_BUTTONS.map(({ id, labelKey, icon: Icon }) => (
<button
type="button"
key={id}
- title={label}
- aria-label={label}
+ title={t(labelKey)}
+ aria-label={t(labelKey)}
aria-pressed={active === id}
onClick={() => onChange(id)}
>
diff --git a/src/components/ai-edition/Modals.tsx b/src/components/ai-edition/Modals.tsx
index 21f7affe4..735dfd60d 100644
--- a/src/components/ai-edition/Modals.tsx
+++ b/src/components/ai-edition/Modals.tsx
@@ -21,11 +21,12 @@ import {
} from "react";
import { toFileUrl } from "@/components/video-editor/projectPersistence";
import type { CropRegion } from "@/components/video-editor/types";
+import { useScopedT } from "@/contexts/I18nContext";
import { toAxcutTranscriptDsl } from "@/lib/ai-edition/document/transcribe";
import type { AxcutClip, AxcutTranscript } from "@/lib/ai-edition/schema";
import { formatSeconds } from "@/lib/ai-edition/timeline/virtual-preview";
import styles from "./NewEditorShell.module.css";
-import { type VideoSource, VirtualPreview } from "./VirtualPreview";
+import type { VideoSource } from "./VirtualPreview";
// ponytail: keep the UI's language list literal in one place. Mirrors
// `transcriptLanguageSchema` in schema/index.ts; if the schema gains a
@@ -96,6 +97,7 @@ export function ModalShell({
wide?: boolean;
children: ReactNode;
}) {
+ const tc = useScopedT("common");
useEscape(open, onClose);
if (!open) return null;
return (
@@ -116,8 +118,8 @@ export function ModalShell({
type="button"
className={styles.closeBtn}
onClick={onClose}
- title="Close"
- aria-label="Close"
+ title={tc("actions.close")}
+ aria-label={tc("actions.close")}
>
<X size={18} />
</button>
@@ -149,21 +151,22 @@ export function OpenProjectModal({
onSelect,
onBrowse,
}: OpenProjectModalProps) {
+ const t = useScopedT("editor");
const [query, setQuery] = useState("");
const filtered = projects.filter((p) => p.title.toLowerCase().includes(query.toLowerCase()));
return (
<ModalShell
open={open}
onClose={onClose}
- title="Open project"
- subtitle="Pick up an existing project or browse your files"
+ title={t("openProjectDialog.title")}
+ subtitle={t("openProjectDialog.subtitle")}
wide
>
<div style={{ display: "flex", alignItems: "center", gap: 8, marginBottom: 12 }}>
<FolderOpen size={14} style={{ color: "var(--muted)" }} />
<input
type="search"
- placeholder="Search projects…"
+ placeholder={t("openProjectDialog.searchPlaceholder")}
value={query}
onChange={(e) => setQuery(e.target.value)}
style={{
@@ -182,7 +185,7 @@ export function OpenProjectModal({
<div style={{ display: "flex", flexDirection: "column", gap: 2, marginBottom: 12 }}>
{filtered.length === 0 ? (
<p style={{ color: "var(--muted)", fontSize: 12, padding: 16, textAlign: "center" }}>
- No projects match "{query}".
+ {t("openProjectDialog.noMatches", { query })}
</p>
) : (
filtered.map((p) => {
@@ -281,7 +284,7 @@ export function OpenProjectModal({
>
↑↓
</kbd>{" "}
- to navigate ·{" "}
+ {t("openProjectDialog.navigateHint")}{" "}
<kbd
style={{
font: "500 11px/1 var(--font-mono)",
@@ -294,7 +297,7 @@ export function OpenProjectModal({
>
Enter
</kbd>{" "}
- to open
+ {t("openProjectDialog.openHint")}
</span>
<button
type="button"
@@ -305,7 +308,7 @@ export function OpenProjectModal({
}}
>
<FolderOpen size={14} />
- Browse files…
+ {t("openProjectDialog.browseFiles")}
</button>
</div>
</ModalShell>
@@ -319,14 +322,16 @@ interface NewProjectModalProps extends BaseModalProps {
}
export function NewProjectModal({ open, onClose, onCreate }: NewProjectModalProps) {
- const [title, setTitle] = useState("Untitled project");
+ const t = useScopedT("editor");
+ const tc = useScopedT("common");
+ const [title, setTitle] = useState(t("newProjectDialog.defaultTitle"));
const [template, setTemplate] = useState<Template>("blank");
return (
<ModalShell
open={open}
onClose={onClose}
- title="New project"
- subtitle="Choose a starting point and give it a name"
+ title={t("newProjectDialog.title")}
+ subtitle={t("newProjectDialog.subtitle")}
>
<div style={{ display: "flex", flexDirection: "column", gap: 16 }}>
<div style={{ display: "flex", flexDirection: "column", gap: 6 }}>
@@ -339,7 +344,7 @@ export function NewProjectModal({ open, onClose, onCreate }: NewProjectModalProp
color: "var(--muted)",
}}
>
- Project name
+ {t("newProjectDialog.nameLabel")}
</label>
<input
id="np-name"
@@ -367,7 +372,7 @@ export function NewProjectModal({ open, onClose, onCreate }: NewProjectModalProp
color: "var(--muted)",
}}
>
- Starting point
+ {t("newProjectDialog.startingPointLabel")}
</label>
<div
style={{
@@ -378,29 +383,29 @@ export function NewProjectModal({ open, onClose, onCreate }: NewProjectModalProp
>
<TemplateCell
icon={<FolderPlus size={18} />}
- title="Blank project"
- desc="Empty timeline, ready to import"
+ title={t("newProjectDialog.templates.blankTitle")}
+ desc={t("newProjectDialog.templates.blankDesc")}
active={template === "blank"}
onClick={() => setTemplate("blank")}
/>
<TemplateCell
icon={<Crop size={18} />}
- title="Screen recording"
- desc="Start system capture"
+ title={t("newProjectDialog.templates.screenRecordingTitle")}
+ desc={t("newProjectDialog.templates.screenRecordingDesc")}
active={template === "screen-recording"}
onClick={() => setTemplate("screen-recording")}
/>
<TemplateCell
icon={<Plus size={18} />}
- title="Import media"
- desc="Video, audio, images from disk"
+ title={t("mediaStage.importMedia")}
+ desc={t("newProjectDialog.templates.importMediaDesc")}
active={template === "import"}
onClick={() => setTemplate("import")}
/>
<TemplateCell
icon={<Crop size={18} />}
- title="From template"
- desc="Predefined storyboard"
+ title={t("newProjectDialog.templates.fromTemplateTitle")}
+ desc={t("newProjectDialog.templates.fromTemplateDesc")}
active={template === "template"}
onClick={() => setTemplate("template")}
/>
@@ -421,18 +426,18 @@ export function NewProjectModal({ open, onClose, onCreate }: NewProjectModalProp
className={`${styles.btn} ${styles.btnSecondary}`}
onClick={onClose}
>
- Cancel
+ {tc("actions.cancel")}
</button>
<button
type="button"
className={`${styles.btn} ${styles.btnPrimary}`}
onClick={() => {
- onCreate(title.trim() || "Untitled project");
+ onCreate(title.trim() || t("newProjectDialog.defaultTitle"));
onClose();
}}
>
<Plus size={14} />
- Create project
+ {t("newProjectDialog.create")}
</button>
</div>
</div>
@@ -492,15 +497,6 @@ function TemplateCell({
);
}
-interface CropModalProps extends BaseModalProps {
- initialRegion: CropRegion;
- onApply: (region: CropRegion) => void;
- /** Primary video source to show as the real crop-preview frame. */
- videoSources?: VideoSource[];
- /** Seek the preview frame to this time (source-media seconds). */
- currentTimeSec?: number;
-}
-
// `ratio` is width/height (matches the label directly: "16:9" → 16/9 means
// a region 16 units wide for every 9 tall).
const CROP_RATIOS: Array<{ value: string; label: string; ratio: number | null }> = [
@@ -513,12 +509,19 @@ const CROP_RATIOS: Array<{ value: string; label: string; ratio: number | null }>
{ value: "21:9", label: "21:9", ratio: 21 / 9 },
];
-function detectRatio(r: CropRegion): string {
+// `region.width`/`region.height` are fractions of the source frame, not a
+// visual aspect ratio — a region that's 100% wide and 56.25% tall on a 16:9
+// source renders as a 16:9 rectangle on screen, not a "1 : 0.5625" one. The
+// actual on-screen ratio is the fraction ratio scaled by the source video's
+// own pixel aspect ratio, so detecting/applying a preset must go through
+// `videoAspectRatio` (source width/height in pixels) in both directions.
+function detectRatio(r: CropRegion, videoAspectRatio: number): string {
const candidates = CROP_RATIOS.filter((c) => c.ratio !== null);
- const whRatio = r.height === 0 ? 0 : r.width / r.height;
+ if (r.height === 0) return "free";
+ const visualRatio = (r.width / r.height) * videoAspectRatio;
for (const c of candidates) {
if (c.ratio === null) continue;
- if (Math.abs(whRatio - c.ratio) < 0.01) return c.value;
+ if (Math.abs(visualRatio - c.ratio) / c.ratio < 0.02) return c.value;
}
return "free";
}
@@ -528,84 +531,219 @@ const clampPct = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo
type ResizeEdges = { left?: boolean; right?: boolean; top?: boolean; bottom?: boolean };
-export function CropModal({
+function CropField({
+ label,
+ value,
+ onChange,
+}: {
+ label: string;
+ value: number;
+ onChange: (n: number) => void;
+}) {
+ return (
+ <div style={{ display: "flex", flexDirection: "column", gap: 4, minWidth: 0 }}>
+ <label
+ style={{
+ font: "600 10px/1 var(--font-mono)",
+ letterSpacing: "0.04em",
+ textTransform: "uppercase",
+ color: "var(--muted)",
+ }}
+ >
+ {label}
+ </label>
+ <input
+ type="number"
+ value={value}
+ min={0}
+ max={100}
+ onChange={(e) => onChange(Number(e.target.value))}
+ style={{
+ width: "100%",
+ padding: "8px 10px",
+ font: "500 14px/1 var(--font-mono)",
+ color: "var(--fg-2)",
+ background: "var(--surface)",
+ border: "1px solid var(--border)",
+ borderRadius: 6,
+ outline: "none",
+ }}
+ />
+ </div>
+ );
+}
+
+export interface AssetMeta {
+ label: string;
+ durationSec?: number;
+}
+
+const IDENTITY_CROP: CropRegion = { x: 0, y: 0, width: 1, height: 1 };
+
+interface EditClipModalProps extends BaseModalProps {
+ clip: AxcutClip | null;
+ assetMeta: AssetMeta | null;
+ videoSources: VideoSource[];
+ /** `cropRegion` is `undefined` when the crop section wasn't touched (Reset
+ * back to the clip's stored value) — the caller can skip the write in that
+ * case — and `null` when the user explicitly reset it to "no crop". */
+ onApply: (sourceStartSec: number, sourceEndSec: number, cropRegion?: CropRegion | null) => void;
+}
+
+// Mirrors Axcut's ClipEditDialog: an embedded preview of just this clip plus
+// a draggable dual-handle range over the asset's full source duration —
+// replaces the old numeric-input-only form. Trim range AND crop are both
+// per-clip and both edited here (see clipSchema.cropRegion / useTimeline's
+// updateClipSourceRange + updateClipCrop) — crop used to be a document-wide
+// setting behind its own facet-rail button; it's a framing choice for one
+// piece of footage, so it belongs with the rest of this clip's edits.
+export function EditClipModal({
open,
onClose,
- initialRegion,
+ clip,
+ assetMeta,
+ videoSources,
onApply,
- videoSources = [],
- currentTimeSec = 0,
-}: CropModalProps) {
- const [xPct, setXPct] = useState(0);
- const [yPct, setYPct] = useState(0);
- const [wPct, setWPct] = useState(100);
- const [hPct, setHPct] = useState(100);
- const [ratio, setRatio] = useState("free");
- const frameRef = useRef<HTMLDivElement | null>(null);
- const videoRef = useRef<HTMLVideoElement | null>(null);
- const activeSource = videoSources[0] ?? null;
+}: EditClipModalProps) {
+ const t = useScopedT("editor");
+ const tc = useScopedT("common");
+ const ts = useScopedT("settings");
+ const trackRef = useRef<HTMLDivElement | null>(null);
+ const [draftStart, setDraftStart] = useState(0);
+ const [draftEnd, setDraftEnd] = useState(0);
+ const [activeEdge, setActiveEdge] = useState<"start" | "end" | null>(null);
+
+ // Crop draft — percentages (0-100), same shape/units CropModal used to
+ // keep locally before it was folded in here.
+ const [cropXPct, setCropXPct] = useState(0);
+ const [cropYPct, setCropYPct] = useState(0);
+ const [cropWPct, setCropWPct] = useState(100);
+ const [cropHPct, setCropHPct] = useState(100);
+ const [cropRatio, setCropRatio] = useState("free");
+ const [cropTouched, setCropTouched] = useState(false);
+ // Source video's real pixel aspect ratio (width/height) — needed to convert
+ // between a preset's visual ratio (e.g. 16/9) and the crop region's
+ // fraction-of-frame width/height. 16/9 is just a placeholder until the
+ // crop <video>'s real metadata loads (see the effect below).
+ const [videoAspectRatio, setVideoAspectRatio] = useState(16 / 9);
+ const cropFrameRef = useRef<HTMLDivElement | null>(null);
+ const cropVideoRef = useRef<HTMLVideoElement | null>(null);
- // ponytail: sync local form state to the document region every time the
- // modal opens. Doesn't run on every doc change — `open` is the trigger.
+ // ponytail: sync local drag state to the clip every time the modal opens.
+ // `open` is the trigger so external clip changes don't fight the user mid-edit.
useEffect(() => {
- if (!open) return;
- setXPct(Math.round(initialRegion.x * 100));
- setYPct(Math.round(initialRegion.y * 100));
- setWPct(Math.round(initialRegion.width * 100));
- setHPct(Math.round(initialRegion.height * 100));
- setRatio(detectRatio(initialRegion));
- }, [open, initialRegion]);
-
- // Show the frame at the same point the user was looking at in the editor
- // — a still, paused frame is enough to judge the crop, no playback needed.
+ if (!open || !clip) return;
+ setDraftStart(clip.sourceStartSec);
+ setDraftEnd(clip.sourceEndSec ?? clip.sourceStartSec);
+ setActiveEdge(null);
+ const region = clip.cropRegion ?? IDENTITY_CROP;
+ setCropXPct(Math.round(region.x * 100));
+ setCropYPct(Math.round(region.y * 100));
+ setCropWPct(Math.round(region.width * 100));
+ setCropHPct(Math.round(region.height * 100));
+ setCropTouched(false);
+ }, [open, clip]);
+
+ // Re-detect the active ratio preset whenever the stored region or the
+ // video's real aspect ratio changes — the latter only becomes accurate
+ // once the crop <video>'s metadata loads (see the effect below), so this
+ // re-runs a beat after the sync-on-open effect above with the real value.
+ // Skipped once the user starts touching the crop so it doesn't fight
+ // their own free-form edits.
useEffect(() => {
- if (!open) return;
- const v = videoRef.current;
+ if (!open || !clip || cropTouched) return;
+ const region = clip.cropRegion ?? IDENTITY_CROP;
+ setCropRatio(detectRatio(region, videoAspectRatio));
+ }, [open, clip, videoAspectRatio, cropTouched]);
+
+ // Crop preview: a paused still frame is enough to judge a crop (mirrors
+ // the standalone CropModal this replaced) — seek once per open to the
+ // clip's original in-point, not on every trim drag.
+ useEffect(() => {
+ if (!open || !clip) return;
+ const v = cropVideoRef.current;
if (!v) return;
const seek = () => {
v.pause();
- if (Number.isFinite(currentTimeSec)) v.currentTime = currentTimeSec;
+ if (Number.isFinite(clip.sourceStartSec)) v.currentTime = clip.sourceStartSec;
+ if (v.videoWidth > 0 && v.videoHeight > 0) {
+ setVideoAspectRatio(v.videoWidth / v.videoHeight);
+ }
};
if (v.readyState >= 1) seek();
else v.addEventListener("loadedmetadata", seek, { once: true });
return () => v.removeEventListener("loadedmetadata", seek);
- }, [open, currentTimeSec]);
+ }, [open, clip]);
- const handleRatioChange = (next: string) => {
- setRatio(next);
- const candidate = CROP_RATIOS.find((c) => c.value === next);
- if (candidate?.ratio && wPct > 0) {
- const newH = Math.round(wPct / candidate.ratio);
- setHPct(clampPct(newH, MIN_PCT, 100));
- }
- };
+ if (!clip) return null;
- const handleApply = () => {
- const next: CropRegion = {
- x: Math.max(0, Math.min(1, xPct / 100)),
- y: Math.max(0, Math.min(1, yPct / 100)),
- width: Math.max(0.01, Math.min(1, wPct / 100)),
- height: Math.max(0.01, Math.min(1, hPct / 100)),
+ const sourceDurationSec = Math.max(assetMeta?.durationSec ?? 0, clip.sourceEndSec ?? 0, 0.001);
+ const durationSec = Math.max(0.001, draftEnd - draftStart);
+ const hasTrimChanges =
+ Math.abs(draftStart - clip.sourceStartSec) > 0.001 ||
+ Math.abs(draftEnd - (clip.sourceEndSec ?? 0)) > 0.001;
+ const hasChanges = hasTrimChanges || cropTouched;
+ const clipSources = videoSources.filter((s) => s.id === clip.assetId);
+ const cropPreviewSource = clipSources[0] ?? null;
+
+ const startDrag = (edge: "start" | "end", event: ReactPointerEvent<HTMLButtonElement>) => {
+ const track = trackRef.current;
+ if (!track) return;
+ event.preventDefault();
+ event.stopPropagation();
+ const widthPx = Math.max(1, track.clientWidth);
+ const startClientX = event.clientX;
+ const startDraftStart = draftStart;
+ const startDraftEnd = draftEnd;
+ setActiveEdge(edge);
+ const move = (moveEvent: PointerEvent) => {
+ const deltaSec = ((moveEvent.clientX - startClientX) / widthPx) * sourceDurationSec;
+ if (edge === "start") {
+ setDraftStart(Math.min(Math.max(startDraftStart + deltaSec, 0), startDraftEnd - 0.05));
+ } else {
+ setDraftEnd(
+ Math.max(Math.min(startDraftEnd + deltaSec, sourceDurationSec), startDraftStart + 0.05),
+ );
+ }
};
- onApply(next);
- onClose();
+ const end = () => {
+ window.removeEventListener("pointermove", move);
+ window.removeEventListener("pointerup", end);
+ setActiveEdge(null);
+ };
+ window.addEventListener("pointermove", move);
+ window.addEventListener("pointerup", end, { once: true });
+ };
+
+ const handleCropRatioChange = (next: string) => {
+ setCropTouched(true);
+ setCropRatio(next);
+ const candidate = CROP_RATIOS.find((c) => c.value === next);
+ if (candidate?.ratio && cropWPct > 0) {
+ // Convert the preset's visual ratio into the fraction-space ratio
+ // this crop's width/height percentages actually live in.
+ const fractionRatio = candidate.ratio / videoAspectRatio;
+ const newH = Math.round(cropWPct / fractionRatio);
+ setCropHPct(clampPct(newH, MIN_PCT, 100));
+ }
};
- // Drag the whole region (keeps size, moves x/y).
- const startMove = (e: ReactPointerEvent) => {
+ // Drag the whole crop region (keeps size, moves x/y).
+ const startCropMove = (e: ReactPointerEvent) => {
e.preventDefault();
e.stopPropagation();
- const el = frameRef.current;
+ const el = cropFrameRef.current;
if (!el) return;
const r = el.getBoundingClientRect();
const startX = e.clientX;
const startY = e.clientY;
- const start = { x: xPct, y: yPct, w: wPct, h: hPct };
+ const start = { x: cropXPct, y: cropYPct, w: cropWPct, h: cropHPct };
+ setCropTouched(true);
const move = (ev: PointerEvent) => {
const dxPct = ((ev.clientX - startX) / r.width) * 100;
const dyPct = ((ev.clientY - startY) / r.height) * 100;
- setXPct(Math.round(clampPct(start.x + dxPct, 0, 100 - start.w)));
- setYPct(Math.round(clampPct(start.y + dyPct, 0, 100 - start.h)));
+ setCropXPct(Math.round(clampPct(start.x + dxPct, 0, 100 - start.w)));
+ setCropYPct(Math.round(clampPct(start.y + dyPct, 0, 100 - start.h)));
};
const up = () => {
window.removeEventListener("pointermove", move);
@@ -617,16 +755,20 @@ export function CropModal({
// Drag one of the 8 edge/corner handles to resize. When a fixed ratio is
// active, the opposite dimension follows to keep width/height locked.
- const startResize = (edges: ResizeEdges) => (e: ReactPointerEvent) => {
+ const startCropResize = (edges: ResizeEdges) => (e: ReactPointerEvent) => {
e.preventDefault();
e.stopPropagation();
- const el = frameRef.current;
+ const el = cropFrameRef.current;
if (!el) return;
const r = el.getBoundingClientRect();
const startX = e.clientX;
const startY = e.clientY;
- const start = { x: xPct, y: yPct, w: wPct, h: hPct };
- const activeRatio = CROP_RATIOS.find((c) => c.value === ratio)?.ratio ?? null;
+ const start = { x: cropXPct, y: cropYPct, w: cropWPct, h: cropHPct };
+ const activeRatio = CROP_RATIOS.find((c) => c.value === cropRatio)?.ratio ?? null;
+ // Same fraction-space conversion as handleCropRatioChange — locking to
+ // the raw visual ratio here would fight the source's own aspect ratio.
+ const activeFractionRatio = activeRatio ? activeRatio / videoAspectRatio : null;
+ setCropTouched(true);
const move = (ev: PointerEvent) => {
const dxPct = ((ev.clientX - startX) / r.width) * 100;
const dyPct = ((ev.clientY - startY) / r.height) * 100;
@@ -647,14 +789,14 @@ export function CropModal({
if (edges.bottom) {
h = clampPct(start.h + dyPct, MIN_PCT, 100 - start.y);
}
- if (activeRatio) {
- if (edges.left || edges.right) h = clampPct(w / activeRatio, MIN_PCT, 100 - y);
- else if (edges.top || edges.bottom) w = clampPct(h * activeRatio, MIN_PCT, 100 - x);
+ if (activeFractionRatio) {
+ if (edges.left || edges.right) h = clampPct(w / activeFractionRatio, MIN_PCT, 100 - y);
+ else if (edges.top || edges.bottom) w = clampPct(h * activeFractionRatio, MIN_PCT, 100 - x);
}
- setXPct(Math.round(x));
- setYPct(Math.round(y));
- setWPct(Math.round(w));
- setHPct(Math.round(h));
+ setCropXPct(Math.round(x));
+ setCropYPct(Math.round(y));
+ setCropWPct(Math.round(w));
+ setCropHPct(Math.round(h));
};
const up = () => {
window.removeEventListener("pointermove", move);
@@ -664,7 +806,7 @@ export function CropModal({
window.addEventListener("pointerup", up);
};
- const handleStyle = (pos: React.CSSProperties): React.CSSProperties => ({
+ const cropHandleStyle = (pos: React.CSSProperties): React.CSSProperties => ({
position: "absolute",
width: 10,
height: 10,
@@ -674,28 +816,57 @@ export function CropModal({
...pos,
});
+ const handleReset = () => {
+ setDraftStart(clip.sourceStartSec);
+ setDraftEnd(clip.sourceEndSec ?? clip.sourceStartSec);
+ const region = clip.cropRegion ?? IDENTITY_CROP;
+ setCropXPct(Math.round(region.x * 100));
+ setCropYPct(Math.round(region.y * 100));
+ setCropWPct(Math.round(region.width * 100));
+ setCropHPct(Math.round(region.height * 100));
+ setCropRatio(detectRatio(region, videoAspectRatio));
+ setCropTouched(false);
+ };
+ const handleApply = () => {
+ const nextCrop: CropRegion = {
+ x: Math.max(0, Math.min(1, cropXPct / 100)),
+ y: Math.max(0, Math.min(1, cropYPct / 100)),
+ width: Math.max(0.01, Math.min(1, cropWPct / 100)),
+ height: Math.max(0.01, Math.min(1, cropHPct / 100)),
+ };
+ const isIdentity =
+ nextCrop.x === 0 && nextCrop.y === 0 && nextCrop.width === 1 && nextCrop.height === 1;
+ onApply(draftStart, draftEnd, cropTouched ? (isIdentity ? null : nextCrop) : undefined);
+ onClose();
+ };
+
return (
<ModalShell
open={open}
onClose={onClose}
- title="Crop video"
- subtitle="Drag the region or its handles to adjust the crop area"
+ title={t("editClipDialog.title")}
+ subtitle={assetMeta?.label ?? undefined}
+ wide
>
<div
- ref={frameRef}
+ ref={cropFrameRef}
style={{
position: "relative",
- aspectRatio: "16 / 9",
+ width: "100%",
+ height: 230,
+ maxWidth: 409,
+ margin: "0 auto 14px",
+ flexShrink: 0,
background: "#0a0b0e",
borderRadius: "var(--r-md)",
border: "1px solid var(--border)",
overflow: "hidden",
}}
>
- {activeSource ? (
+ {cropPreviewSource ? (
<video
- ref={videoRef}
- src={activeSource.src}
+ ref={cropVideoRef}
+ src={cropPreviewSource.src}
muted
playsInline
style={{
@@ -711,342 +882,268 @@ export function CropModal({
<div
style={{
position: "absolute",
- left: `${xPct}%`,
- top: `${yPct}%`,
- width: `${wPct}%`,
- height: `${hPct}%`,
+ left: `${cropXPct}%`,
+ top: `${cropYPct}%`,
+ width: `${cropWPct}%`,
+ height: `${cropHPct}%`,
border: "1.5px solid var(--fg)",
borderRadius: 4,
boxShadow: "0 0 0 9999px var(--overlay-dark)",
cursor: "move",
}}
- onPointerDown={startMove}
+ onPointerDown={startCropMove}
>
<div
- onPointerDown={startResize({ left: true, top: true })}
- style={handleStyle({ left: -5, top: -5, cursor: "nwse-resize" })}
+ onPointerDown={startCropResize({ left: true, top: true })}
+ style={cropHandleStyle({ left: -5, top: -5, cursor: "nwse-resize" })}
/>
<div
- onPointerDown={startResize({ right: true, top: true })}
- style={handleStyle({ right: -5, top: -5, cursor: "nesw-resize" })}
+ onPointerDown={startCropResize({ right: true, top: true })}
+ style={cropHandleStyle({ right: -5, top: -5, cursor: "nesw-resize" })}
/>
<div
- onPointerDown={startResize({ left: true, bottom: true })}
- style={handleStyle({ left: -5, bottom: -5, cursor: "nesw-resize" })}
+ onPointerDown={startCropResize({ left: true, bottom: true })}
+ style={cropHandleStyle({ left: -5, bottom: -5, cursor: "nesw-resize" })}
/>
<div
- onPointerDown={startResize({ right: true, bottom: true })}
- style={handleStyle({ right: -5, bottom: -5, cursor: "nwse-resize" })}
+ onPointerDown={startCropResize({ right: true, bottom: true })}
+ style={cropHandleStyle({ right: -5, bottom: -5, cursor: "nwse-resize" })}
/>
<div
- onPointerDown={startResize({ top: true })}
- style={handleStyle({ left: "50%", top: -5, marginLeft: -5, cursor: "ns-resize" })}
+ onPointerDown={startCropResize({ top: true })}
+ style={cropHandleStyle({ left: "50%", top: -5, marginLeft: -5, cursor: "ns-resize" })}
/>
<div
- onPointerDown={startResize({ bottom: true })}
- style={handleStyle({ left: "50%", bottom: -5, marginLeft: -5, cursor: "ns-resize" })}
+ onPointerDown={startCropResize({ bottom: true })}
+ style={cropHandleStyle({
+ left: "50%",
+ bottom: -5,
+ marginLeft: -5,
+ cursor: "ns-resize",
+ })}
/>
<div
- onPointerDown={startResize({ left: true })}
- style={handleStyle({ top: "50%", left: -5, marginTop: -5, cursor: "ew-resize" })}
+ onPointerDown={startCropResize({ left: true })}
+ style={cropHandleStyle({ top: "50%", left: -5, marginTop: -5, cursor: "ew-resize" })}
/>
<div
- onPointerDown={startResize({ right: true })}
- style={handleStyle({ top: "50%", right: -5, marginTop: -5, cursor: "ew-resize" })}
+ onPointerDown={startCropResize({ right: true })}
+ style={cropHandleStyle({
+ top: "50%",
+ right: -5,
+ marginTop: -5,
+ cursor: "ew-resize",
+ })}
/>
</div>
</div>
- <div
- style={{
- display: "grid",
- gridTemplateColumns: "repeat(5, auto) 1fr auto",
- gap: 10,
- alignItems: "end",
- }}
- >
- <CropField label="X" value={xPct} onChange={setXPct} />
- <CropField label="Y" value={yPct} onChange={setYPct} />
- <CropField label="W" value={wPct} onChange={setWPct} />
- <CropField label="H" value={hPct} onChange={setHPct} />
- <div className={styles.field} style={{ minWidth: 96 }}>
- <label>Ratio</label>
- <select value={ratio} onChange={(e) => handleRatioChange(e.target.value)}>
- {CROP_RATIOS.map((r) => (
- <option key={r.value} value={r.value}>
- {r.label}
- </option>
- ))}
- </select>
- </div>
- <span
- style={{
- font: "500 11px/1 var(--font-mono)",
- color: "var(--muted)",
- alignSelf: "center",
- }}
- >
- {wPct}% × {hPct}%
- </span>
- <button
- type="button"
- className={`${styles.btn} ${styles.btnPrimary}`}
- style={{ height: 36, padding: "0 20px" }}
- onClick={handleApply}
- >
- Done
- </button>
- </div>
- </ModalShell>
- );
-}
-function CropField({
- label,
- value,
- onChange,
-}: {
- label: string;
- value: number;
- onChange: (n: number) => void;
-}) {
- return (
- <div className={styles.field}>
- <label>{label}</label>
- <input
- type="number"
- value={value}
- min={0}
- max={100}
- onChange={(e) => onChange(Number(e.target.value))}
- />
- </div>
- );
-}
-
-export interface AssetMeta {
- label: string;
- durationSec?: number;
-}
-
-interface EditClipModalProps extends BaseModalProps {
- clip: AxcutClip | null;
- assetMeta: AssetMeta | null;
- videoSources: VideoSource[];
- onApply: (sourceStartSec: number, sourceEndSec: number) => void;
-}
-
-// Mirrors Axcut's ClipEditDialog: an embedded preview of just this clip plus
-// a draggable dual-handle range over the asset's full source duration —
-// replaces the old numeric-input-only form. Only the source range is
-// editable here; the clip's timeline position is derived from resequencing
-// (see useTimeline.updateClipSourceRange), same as every other clip op.
-export function EditClipModal({
- open,
- onClose,
- clip,
- assetMeta,
- videoSources,
- onApply,
-}: EditClipModalProps) {
- const trackRef = useRef<HTMLDivElement | null>(null);
- const [draftStart, setDraftStart] = useState(0);
- const [draftEnd, setDraftEnd] = useState(0);
- const [activeEdge, setActiveEdge] = useState<"start" | "end" | null>(null);
-
- // ponytail: sync local drag state to the clip every time the modal opens.
- // `open` is the trigger so external clip changes don't fight the user mid-edit.
- useEffect(() => {
- if (!open || !clip) return;
- setDraftStart(clip.sourceStartSec);
- setDraftEnd(clip.sourceEndSec ?? clip.sourceStartSec);
- setActiveEdge(null);
- }, [open, clip]);
-
- if (!clip) return null;
-
- const sourceDurationSec = Math.max(assetMeta?.durationSec ?? 0, clip.sourceEndSec ?? 0, 0.001);
- const durationSec = Math.max(0.001, draftEnd - draftStart);
- const hasChanges =
- Math.abs(draftStart - clip.sourceStartSec) > 0.001 ||
- Math.abs(draftEnd - (clip.sourceEndSec ?? 0)) > 0.001;
- const previewClip: AxcutClip = {
- ...clip,
- id: `${clip.id}:edit-preview`,
- sourceStartSec: draftStart,
- sourceEndSec: draftEnd,
- timelineStartSec: 0,
- timelineEndSec: durationSec,
- };
- const clipSources = videoSources.filter((s) => s.id === clip.assetId);
-
- const startDrag = (edge: "start" | "end", event: ReactPointerEvent<HTMLButtonElement>) => {
- const track = trackRef.current;
- if (!track) return;
- event.preventDefault();
- event.stopPropagation();
- const widthPx = Math.max(1, track.clientWidth);
- const startClientX = event.clientX;
- const startDraftStart = draftStart;
- const startDraftEnd = draftEnd;
- setActiveEdge(edge);
- const move = (moveEvent: PointerEvent) => {
- const deltaSec = ((moveEvent.clientX - startClientX) / widthPx) * sourceDurationSec;
- if (edge === "start") {
- setDraftStart(Math.min(Math.max(startDraftStart + deltaSec, 0), startDraftEnd - 0.05));
- } else {
- setDraftEnd(
- Math.max(Math.min(startDraftEnd + deltaSec, sourceDurationSec), startDraftStart + 0.05),
- );
- }
- };
- const end = () => {
- window.removeEventListener("pointermove", move);
- window.removeEventListener("pointerup", end);
- setActiveEdge(null);
- };
- window.addEventListener("pointermove", move);
- window.addEventListener("pointerup", end, { once: true });
- };
-
- const handleReset = () => {
- setDraftStart(clip.sourceStartSec);
- setDraftEnd(clip.sourceEndSec ?? clip.sourceStartSec);
- };
- const handleApply = () => {
- onApply(draftStart, draftEnd);
- onClose();
- };
-
- return (
- <ModalShell
- open={open}
- onClose={onClose}
- title="Edit clip"
- subtitle={assetMeta?.label ?? undefined}
- wide
- >
- <div
- style={{
- height: 220,
- marginBottom: 16,
- borderRadius: "var(--r-md)",
- overflow: "hidden",
- background: "var(--surface-2)",
- }}
- >
- <VirtualPreview videoSources={clipSources} clips={[previewClip]} />
- </div>
-
- <div style={{ display: "flex", gap: 24, marginBottom: 16 }}>
- <RangeStat label="Start" value={formatSeconds(draftStart)} />
- <RangeStat label="End" value={formatSeconds(draftEnd)} />
- <RangeStat label="Duration" value={formatSeconds(durationSec)} />
- </div>
+ <div style={{ flexShrink: 0 }}>
+ <div style={{ display: "flex", gap: 24, marginBottom: 10 }}>
+ <RangeStat label={t("editClipDialog.start")} value={formatSeconds(draftStart)} />
+ <RangeStat label={t("editClipDialog.end")} value={formatSeconds(draftEnd)} />
+ <RangeStat label={t("editClipDialog.duration")} value={formatSeconds(durationSec)} />
+ </div>
- <div
- style={{
- display: "flex",
- justifyContent: "space-between",
- font: "500 10px/1.4 var(--font-mono)",
- color: "var(--muted)",
- marginBottom: 4,
- }}
- >
- <span>0:00.0</span>
- <span>{formatSeconds(sourceDurationSec)}</span>
- </div>
- <div
- ref={trackRef}
- style={{
- position: "relative",
- height: 32,
- background: "var(--surface-2)",
- borderRadius: "var(--r-sm)",
- }}
- >
<div
style={{
- position: "absolute",
- inset: 0,
- width: `${(draftStart / sourceDurationSec) * 100}%`,
- background: "var(--overlay-dark)",
- borderRadius: "var(--r-sm) 0 0 var(--r-sm)",
+ display: "flex",
+ justifyContent: "space-between",
+ font: "500 10px/1.4 var(--font-mono)",
+ color: "var(--muted)",
+ marginBottom: 4,
}}
- />
+ >
+ <span>0:00.0</span>
+ <span>{formatSeconds(sourceDurationSec)}</span>
+ </div>
<div
- className={activeEdge ? styles.editClipRangeDragging : undefined}
+ ref={trackRef}
style={{
- position: "absolute",
- top: 0,
- bottom: 0,
- left: `${(draftStart / sourceDurationSec) * 100}%`,
- width: `${Math.max(0.5, (durationSec / sourceDurationSec) * 100)}%`,
- background: "var(--accent-wash)",
- border: "1px solid var(--accent)",
+ position: "relative",
+ height: 32,
+ flexShrink: 0,
+ background: "var(--surface-2)",
borderRadius: "var(--r-sm)",
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
}}
>
- <button
- type="button"
- onPointerDown={(e) => startDrag("start", e)}
- aria-label="Adjust clip start"
- title="Adjust clip start"
+ <div
style={{
position: "absolute",
- left: -6,
- top: 0,
- bottom: 0,
- width: 12,
- cursor: "ew-resize",
- background: "var(--accent)",
- border: 0,
- borderRadius: 3,
- padding: 0,
+ inset: 0,
+ width: `${(draftStart / sourceDurationSec) * 100}%`,
+ background: "var(--overlay-dark)",
+ borderRadius: "var(--r-sm) 0 0 var(--r-sm)",
}}
/>
- <span
+ <div
+ className={activeEdge ? styles.editClipRangeDragging : undefined}
style={{
- font: "500 11px/1.4 var(--font-mono)",
- color: "var(--accent-on)",
- pointerEvents: "none",
- whiteSpace: "nowrap",
+ position: "absolute",
+ top: 0,
+ bottom: 0,
+ left: `${(draftStart / sourceDurationSec) * 100}%`,
+ width: `${Math.max(0.5, (durationSec / sourceDurationSec) * 100)}%`,
+ background: "var(--accent-wash)",
+ border: "1px solid var(--accent)",
+ borderRadius: "var(--r-sm)",
+ display: "flex",
+ alignItems: "center",
+ justifyContent: "center",
}}
>
- {formatSeconds(draftStart)}–{formatSeconds(draftEnd)}
- </span>
- <button
- type="button"
- onPointerDown={(e) => startDrag("end", e)}
- aria-label="Adjust clip end"
- title="Adjust clip end"
+ <button
+ type="button"
+ onPointerDown={(e) => startDrag("start", e)}
+ aria-label={t("editClipDialog.adjustStart")}
+ title={t("editClipDialog.adjustStart")}
+ style={{
+ position: "absolute",
+ left: -6,
+ top: 0,
+ bottom: 0,
+ width: 12,
+ cursor: "ew-resize",
+ background: "var(--accent)",
+ border: 0,
+ borderRadius: 3,
+ padding: 0,
+ }}
+ />
+ <span
+ style={{
+ font: "500 11px/1.4 var(--font-mono)",
+ color: "var(--accent-on)",
+ pointerEvents: "none",
+ whiteSpace: "nowrap",
+ }}
+ >
+ {formatSeconds(draftStart)}–{formatSeconds(draftEnd)}
+ </span>
+ <button
+ type="button"
+ onPointerDown={(e) => startDrag("end", e)}
+ aria-label={t("editClipDialog.adjustEnd")}
+ title={t("editClipDialog.adjustEnd")}
+ style={{
+ position: "absolute",
+ right: -6,
+ top: 0,
+ bottom: 0,
+ width: 12,
+ cursor: "ew-resize",
+ background: "var(--accent)",
+ border: 0,
+ borderRadius: 3,
+ padding: 0,
+ }}
+ />
+ </div>
+ <div
style={{
position: "absolute",
- right: -6,
top: 0,
bottom: 0,
- width: 12,
- cursor: "ew-resize",
- background: "var(--accent)",
- border: 0,
- borderRadius: 3,
- padding: 0,
+ right: 0,
+ width: `${Math.max(0, ((sourceDurationSec - draftEnd) / sourceDurationSec) * 100)}%`,
+ background: "var(--overlay-dark)",
+ borderRadius: "0 var(--r-sm) var(--r-sm) 0",
}}
/>
</div>
+ </div>
+
+ <div
+ style={{
+ paddingTop: 8,
+ marginTop: 8,
+ flexShrink: 0,
+ borderTop: "1px solid var(--border-soft)",
+ }}
+ >
<div
style={{
- position: "absolute",
- top: 0,
- bottom: 0,
- right: 0,
- width: `${Math.max(0, ((sourceDurationSec - draftEnd) / sourceDurationSec) * 100)}%`,
- background: "var(--overlay-dark)",
- borderRadius: "0 var(--r-sm) var(--r-sm) 0",
+ display: "grid",
+ gridTemplateColumns: "repeat(4, 1fr) 1.2fr auto",
+ gap: 10,
+ alignItems: "end",
}}
- />
+ >
+ <CropField
+ label={t("cropDialog.fieldX")}
+ value={cropXPct}
+ onChange={(v) => {
+ setCropTouched(true);
+ setCropXPct(v);
+ }}
+ />
+ <CropField
+ label={t("cropDialog.fieldY")}
+ value={cropYPct}
+ onChange={(v) => {
+ setCropTouched(true);
+ setCropYPct(v);
+ }}
+ />
+ <CropField
+ label={t("cropDialog.fieldW")}
+ value={cropWPct}
+ onChange={(v) => {
+ setCropTouched(true);
+ setCropWPct(v);
+ }}
+ />
+ <CropField
+ label={t("cropDialog.fieldH")}
+ value={cropHPct}
+ onChange={(v) => {
+ setCropTouched(true);
+ setCropHPct(v);
+ }}
+ />
+ <div style={{ display: "flex", flexDirection: "column", gap: 4, minWidth: 110 }}>
+ <label
+ style={{
+ font: "600 10px/1 var(--font-mono)",
+ letterSpacing: "0.04em",
+ textTransform: "uppercase",
+ color: "var(--muted)",
+ }}
+ >
+ {ts("crop.ratio")}
+ </label>
+ <select
+ value={cropRatio}
+ onChange={(e) => handleCropRatioChange(e.target.value)}
+ style={{
+ width: "100%",
+ padding: "8px 10px",
+ font: "500 13px/1 var(--font-body)",
+ color: "var(--fg-2)",
+ background: "var(--surface)",
+ border: "1px solid var(--border)",
+ borderRadius: 6,
+ outline: "none",
+ }}
+ >
+ {CROP_RATIOS.map((r) => (
+ <option key={r.value} value={r.value}>
+ {r.value === "free" ? ts("crop.free") : r.label}
+ </option>
+ ))}
+ </select>
+ </div>
+ <span
+ style={{
+ font: "500 11px/1 var(--font-mono)",
+ color: "var(--muted)",
+ alignSelf: "center",
+ whiteSpace: "nowrap",
+ }}
+ >
+ {cropWPct}% × {cropHPct}%
+ </span>
+ </div>
</div>
<div
@@ -1054,8 +1151,9 @@ export function EditClipModal({
display: "flex",
justifyContent: "space-between",
alignItems: "center",
- paddingTop: 16,
- marginTop: 16,
+ paddingTop: 10,
+ marginTop: 10,
+ flexShrink: 0,
borderTop: "1px solid var(--border-soft)",
}}
>
@@ -1065,7 +1163,7 @@ export function EditClipModal({
onClick={handleReset}
disabled={!hasChanges}
>
- Reset
+ {t("editClipDialog.reset")}
</button>
<div style={{ display: "flex", gap: 8 }}>
<button
@@ -1073,7 +1171,7 @@ export function EditClipModal({
className={`${styles.btn} ${styles.btnSecondary}`}
onClick={onClose}
>
- Cancel
+ {tc("actions.cancel")}
</button>
<button
type="button"
@@ -1082,7 +1180,7 @@ export function EditClipModal({
disabled={!hasChanges}
>
<Pencil size={14} />
- Apply
+ {t("editClipDialog.apply")}
</button>
</div>
</div>
@@ -1109,25 +1207,6 @@ interface UnsavedChangesModalProps extends BaseModalProps {
onChoose: (choice: UnsavedChoice) => void;
}
-const ACTION_COPY: Record<UnsavedChangesModalProps["action"], { title: string; body: string }> = {
- close: {
- title: "Save changes before closing?",
- body: "Your project has unsaved changes. Save them now, discard them, or stay in the editor.",
- },
- new: {
- title: "Save changes before creating a new project?",
- body: "The current project has unsaved changes. Save them first, discard them, or cancel.",
- },
- open: {
- title: "Save changes before opening another project?",
- body: "The current project has unsaved changes. Save them first, discard them, or cancel.",
- },
- record: {
- title: "Save changes before starting a new recording?",
- body: "The current project has unsaved changes. Save them first, discard them, or cancel.",
- },
-};
-
export function UnsavedChangesModal({
open,
onClose,
@@ -1135,7 +1214,18 @@ export function UnsavedChangesModal({
busy,
onChoose,
}: UnsavedChangesModalProps) {
- const copy = ACTION_COPY[action];
+ const td = useScopedT("dialogs");
+ const tc = useScopedT("common");
+ const titleKeys: Record<UnsavedChangesModalProps["action"], string> = {
+ close: "modal.closeTitle",
+ new: "modal.newTitle",
+ open: "modal.openTitle",
+ record: "modal.recordTitle",
+ };
+ const copy = {
+ title: td(titleKeys[action]),
+ body: action === "close" ? td("modal.closeBody") : td("modal.sharedBody"),
+ };
return (
<ModalShell open={open} onClose={onClose} title={copy.title} subtitle={copy.body}>
<div style={{ display: "flex", alignItems: "center", gap: 10, marginBottom: 4 }}>
@@ -1158,7 +1248,7 @@ export function UnsavedChangesModal({
color: "var(--fg-2)",
}}
>
- The current project has not been saved to disk yet.
+ {td("modal.notSavedYet")}
</div>
</div>
<div
@@ -1176,7 +1266,7 @@ export function UnsavedChangesModal({
onClick={() => onChoose("cancel")}
disabled={busy}
>
- Cancel
+ {tc("actions.cancel")}
</button>
<button
type="button"
@@ -1184,7 +1274,7 @@ export function UnsavedChangesModal({
onClick={() => onChoose("discard")}
disabled={busy}
>
- Discard
+ {td("modal.discard")}
</button>
<button
type="button"
@@ -1192,7 +1282,7 @@ export function UnsavedChangesModal({
onClick={() => onChoose("save")}
disabled={busy}
>
- {busy ? "Saving…" : "Save & continue"}
+ {busy ? td("modal.saving") : td("modal.saveAndContinue")}
</button>
</div>
</ModalShell>
@@ -1220,12 +1310,13 @@ export function InsertSourceModal({
onAddAfter,
onSplit,
}: InsertSourceModalProps) {
+ const t = useScopedT("editor");
return (
<ModalShell
open={open}
onClose={onClose}
- title="Insert source"
- subtitle={`Where to place "${assetLabel}" on the timeline?`}
+ title={t("insertSourceDialog.title")}
+ subtitle={t("insertSourceDialog.subtitle", { assetLabel })}
>
<div style={{ display: "flex", flexDirection: "column", gap: 8 }}>
<button
@@ -1244,9 +1335,9 @@ export function InsertSourceModal({
opacity: canAddBefore ? 1 : 0.5,
}}
>
- <strong>Add before</strong>
+ <strong>{t("insertSourceDialog.addBefore")}</strong>
<div style={{ fontSize: 11, color: "var(--muted)", marginTop: 2 }}>
- Insert the whole source before the target clip.
+ {t("insertSourceDialog.addBeforeDesc")}
</div>
</button>
<button
@@ -1265,9 +1356,9 @@ export function InsertSourceModal({
opacity: canAddAfter ? 1 : 0.5,
}}
>
- <strong>Add after</strong>
+ <strong>{t("insertSourceDialog.addAfter")}</strong>
<div style={{ fontSize: 11, color: "var(--muted)", marginTop: 2 }}>
- Insert the whole source after the target clip.
+ {t("insertSourceDialog.addAfterDesc")}
</div>
</button>
<button
@@ -1286,9 +1377,9 @@ export function InsertSourceModal({
opacity: canSplit ? 1 : 0.5,
}}
>
- <strong>Split here and insert</strong>
+ <strong>{t("insertSourceDialog.split")}</strong>
<div style={{ fontSize: 11, color: "var(--muted)", marginTop: 2 }}>
- Split the target clip at the drop point and insert the source in between.
+ {t("insertSourceDialog.splitDesc")}
</div>
</button>
</div>
@@ -1317,6 +1408,8 @@ export function SourceTranscriptModal({
isFailed,
onRegenerate,
}: SourceTranscriptModalProps) {
+ const t = useScopedT("editor");
+ const tc = useScopedT("common");
const videoRef = useRef<HTMLVideoElement | null>(null);
const [isPlaying, setIsPlaying] = useState(false);
const [playTime, setPlayTime] = useState(0);
@@ -1349,18 +1442,18 @@ export function SourceTranscriptModal({
transcript?.language && transcript.language !== "auto" ? transcript.language : null;
const statusLabel = isTranscribing
- ? "Generating"
+ ? t("mediaStage.generating")
: isFailed
- ? "Generation failed"
+ ? t("mediaStage.generationFailed")
: transcript
- ? "Generated"
- : "Not generated yet";
+ ? t("mediaStage.generated")
+ : t("mediaStage.notGeneratedYet");
const transcriptBody = transcript
? toAxcutTranscriptDsl(transcript, assetLabel || undefined, duration ?? undefined)
: null;
- const playLabel = isPlaying ? "Pause" : "Play";
+ const playLabel = isPlaying ? tc("playback.pause") : tc("playback.play");
const togglePlay = () => {
const v = videoRef.current;
@@ -1386,7 +1479,13 @@ export function SourceTranscriptModal({
};
return (
- <ModalShell open={open} onClose={onClose} title="Source Transcript" subtitle={assetLabel} wide>
+ <ModalShell
+ open={open}
+ onClose={onClose}
+ title={t("mediaStage.sourceTranscript")}
+ subtitle={assetLabel}
+ wide
+ >
<div
style={{
display: "grid",
@@ -1432,7 +1531,7 @@ export function SourceTranscriptModal({
font: "500 12px var(--font-body)",
}}
>
- No preview available
+ {t("mediaStage.noPreviewAvailable")}
</div>
)}
<div
@@ -1491,8 +1590,8 @@ export function SourceTranscriptModal({
</button>
<button
type="button"
- aria-label="Restart"
- title="Restart"
+ aria-label={t("mediaStage.restart")}
+ title={t("mediaStage.restart")}
onClick={restart}
style={{
background: "transparent",
@@ -1510,8 +1609,8 @@ export function SourceTranscriptModal({
</button>
<button
type="button"
- aria-label="Fullscreen"
- title="Fullscreen"
+ aria-label={tc("playback.fullscreen")}
+ title={tc("playback.fullscreen")}
onClick={requestFullscreen}
style={{
background: "transparent",
@@ -1550,7 +1649,7 @@ export function SourceTranscriptModal({
boxShadow: "0 0 0 3px var(--accent-soft)",
marginLeft: 6,
}}
- aria-label="Transcribing"
+ aria-label={t("mediaStage.transcribing")}
/>
) : (
<span
@@ -1611,7 +1710,7 @@ export function SourceTranscriptModal({
border: "1px solid color-mix(in srgb, var(--success) 22%, transparent)",
}}
>
- Detected language: {detectedLanguage}
+ {t("mediaStage.detectedLanguage", { language: detectedLanguage })}
</span>
) : null}
</div>
@@ -1622,7 +1721,7 @@ export function SourceTranscriptModal({
color: "var(--muted)",
}}
>
- Regenerate as
+ {t("mediaStage.regenerateAs")}
</label>
<div
style={{
@@ -1633,7 +1732,7 @@ export function SourceTranscriptModal({
}}
>
<select
- aria-label="Regenerate as"
+ aria-label={t("mediaStage.regenerateAs")}
value={regenLang}
disabled={isTranscribing}
onChange={(e) => setRegenLang(e.target.value as TranscriptLanguage)}
@@ -1649,14 +1748,14 @@ export function SourceTranscriptModal({
>
{REGEN_LANGUAGES.map((code) => (
<option key={code} value={code}>
- {LANGUAGE_LABELS[code]}
+ {code === "auto" ? t("mediaStage.auto") : LANGUAGE_LABELS[code]}
</option>
))}
</select>
<button
type="button"
- title="Regenerate"
- aria-label="Regenerate"
+ title={t("mediaStage.regenerate")}
+ aria-label={t("mediaStage.regenerate")}
disabled={isTranscribing}
onClick={() => onRegenerate(regenLang)}
style={{
@@ -1712,10 +1811,10 @@ export function SourceTranscriptModal({
}}
>
{isFailed
- ? "Generation failed — pick a language and regenerate."
+ ? t("mediaStage.generationFailedHint")
: isTranscribing
- ? "Transcribing…"
- : "Not generated yet — pick a language and click regenerate."}
+ ? t("mediaStage.transcribingEllipsis")
+ : t("mediaStage.notGeneratedHint")}
</div>
)}
</ModalShell>
@@ -1739,12 +1838,14 @@ export function AutoCaptionsModal({
onMaxWords,
onGenerate,
}: CaptionsModalProps) {
+ const t = useScopedT("editor");
+ const tc = useScopedT("common");
return (
<ModalShell
open={open}
onClose={onClose}
- title="Auto captions"
- subtitle="Choose roughly how many words each caption shows at once. Timing is spread across the words in that phrase."
+ title={t("autoCaptions.dialogTitle")}
+ subtitle={t("autoCaptions.dialogDescription")}
>
<div style={{ display: "flex", gap: 12 }}>
<div style={{ display: "flex", flexDirection: "column", gap: 4, flex: 1 }}>
@@ -1756,7 +1857,7 @@ export function AutoCaptionsModal({
color: "var(--muted)",
}}
>
- Min words per caption
+ {t("autoCaptions.minWords")}
</label>
<select
value={minWords}
@@ -1772,7 +1873,7 @@ export function AutoCaptionsModal({
>
{Array.from({ length: 12 }, (_, i) => i + 1).map((n) => (
<option key={n} value={n}>
- {n} word{n === 1 ? "" : "s"}
+ {t("autoCaptions.wordsCount", { count: n })}
</option>
))}
</select>
@@ -1786,7 +1887,7 @@ export function AutoCaptionsModal({
color: "var(--muted)",
}}
>
- Max words per caption
+ {t("autoCaptions.maxWords")}
</label>
<select
value={maxWords}
@@ -1802,7 +1903,7 @@ export function AutoCaptionsModal({
>
{Array.from({ length: 12 }, (_, i) => i + 1).map((n) => (
<option key={n} value={n} disabled={n < minWords}>
- {n} word{n === 1 ? "" : "s"}
+ {t("autoCaptions.wordsCount", { count: n })}
</option>
))}
</select>
@@ -1818,10 +1919,10 @@ export function AutoCaptionsModal({
}}
>
<button type="button" className={`${styles.btn} ${styles.btnSecondary}`} onClick={onClose}>
- Cancel
+ {tc("actions.cancel")}
</button>
<button type="button" className={`${styles.btn} ${styles.btnPrimary}`} onClick={onGenerate}>
- Generate
+ {t("autoCaptions.generate")}
</button>
</div>
</ModalShell>
@@ -1844,12 +1945,14 @@ export function ChatHistoryModal({
onNew: _onNew,
}: ChatHistoryModalProps) {
void _onNew;
+ const t = useScopedT("editor");
+ const tc = useScopedT("common");
return (
<ModalShell
open={open}
onClose={onClose}
- title="Conversation history"
- subtitle="Switch or create sessions"
+ title={t("chat.historyDialog.title")}
+ subtitle={t("chat.historyDialog.subtitle")}
>
{sessions.length === 0 ? (
<div
@@ -1860,7 +1963,7 @@ export function ChatHistoryModal({
font: "500 13px var(--font-body)",
}}
>
- No conversations yet.
+ {t("chat.historyDialog.empty")}
</div>
) : (
<div style={{ display: "flex", flexDirection: "column", gap: 4 }}>
@@ -1891,7 +1994,10 @@ export function ChatHistoryModal({
>
<span style={{ fontWeight: isActive ? 600 : 500 }}>{s.title}</span>
<span style={{ font: "500 11px/1 var(--font-mono)", color: "var(--muted)" }}>
- {s.messageCount} msgs · {new Date(s.createdAt).toLocaleDateString()}
+ {t("chat.historyDialog.msgsCount", {
+ count: s.messageCount,
+ date: new Date(s.createdAt).toLocaleDateString(),
+ })}
</span>
</button>
);
@@ -1908,7 +2014,7 @@ export function ChatHistoryModal({
}}
>
<button type="button" className={`${styles.btn} ${styles.btnSecondary}`} onClick={onClose}>
- Close
+ {tc("actions.close")}
</button>
</div>
</ModalShell>
diff --git a/src/components/ai-edition/NewEditorShell.module.css b/src/components/ai-edition/NewEditorShell.module.css
index 8b017fd34..f16303839 100644
--- a/src/components/ai-edition/NewEditorShell.module.css
+++ b/src/components/ai-edition/NewEditorShell.module.css
@@ -736,20 +736,6 @@
letter-spacing: 0.06em;
text-transform: uppercase;
}
-.previewBadge {
- position: absolute;
- top: var(--sp-3);
- right: var(--sp-3);
- padding: 4px 8px;
- border-radius: var(--r-xs);
- background: var(--overlay-light);
- color: var(--fg);
- font-family: var(--font-mono);
- font-size: 10px;
- letter-spacing: 0.02em;
- font-weight: 500;
- backdrop-filter: blur(8px);
-}
.bgBlur {
position: absolute;
inset: 0;
@@ -787,19 +773,6 @@
object-fit: cover;
display: block;
}
-.previewTimecode {
- position: absolute;
- top: var(--sp-3);
- left: var(--sp-3);
- padding: 4px 8px;
- border-radius: var(--r-xs);
- background: var(--overlay-dark);
- color: var(--bg);
- font-family: var(--font-mono);
- font-size: 11px;
- letter-spacing: 0.02em;
-}
-
/* ─── transport bar (lives inside .timelineHead, next to the tool icons) ─ */
.transport {
display: flex;
@@ -1005,7 +978,7 @@
height: 20px;
border: 0;
padding: 0;
- background: var(--border);
+ background: var(--border-hi);
border-radius: 9999px;
position: relative;
cursor: pointer;
@@ -1031,8 +1004,8 @@
/* ─── slider cell (effect) ─────────────────────────────────────── */
.sliderGrid {
display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 10px;
+ grid-template-columns: 1fr;
+ gap: 8px;
padding: 0 var(--sp-4) var(--sp-4);
}
.sliderCell {
@@ -1050,7 +1023,7 @@
.sliderCell input[type=range] {
width: 100%;
height: 4px;
- background: var(--border);
+ background: var(--border-hi);
border-radius: 2px;
outline: none;
-webkit-appearance: none;
@@ -1893,7 +1866,7 @@
left: 0;
right: 0;
height: 4px;
- background: var(--border);
+ background: var(--border-hi);
border-radius: 9999px;
overflow: hidden;
}
diff --git a/src/components/ai-edition/NewEditorShell.tsx b/src/components/ai-edition/NewEditorShell.tsx
index 6553d0db4..0c2c6e9d5 100644
--- a/src/components/ai-edition/NewEditorShell.tsx
+++ b/src/components/ai-edition/NewEditorShell.tsx
@@ -2,22 +2,22 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { toast } from "sonner";
import type { EditorProjectData } from "@/components/video-editor/projectPersistence";
import { toFileUrl } from "@/components/video-editor/projectPersistence";
-import type { CropRegion } from "@/components/video-editor/types";
import { useShortcuts } from "@/contexts/ShortcutsContext";
import { migrateProjectDataToAxcutDocument } from "@/lib/ai-edition/document/migrate";
+import { replaceTimeline as replaceTimelineOp } from "@/lib/ai-edition/document/timeline";
import { transcribeAsset } from "@/lib/ai-edition/document/transcribe";
import type { AxcutClip } from "@/lib/ai-edition/schema";
import { useProjectStore } from "@/lib/ai-edition/store/projectStore";
import { useUndoRedoShortcuts } from "@/lib/ai-edition/store/undo";
-import { useEditorSettings } from "@/lib/ai-edition/store/useEditorSettings";
import { PLACEHOLDER_DURATION_SEC, useTimeline } from "@/lib/ai-edition/store/useTimeline";
+import { matchesShortcut } from "@/lib/shortcuts";
import { nativeBridgeClient } from "@/native";
import type { AiEditionProjectSummary } from "@/native/contracts";
import { ExportDialog } from "./ExportDialog";
import { LeftPanel } from "./LeftPanel";
import {
AutoCaptionsModal,
- CropModal,
+ EditClipModal,
NewProjectModal,
OpenProjectModal,
UnsavedChangesModal,
@@ -27,7 +27,6 @@ import { Preview } from "./Preview";
import v4 from "./v4/EditorShellV4.module.css";
import { type EditorMode, EditorTopBar } from "./v4/EditorTopBar";
import { type Facet, FloatingInspector } from "./v4/FloatingInspector";
-import { FloatingTransport } from "./v4/FloatingTransport";
import { MediaStage } from "./v4/MediaStage";
import { RecStage } from "./v4/RecStage";
import { V4Timeline } from "./v4/V4Timeline";
@@ -73,14 +72,17 @@ export function NewEditorShell() {
const [facet, setFacet] = useState<Facet>("effects");
const [openProjectOpen, setOpenProjectOpen] = useState(false);
const [newProjectOpen, setNewProjectOpen] = useState(false);
- const [cropOpen, setCropOpen] = useState(false);
+ // Crop + trim in/out both live in EditClipModal now (per-clip), reachable
+ // from the timeline (double-click / pencil icon) and the inspector's
+ // "Edit clip" rail button — a single shell-level instance instead of one
+ // mounted per trigger site.
+ const [editClipTarget, setEditClipTarget] = useState<AxcutClip | null>(null);
const [exportOpen, setExportOpen] = useState(false);
const [unsavedPrompt, setUnsavedPrompt] = useState<{
action: "close" | "new" | "open" | "record";
resolve: (choice: UnsavedChoice) => void;
} | null>(null);
- const { settings: editorSettings, set: setEditorSettings } = useEditorSettings();
- const { openConfig: openShortcutsConfig } = useShortcuts();
+ const { shortcuts, isMac, openConfig: openShortcutsConfig } = useShortcuts();
const tl = useTimeline();
useUndoRedoShortcuts(() => {
// ponytail: placeholder, wire when undo stack merges with history
@@ -290,10 +292,25 @@ export function NewEditorShell() {
const doc = state.document;
if (!doc || doc.assets.length === 0) return;
if (doc.timeline.clips.length === 0) {
- void state.replaceTimeline(
+ // ponytail: replaceTimeline derives clip length from
+ // asset.durationSec, which import never populates — without this
+ // patch the first auto-created clip silently comes out empty
+ // (normalizeIntervals clamps against a 0 duration and drops it).
+ const primaryAssetId = doc.project.primaryAssetId ?? doc.assets[0]?.id;
+ const docWithDuration = primaryAssetId
+ ? {
+ ...doc,
+ assets: doc.assets.map((a) =>
+ a.id === primaryAssetId ? { ...a, durationSec: known } : a,
+ ),
+ }
+ : doc;
+ const next = replaceTimelineOp(
+ docWithDuration,
[{ startSec: 0, endSec: known }],
"Auto-created full-duration clip",
);
+ void state.saveDocument(next);
return;
}
// Only correct clips belonging to the asset that actually fired this
@@ -855,13 +872,29 @@ export function NewEditorShell() {
return;
}
if (!hasProject && e.key !== "?") return;
- if (ctrl && e.key === "z") return;
+ if (ctrl && (e.key === "z" || e.key.toLowerCase() === "y")) return;
if (e.key === "?" || (e.shiftKey && e.key === "/")) {
e.preventDefault();
- window.dispatchEvent(new CustomEvent("openscreen:open-shortcuts"));
+ openShortcutsConfig();
return;
}
- if (ctrl && e.key.toLowerCase() === "c") {
+
+ const deleteSelection = () => {
+ // F2.7 — a shift-click multi-selection deletes as one batch (one
+ // undo snapshot); a single selection keeps the original path.
+ if (tl.multiSelection.length > 1) {
+ void tl.removeRegions(tl.multiSelection);
+ return;
+ }
+ if (tl.selection) {
+ void tl.removeRegion(tl.selection.kind, tl.selection.id);
+ }
+ };
+
+ // F2.9 — configurable actions read the user's saved bindings instead
+ // of hardcoded keys, so rebinding in the shortcuts dialog actually
+ // changes runtime behavior.
+ if (matchesShortcut(e, shortcuts.copySelected, isMac)) {
if (tl.clipSelection) {
e.preventDefault();
setCopiedClipId(tl.clipSelection);
@@ -882,7 +915,7 @@ export function NewEditorShell() {
return;
}
}
- if (ctrl && e.key.toLowerCase() === "v") {
+ if (matchesShortcut(e, shortcuts.paste, isMac)) {
e.preventDefault();
// A selected/copied clip takes priority — pasting with a clip in
// hand is unambiguously "duplicate this clip", even if a region
@@ -895,51 +928,66 @@ export function NewEditorShell() {
void pasteRegion();
return;
}
- if (e.key === " ") {
- const v = window.document.querySelector("video");
- if (v) {
- e.preventDefault();
- if (v.paused) {
- void v.play();
- } else {
- v.pause();
- }
- }
+ if (matchesShortcut(e, shortcuts.playPause, isMac)) {
+ e.preventDefault();
+ togglePlay();
+ return;
+ }
+ if (matchesShortcut(e, shortcuts.deleteSelected, isMac)) {
+ e.preventDefault();
+ deleteSelection();
return;
}
if (e.key === "Delete" || e.key === "Backspace") {
- // F2.7 — a shift-click multi-selection deletes as one batch (one
- // undo snapshot); a single selection keeps the original path.
- if (tl.multiSelection.length > 1) {
- e.preventDefault();
- void tl.removeRegions(tl.multiSelection);
- return;
- }
- if (tl.selection) {
+ e.preventDefault();
+ deleteSelection();
+ return;
+ }
+ if (matchesShortcut(e, shortcuts.addZoom, isMac)) {
+ e.preventDefault();
+ void tl.addZoom();
+ return;
+ }
+ if (matchesShortcut(e, shortcuts.addTrim, isMac)) {
+ e.preventDefault();
+ void tl.addTrim();
+ return;
+ }
+ if (matchesShortcut(e, shortcuts.addAnnotation, isMac)) {
+ e.preventDefault();
+ void tl.addAnnotation();
+ return;
+ }
+ if (matchesShortcut(e, shortcuts.addSpeed, isMac)) {
+ e.preventDefault();
+ void tl.addSpeed();
+ return;
+ }
+
+ // Fixed (non-configurable) shortcuts advertised in the shortcuts dialog.
+ if (e.key === "Tab") {
+ const annotations = [...tl.annotationRegions].sort((a, b) => a.startMs - b.startMs);
+ if (annotations.length > 0) {
e.preventDefault();
- void tl.removeRegion(tl.selection.kind, tl.selection.id);
+ const direction = e.shiftKey ? -1 : 1;
+ const currentId = tl.selection?.kind === "annotation" ? tl.selection.id : null;
+ const currentIndex = currentId ? annotations.findIndex((a) => a.id === currentId) : -1;
+ const nextIndex =
+ currentIndex === -1
+ ? direction === 1
+ ? 0
+ : annotations.length - 1
+ : (currentIndex + direction + annotations.length) % annotations.length;
+ tl.selectRegion("annotation", annotations[nextIndex].id);
}
return;
}
- switch (e.key.toLowerCase()) {
- case "z":
- if (!ctrl) {
- e.preventDefault();
- void tl.addZoom();
- }
- break;
- case "t":
- e.preventDefault();
- void tl.addTrim();
- break;
- case "a":
- e.preventDefault();
- void tl.addAnnotation();
- break;
- case "s":
- e.preventDefault();
- void tl.addSpeed();
- break;
+ if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
+ e.preventDefault();
+ const frameStepSec = 1 / 60;
+ const direction = e.key === "ArrowLeft" ? -1 : 1;
+ handleSeek(Math.max(0, currentTimeSec + direction * frameStepSec));
+ return;
}
};
window.addEventListener("keydown", onKey);
@@ -953,6 +1001,12 @@ export function NewEditorShell() {
promptUnsaved,
saveDocument,
copiedClipId,
+ openShortcutsConfig,
+ shortcuts,
+ isMac,
+ togglePlay,
+ handleSeek,
+ currentTimeSec,
]);
const showTimeline = mode !== "rec";
@@ -1075,13 +1129,16 @@ export function NewEditorShell() {
style={{
position: "absolute",
inset: 0,
- // Reserves room for the floating inspector on the right
- // so the video resizes into the remaining space instead
- // of sitting underneath the panel. The transport bar is
- // a hover-reveal overlay (see .transportWrap) rather than
- // permanent chrome, so it no longer reserves bottom space
- // — the video is free to extend underneath it.
- padding: `40px ${inspectorOpen ? 360 : 96}px 40px 80px`,
+ // Right padding reserves just enough room for the floating
+ // inspector (facet rail ~74px, or the full panel ~320px when
+ // open) so the video resizes into the remaining space instead
+ // of sitting underneath it. Nothing floats over the other
+ // edges — playback transport lives in the timeline header
+ // (TransportBar, rendered from V4Timeline) instead of
+ // overlaying the preview — so top/bottom/left only need a
+ // thin margin off the stage's rounded corners, not a large
+ // fixed chunk that dwarfs the card on smaller windows.
+ padding: `16px ${inspectorOpen ? 320 : 74}px 16px 16px`,
boxSizing: "border-box",
}}
>
@@ -1122,17 +1179,6 @@ export function NewEditorShell() {
playing={playing}
/>
</div>
- <FloatingTransport
- playing={playing}
- loop={loop}
- currentTimeSec={currentTimeSec}
- clips={clips}
- onTogglePlay={togglePlay}
- onPrevClip={handlePrevClip}
- onNextClip={handleNextClip}
- onToggleLoop={handleToggleLoop}
- onExpand={handleExpand}
- />
<FloatingInspector
facet={facet}
open={inspectorOpen}
@@ -1142,7 +1188,8 @@ export function NewEditorShell() {
setInspectorOpen(true);
}}
onToggleOpen={() => setInspectorOpen((v) => !v)}
- onCrop={() => setCropOpen(true)}
+ clips={tl.clips}
+ onEditClip={setEditClipTarget}
onCaptions={handleCaptions}
transcriptProps={transcriptProps}
/>
@@ -1187,6 +1234,14 @@ export function NewEditorShell() {
variant={mode === "media" ? "media" : "edit"}
onDropAsset={(assetId) => void tl.insertClipAt(assetId, clips.length)}
videoSources={videoSources}
+ playing={playing}
+ loop={loop}
+ onTogglePlay={togglePlay}
+ onPrevClip={handlePrevClip}
+ onNextClip={handleNextClip}
+ onToggleLoop={handleToggleLoop}
+ onExpand={handleExpand}
+ onEditClip={setEditClipTarget}
/>
</div>
) : null}
@@ -1205,13 +1260,28 @@ export function NewEditorShell() {
onClose={() => setNewProjectOpen(false)}
onCreate={handleCreateProject}
/>
- <CropModal
- open={cropOpen}
- onClose={() => setCropOpen(false)}
- initialRegion={editorSettings.cropRegion}
- onApply={(region: CropRegion) => void setEditorSettings({ cropRegion: region })}
+ <EditClipModal
+ open={editClipTarget !== null}
+ onClose={() => setEditClipTarget(null)}
+ clip={editClipTarget}
+ assetMeta={
+ editClipTarget
+ ? {
+ label:
+ document?.assets.find((a) => a.id === editClipTarget.assetId)?.label ??
+ editClipTarget.assetId,
+ durationSec: document?.assets.find((a) => a.id === editClipTarget.assetId)
+ ?.durationSec,
+ }
+ : null
+ }
videoSources={videoSources}
- currentTimeSec={currentTimeSec}
+ onApply={(sStart, sEnd, cropRegion) => {
+ if (!editClipTarget) return;
+ void tl.updateClipSourceRange(editClipTarget.id, sStart, sEnd);
+ if (cropRegion !== undefined) void tl.updateClipCrop(editClipTarget.id, cropRegion);
+ setEditClipTarget(null);
+ }}
/>
<UnsavedChangesModal
open={unsavedPrompt !== null}
diff --git a/src/components/ai-edition/Preview.tsx b/src/components/ai-edition/Preview.tsx
index 4e68d1ac6..1df426d10 100644
--- a/src/components/ai-edition/Preview.tsx
+++ b/src/components/ai-edition/Preview.tsx
@@ -6,7 +6,6 @@ import type {
AxcutTrimRange,
AxcutZoomRegion,
} from "@/lib/ai-edition/schema";
-import { useEditorSettings } from "@/lib/ai-edition/store/useEditorSettings";
import type { SpeedRegion } from "@/lib/ai-edition/timeline/speed";
import { EditorEmptyState } from "./EditorEmptyState";
import styles from "./NewEditorShell.module.css";
@@ -45,13 +44,6 @@ interface PreviewProps {
playing: boolean;
}
-function formatTC(sec: number): string {
- if (!sec || !Number.isFinite(sec) || sec < 0) sec = 0;
- const m = Math.floor(sec / 60);
- const s = (sec % 60).toFixed(1);
- return `${m}:${s.padStart(4, "0")}`;
-}
-
export function Preview({
hasProject,
hasAsset,
@@ -92,9 +84,6 @@ export function Preview({
}
}, [activeSourceKey]);
- const { settings: editorSettings } = useEditorSettings();
- const aspectRatioLabel = editorSettings.aspectRatio;
-
return (
<section
className={styles.previewWrap}
@@ -131,14 +120,6 @@ export function Preview({
) : (
<EditorEmptyState hasProject={hasProject} />
)}
- {hasProject && hasAsset ? (
- <span className={styles.previewTimecode}>{formatTC(currentTimeSec)}</span>
- ) : null}
- {hasProject && hasAsset ? (
- <span className={styles.previewBadge}>
- {editorSettings.cursorShow ? "Cursor on" : "Cursor off"} · {aspectRatioLabel} · 60 fps
- </span>
- ) : null}
</section>
);
}
diff --git a/src/components/ai-edition/PreviewCanvas.tsx b/src/components/ai-edition/PreviewCanvas.tsx
index c130753a6..2c9f06074 100644
--- a/src/components/ai-edition/PreviewCanvas.tsx
+++ b/src/components/ai-edition/PreviewCanvas.tsx
@@ -24,10 +24,12 @@
import type { PointerEvent as ReactPointerEvent } from "react";
import { useEffect, useMemo, useRef, useState } from "react";
-import type {
- WebcamLayoutPreset,
- WebcamMaskShape,
- ZoomFocus,
+import {
+ type CropRegion,
+ DEFAULT_CROP_REGION,
+ type WebcamLayoutPreset,
+ type WebcamMaskShape,
+ type ZoomFocus,
} from "@/components/video-editor/types";
import type {
AxcutAnnotationRegion,
@@ -40,6 +42,7 @@ import { useEditorSettings } from "@/lib/ai-edition/store/useEditorSettings";
import { resolveActiveCameraTrack } from "@/lib/ai-edition/timeline/camera";
import { createPlaybackClockRef } from "@/lib/ai-edition/timeline/playback-clock";
import type { SpeedRegion } from "@/lib/ai-edition/timeline/speed";
+import { locateVirtualPosition } from "@/lib/ai-edition/timeline/virtual-preview";
import {
computeCompositeLayout,
getWebcamLayoutCssBoxShadow,
@@ -81,6 +84,14 @@ interface PreviewCanvasProps {
onVideoError?: () => void;
}
+// ponytail: fallback only — used until the active source's <video> reports
+// its real intrinsic size via onLoadedMetadata. Nothing in the import/record
+// pipeline ever probes/stores a recording's actual resolution (AxcutAsset's
+// `video.width/height` is never populated), so without this the composite
+// layout always assumed 16:9 regardless of the real capture — a recording at
+// any other aspect then letterboxed a SECOND time inside its own screenRect
+// (the <video> contain-fits its true ratio within a box sized for the wrong
+// one), on top of the intentional `settings.padding` margin.
const SCREEN_SOURCE_SIZE = { width: 1920, height: 1080 };
// ponytail: live preview defaults until the camera <video> reports its real
// dimensions via loadedmetadata. 4:3 is the legacy default — typical webcams
@@ -99,6 +110,13 @@ export function PreviewCanvas(props: PreviewCanvasProps) {
if (!clockRefHolder.current) clockRefHolder.current = createPlaybackClockRef();
const clockRef = clockRefHolder.current;
const [canvasSize, setCanvasSize] = useState({ width: 1280, height: 720 });
+ // Real dimensions of the active source, from the <video>'s own
+ // onLoadedMetadata (videoWidth/videoHeight) — null until the first source
+ // loads, then falls back to SCREEN_SOURCE_SIZE.
+ const [screenNativeSize, setScreenNativeSize] = useState<{
+ width: number;
+ height: number;
+ } | null>(null);
// ponytail: contain-fit the frame within its wrapper ourselves. CSS
// `aspect-ratio` + `width: 100%` + `max-height: 100%` only clamps height —
// it never shrinks width back down to match, so portrait ratios (9:16 etc)
@@ -106,6 +124,19 @@ export function PreviewCanvas(props: PreviewCanvasProps) {
// (not the frame, which we're about to size) lets us compute an explicit
// pixel box that actually respects the ratio on both axes.
const [containerSize, setContainerSize] = useState({ width: 1280, height: 720 });
+ // ponytail: StrictMode's dev-only mount→cleanup→remount double-invoke
+ // creates a fresh ResizeObserver, disconnects it, then creates ANOTHER
+ // fresh one observing the same element in the same tick. Chromium
+ // silently drops all FUTURE notifications for that element when this
+ // exact disconnect-then-immediately-recreate pattern happens (confirmed
+ // live: a raw counter in the callback never incremented past the initial
+ // synchronous calls, even across a real viewport resize) — the frame
+ // would freeze at its first-paint size and never resize again. Holding
+ // the observer instance in a ref (surviving the double-invoke, since
+ // only the effect body reruns) and just toggling observe/unobserve on it
+ // avoids ever recreating the instance, which sidesteps the bug.
+ const containerObserverRef = useRef<ResizeObserver | null>(null);
+ const canvasObserverRef = useRef<ResizeObserver | null>(null);
useEffect(() => {
const el = frameRef.current?.parentElement;
@@ -127,9 +158,12 @@ export function PreviewCanvas(props: PreviewCanvasProps) {
};
update();
if (typeof ResizeObserver === "undefined") return;
- const observer = new ResizeObserver(update);
+ if (!containerObserverRef.current) {
+ containerObserverRef.current = new ResizeObserver(update);
+ }
+ const observer = containerObserverRef.current;
observer.observe(el);
- return () => observer.disconnect();
+ return () => observer.unobserve(el);
}, []);
useEffect(() => {
@@ -142,9 +176,12 @@ export function PreviewCanvas(props: PreviewCanvasProps) {
});
update();
if (typeof ResizeObserver === "undefined") return;
- const observer = new ResizeObserver(update);
+ if (!canvasObserverRef.current) {
+ canvasObserverRef.current = new ResizeObserver(update);
+ }
+ const observer = canvasObserverRef.current;
observer.observe(el);
- return () => observer.disconnect();
+ return () => observer.unobserve(el);
}, []);
const frameSize = useMemo(() => {
@@ -160,6 +197,16 @@ export function PreviewCanvas(props: PreviewCanvasProps) {
return { width: Math.round(width), height: Math.round(width / ratio) };
}, [containerSize, settings.aspectRatio]);
+ // Crop is per-clip (see clipSchema.cropRegion) — resolve it from whichever
+ // clip the playhead is currently inside, the same lookup VirtualPreview
+ // itself uses to map playback position back to a clip. `undefined` (no
+ // crop stored) normalises to the identity region.
+ const activeClip = useMemo(
+ () => locateVirtualPosition(props.clips, props.currentTimeSec)?.clip ?? null,
+ [props.clips, props.currentTimeSec],
+ );
+ const cropRegion: CropRegion = activeClip?.cropRegion ?? DEFAULT_CROP_REGION;
+
const layout = useMemo(() => {
const preset = settings.webcamLayoutPreset as WebcamLayoutPreset;
const mask = settings.webcamMaskShape as WebcamMaskShape;
@@ -173,10 +220,19 @@ export function PreviewCanvas(props: PreviewCanvasProps) {
width: Math.round(canvasSize.width * paddingFit),
height: Math.round(canvasSize.height * paddingFit),
};
+ // The screen box must be fit to the CROPPED aspect ratio, not the full
+ // source frame's — otherwise VirtualPreview's crop math (which assumes
+ // its container is already correctly proportioned for the crop) would
+ // stretch the video to fill a mis-shaped box.
+ const fullScreenSize = screenNativeSize ?? SCREEN_SOURCE_SIZE;
+ const croppedScreenSize = {
+ width: Math.max(1, Math.round(fullScreenSize.width * cropRegion.width)),
+ height: Math.max(1, Math.round(fullScreenSize.height * cropRegion.height)),
+ };
return computeCompositeLayout({
canvasSize,
maxContentSize,
- screenSize: SCREEN_SOURCE_SIZE,
+ screenSize: croppedScreenSize,
webcamSize: settings.webcamLayoutPreset === "no-webcam" ? null : WEBCAM_SOURCE_SIZE,
layoutPreset: preset,
webcamSizePreset: settings.webcamSizePreset,
@@ -189,6 +245,8 @@ export function PreviewCanvas(props: PreviewCanvasProps) {
});
}, [
canvasSize,
+ screenNativeSize,
+ cropRegion,
settings.webcamLayoutPreset,
settings.webcamMaskShape,
settings.webcamSizePreset,
@@ -225,7 +283,28 @@ export function PreviewCanvas(props: PreviewCanvasProps) {
setIsPlaying(!el?.paused);
setVideoEl(el);
};
- const relayProps = { ...props, onVideoElement: relayIsPlaying, clockRef };
+ const relayLoadedMetadata = (
+ durationSec: number,
+ assetId: string,
+ videoWidth: number,
+ videoHeight: number,
+ ) => {
+ if (videoWidth > 0 && videoHeight > 0) {
+ setScreenNativeSize((prev) =>
+ prev?.width === videoWidth && prev?.height === videoHeight
+ ? prev
+ : { width: videoWidth, height: videoHeight },
+ );
+ }
+ props.onLoadedMetadata(durationSec, assetId);
+ };
+ const relayProps = {
+ ...props,
+ onVideoElement: relayIsPlaying,
+ onLoadedMetadata: relayLoadedMetadata,
+ cropRegion,
+ clockRef,
+ };
const handleWebcamPointerDown = (event: ReactPointerEvent<HTMLDivElement>) => {
if (settings.webcamLayoutPreset !== "picture-in-picture") return;
@@ -294,7 +373,12 @@ export function PreviewCanvas(props: PreviewCanvasProps) {
// See docs/engineering/ai-edition-preview-pixi-rollback.md
// (todo) for the failure write-up.
void relayProps.clockRef;
- return <VirtualPreview {...relayProps} videoStyle={videoBorderRadiusStyle(settings)} />;
+ return (
+ <VirtualPreview
+ {...relayProps}
+ videoStyle={videoBorderRadiusStyle(layout, settings)}
+ />
+ );
})()}
{selectedZoomRegion && props.onZoomFocusChange ? (
<ZoomFocusOverlay
@@ -387,9 +471,11 @@ function buildFrameStyle(
}
// Screen stage: rectangle from the composite layout, converted to percentages
-// of the canvas. NO borderRadius on the container — the rounded corners are
-// applied on the <video> itself so they actually clip the video content
-// rather than drawing a border around it. Box-shadow follows the user's
+// of the canvas. The container carries the SAME borderRadius as the <video>
+// inside it (still clipped via the video's own radius, this is belt-and-
+// braces) — a box-shadow only follows the shape of the element it's applied
+// to, so a square container behind a rounded video drew a squared-off shadow
+// poking out past the video's rounded corners. Box-shadow follows the user's
// `shadowIntensity` setting only — at intensity 0 the stage is flat so it
// bleeds into the canvas cleanly.
function buildScreenStyle(
@@ -402,8 +488,7 @@ function buildScreenStyle(
const shadow = settings.shadowIntensity
? `0 ${4 + settings.shadowIntensity * 20}px ${16 + settings.shadowIntensity * 36}px rgba(0,0,0,${0.18 + settings.shadowIntensity * 0.45})`
: undefined;
- void layout.screenBorderRadius;
- void settings.borderRadius;
+ const borderRadius = layout.screenBorderRadius ?? settings.borderRadius;
return {
position: "absolute",
left: `${(r.x / canvasSize.width) * 100}%`,
@@ -412,19 +497,25 @@ function buildScreenStyle(
height: `${(r.height / canvasSize.height) * 100}%`,
overflow: "hidden",
display: "flex",
+ borderRadius: `${borderRadius}px`,
boxShadow: shadow,
};
}
function videoBorderRadiusStyle(
+ layout: WebcamCompositeLayout | null,
settings: ReturnType<typeof useEditorSettings>["settings"],
): React.CSSProperties {
- return { borderRadius: `${settings.borderRadius}px` };
+ const borderRadius = layout?.screenBorderRadius ?? settings.borderRadius;
+ return { borderRadius: `${borderRadius}px` };
}
-// Webcam slot: full composite-layout rect with mask shape + shadow. NO
-// borderRadius here — the rounded corners live on the <video> inside so they
-// actually clip the camera content rather than drawing a frame around it.
+// Webcam slot: full composite-layout rect with mask shape + shadow. The
+// container's own borderRadius matches r.borderRadius (same radius the inner
+// <video> clips to, and for "circle" that's already a half-dimension radius)
+// so the box-shadow — which only ever follows border-radius, never
+// clip-path — traces the same rounded/circular shape instead of a square
+// poking out behind the masked content.
function buildWebcamStyle(
layout: WebcamCompositeLayout | null,
settings: ReturnType<typeof useEditorSettings>["settings"],
@@ -443,10 +534,9 @@ function buildWebcamStyle(
overflow: "hidden",
display: "flex",
background: "transparent",
+ borderRadius: `${r.borderRadius}px`,
boxShadow: getWebcamLayoutCssBoxShadow(settings.webcamLayoutPreset as WebcamLayoutPreset),
};
- void r.borderRadius;
- void mask;
return clipPath ? { ...base, clipPath } : base;
}
diff --git a/src/components/ai-edition/RightPanes.tsx b/src/components/ai-edition/RightPanes.tsx
index 7233fe2b4..1c37dc55a 100644
--- a/src/components/ai-edition/RightPanes.tsx
+++ b/src/components/ai-edition/RightPanes.tsx
@@ -44,6 +44,7 @@ import {
type ClipSection,
type ClipWord,
findCueWordId,
+ isSilenceWord,
type TrimRun,
} from "@/lib/ai-edition/timeline/aggregated-transcript";
import { hasAnyClipWithCamera } from "@/lib/ai-edition/timeline/camera";
@@ -853,7 +854,9 @@ function TranscriptClipBlock({
key={cw.word.id}
cw={cw}
isCue={cw.word.id === cueWordId}
+ assetId={clip.assetId}
onRestore={removeTrimRun}
+ onAddTrimRange={onAddTrimRange}
/>
))}
</div>
@@ -869,14 +872,94 @@ function TranscriptClipBlock({
function TranscriptWord({
cw,
isCue,
+ assetId,
onRestore,
+ onAddTrimRange,
}: {
cw: ClipWord;
isCue: boolean;
+ assetId: string;
onRestore: (run: TrimRun) => void;
+ onAddTrimRange: (assetId: string, startSec: number, endSec: number, reason: string) => void;
}) {
const [hover, setHover] = useState(false);
const removed = !cw.kept;
+
+ if (isSilenceWord(cw.word)) {
+ const durationSec = cw.word.endSec - cw.word.startSec;
+ const label = `[silence ${durationSec.toFixed(1)}s]`;
+ if (removed) {
+ return (
+ <button
+ type="button"
+ contentEditable={false}
+ data-word-id={cw.word.id}
+ data-silence="true"
+ title={`Restore silence (${durationSec.toFixed(1)}s)`}
+ aria-label={`Restore silence (${durationSec.toFixed(1)}s)`}
+ onClick={(e) => {
+ e.stopPropagation();
+ onRestore({
+ trimId: cw.trimId ?? "",
+ assetId: "",
+ startWordIndex: 0,
+ endWordIndex: 0,
+ durationSec: 0,
+ });
+ }}
+ style={{
+ display: "inline-flex",
+ alignItems: "center",
+ margin: "0 3px 2px 0",
+ padding: "1px 6px",
+ borderRadius: 999,
+ border: "1px solid var(--danger)",
+ background: "var(--danger-soft)",
+ color: "var(--danger)",
+ font: "600 11px/1.5 var(--font-mono)",
+ textDecoration: "line-through",
+ cursor: "pointer",
+ }}
+ >
+ {label}
+ </button>
+ );
+ }
+ return (
+ <button
+ type="button"
+ contentEditable={false}
+ data-word-id={cw.word.id}
+ data-silence="true"
+ title={`Trim silence (${durationSec.toFixed(1)}s)`}
+ aria-label={`Trim silence (${durationSec.toFixed(1)}s)`}
+ onClick={(e) => {
+ e.stopPropagation();
+ onAddTrimRange(
+ assetId,
+ cw.word.startSec,
+ cw.word.endSec,
+ `Skip silence ${formatMs(cw.word.startSec * 1000)}-${formatMs(cw.word.endSec * 1000)}.`,
+ );
+ }}
+ style={{
+ display: "inline-flex",
+ alignItems: "center",
+ margin: "0 3px 2px 0",
+ padding: "1px 6px",
+ borderRadius: 999,
+ border: "1px dashed var(--border-hi)",
+ background: "transparent",
+ color: "var(--muted)",
+ font: "500 11px/1.5 var(--font-mono)",
+ cursor: "pointer",
+ }}
+ >
+ {label}
+ </button>
+ );
+ }
+
return (
<span
data-word-id={cw.word.id}
diff --git a/src/components/ai-edition/VirtualPreview.module.css b/src/components/ai-edition/VirtualPreview.module.css
index 7c9ed195a..f17574b64 100644
--- a/src/components/ai-edition/VirtualPreview.module.css
+++ b/src/components/ai-edition/VirtualPreview.module.css
@@ -15,6 +15,7 @@
display: flex;
align-items: center;
justify-content: center;
+ overflow: hidden;
transform-origin: 0 0;
will-change: transform;
}
@@ -25,6 +26,14 @@
border-radius: 0.5rem;
}
+/* Cropped video: oversized and offset (via inline style, see VirtualPreview.tsx)
+ so only the cropped sub-rect is visible — .videoFrame's overflow:hidden
+ above does the actual clipping. */
+.videoCropped {
+ max-width: none;
+ max-height: none;
+}
+
.overlay {
position: absolute;
display: flex;
diff --git a/src/components/ai-edition/VirtualPreview.tsx b/src/components/ai-edition/VirtualPreview.tsx
index 756d20b47..11d6be942 100644
--- a/src/components/ai-edition/VirtualPreview.tsx
+++ b/src/components/ai-edition/VirtualPreview.tsx
@@ -1,5 +1,6 @@
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { fromFileUrl } from "@/components/video-editor/projectPersistence";
+import { type CropRegion, DEFAULT_CROP_REGION } from "@/components/video-editor/types";
import type { AxcutClip, AxcutTrimRange, AxcutZoomRegion } from "@/lib/ai-edition/schema";
import { useEditorSettings } from "@/lib/ai-edition/store/useEditorSettings";
import type { PlaybackClockRef } from "@/lib/ai-edition/timeline/playback-clock";
@@ -31,10 +32,19 @@ interface VirtualPreviewProps {
trimRanges?: AxcutTrimRange[];
seekTarget?: { timeSec: number; isSource?: boolean; requestId: number } | null;
onTimeChange?: (timeSec: number) => void;
- onLoadedMetadata?: (durationSec: number, assetId: string) => void;
+ onLoadedMetadata?: (
+ durationSec: number,
+ assetId: string,
+ videoWidth: number,
+ videoHeight: number,
+ ) => void;
onVideoElement?: (element: HTMLVideoElement | null) => void;
videoStyle?: React.CSSProperties;
onVideoError?: () => void;
+ /** Crop of the active clip, as fractions (0-1) of the source frame. Absent/
+ * identity ({x:0,y:0,width:1,height:1}) renders the full frame, unchanged
+ * from before crop support existed. */
+ cropRegion?: CropRegion | null;
/**
* Written every rAF tick with this video's live position/rate so other
* media elements (the webcam overlay) can read it directly instead of
@@ -55,14 +65,43 @@ export function VirtualPreview({
onVideoElement,
videoStyle,
onVideoError,
+ cropRegion,
clockRef,
}: VirtualPreviewProps) {
const { settings } = useEditorSettings();
+ // ponytail: an oversized, offset video inside .videoFrame's overflow:hidden
+ // box — the same "scale + negative-position the full frame, let the
+ // container clip the rest" technique the export renderer uses via a Pixi
+ // sprite offset (frameRenderer.ts's updateLayout). Percentages here
+ // resolve against .videoFrame's own (already crop-corrected, see
+ // PreviewCanvas's screenSize) box, so this stays correct at any size
+ // without measuring pixels. Identity crop reduces to 100%/100%/0/0 — the
+ // exact same box the video rendered in before crop support existed.
+ const region = cropRegion ?? DEFAULT_CROP_REGION;
+ const isIdentityCrop =
+ region.x === 0 && region.y === 0 && region.width === 1 && region.height === 1;
+ const cropVideoStyle: React.CSSProperties = isIdentityCrop
+ ? {}
+ : {
+ position: "absolute",
+ width: `${100 / region.width}%`,
+ height: `${100 / region.height}%`,
+ left: `${(-region.x * 100) / region.width}%`,
+ top: `${(-region.y * 100) / region.height}%`,
+ };
const videoRef = useRef<HTMLVideoElement | null>(null);
const videoFrameRef = useRef<HTMLDivElement | null>(null);
const isProgrammaticSeekRef = useRef(false);
const pendingSeekRef = useRef<{ sourceTimeSec: number; play: boolean } | null>(null);
+ // Which clip the rAF tick below believes is currently playing — set
+ // whenever a seek unambiguously resolves one (via locateVirtualPosition,
+ // timeline position → clip). Passed back into locateSourcePosition so
+ // two clips that share the same source asset (and possibly the same
+ // source range) don't get conflated: without this, resolving "current
+ // clip" from (assetId, sourceTime) alone always picks the earliest
+ // matching clip, even while a later one is the one actually playing.
+ const activeClipIdRef = useRef<string | null>(null);
const [virtualTimeSec, setVirtualTimeSec] = useState(0);
const [isPlaying, setIsPlaying] = useState(false);
const [loadState, setLoadState] = useState<"idle" | "loading" | "ready" | "error">("idle");
@@ -174,11 +213,26 @@ export function VirtualPreview({
}
if (isProgrammaticSeekRef.current) {
isProgrammaticSeekRef.current = false;
- const pos = locateSourcePosition(clipsRef.current, v.currentTime, activeSourceId);
- if (pos) updateVirtualTime(clampVirtualTime(clipsRef.current, pos.virtualTimeSec));
+ const pos = locateSourcePosition(
+ clipsRef.current,
+ v.currentTime,
+ activeSourceId,
+ 0.05,
+ activeClipIdRef.current ?? undefined,
+ );
+ if (pos) {
+ activeClipIdRef.current = pos.clip.id;
+ updateVirtualTime(clampVirtualTime(clipsRef.current, pos.virtualTimeSec));
+ }
return;
}
- const position = locateSourcePosition(clipsRef.current, v.currentTime, activeSourceId);
+ const position = locateSourcePosition(
+ clipsRef.current,
+ v.currentTime,
+ activeSourceId,
+ 0.05,
+ activeClipIdRef.current ?? undefined,
+ );
if (!position) {
// ponytail: fall back to timeline order so cross-asset / reordered
// clips don't keep playing unmapped media.
@@ -193,6 +247,7 @@ export function VirtualPreview({
}
return;
}
+ activeClipIdRef.current = position.clip.id;
const reachedClipEnd = v.currentTime >= (position.clip.sourceEndSec ?? Infinity) - 0.04;
if (reachedClipEnd) {
const nextClip = clipsRef.current[position.clipIndex + 1];
@@ -275,6 +330,7 @@ export function VirtualPreview({
setIsPlaying(false);
return;
}
+ activeClipIdRef.current = position.clip.id;
const targetIndex = videoSources.findIndex((vs) => vs.id === position.clip.assetId);
const isAssetSwitch = targetIndex >= 0 && targetIndex !== sourceIndex;
@@ -340,10 +396,14 @@ export function VirtualPreview({
key={activeSource.id}
ref={videoRef}
src={activeSource.src}
- className={styles.video}
+ className={`${styles.video}${isIdentityCrop ? "" : ` ${styles.videoCropped}`}`}
// When a synthetic cursor is being drawn on top (CursorPreviewLayer),
// hide the real OS pointer here so it doesn't compete with it.
- style={{ ...videoStyle, cursor: settings.cursorShow ? "none" : undefined }}
+ style={{
+ ...cropVideoStyle,
+ ...videoStyle,
+ cursor: settings.cursorShow ? "none" : undefined,
+ }}
preload="metadata"
playsInline
onLoadedMetadata={(e) => {
@@ -360,7 +420,12 @@ export function VirtualPreview({
// without it, switching between clips of different assets
// during multi-clip playback clobbered clip[0]'s duration
// with whichever asset's video happened to load last.
- onLoadedMetadata?.(e.currentTarget.duration, activeSource.id);
+ onLoadedMetadata?.(
+ e.currentTarget.duration,
+ activeSource.id,
+ e.currentTarget.videoWidth,
+ e.currentTarget.videoHeight,
+ );
if (pendingSeekRef.current) {
const { sourceTimeSec, play } = pendingSeekRef.current;
pendingSeekRef.current = null;
diff --git a/src/components/ai-edition/v4/EditorShellV4.module.css b/src/components/ai-edition/v4/EditorShellV4.module.css
index 6653ed798..db71f951d 100644
--- a/src/components/ai-edition/v4/EditorShellV4.module.css
+++ b/src/components/ai-edition/v4/EditorShellV4.module.css
@@ -239,10 +239,9 @@
}
/* ─── FLOATING INSPECTOR + FACET RAIL ──────────────────────────────── */
-/* bottom used to reserve room for the (permanently visible) transport bar;
- the transport is now a hover-reveal overlay (see .transportWrap) and no
- longer needs reserved space, so every facet gets the same tight margin
- down to just above the timeline — same fix as the stage padding. */
+/* Playback transport lives in the timeline header now (TransportBar, via
+ V4Timeline), not over the stage, so every facet gets the same tight
+ margin down to just above the timeline. */
.inspectorWrap {
position: absolute;
top: 20px;
@@ -308,95 +307,6 @@
background: var(--accent-soft);
}
-/* ─── FLOATING TRANSPORT (Edit mode) ───────────────────────────────── */
-/* Hover-reveal overlay: hidden until the pointer is over the stage (or the
- bar itself has focus, for keyboard users), so it never reserves space
- for the video and never gets in the way of watching playback. */
-.transportWrap {
- position: absolute;
- left: 0;
- right: 0;
- bottom: 22px;
- display: flex;
- justify-content: center;
- z-index: 15;
- pointer-events: none;
- opacity: 0;
- transition: opacity var(--motion-med) var(--ease);
-}
-.stage:hover .transportWrap,
-.transportWrap:focus-within {
- opacity: 1;
- pointer-events: auto;
-}
-.transport {
- /* pointer-events follows .transportWrap (none while hidden, auto on
- hover/focus-within) — no independent override here. */
- display: inline-flex;
- align-items: center;
- gap: 8px;
- padding: 8px 10px;
- border-radius: 16px;
- background: var(--surface-1);
- border: 1px solid var(--border);
- box-shadow: var(--elev-pop);
-}
-.transport .tbtn {
- width: 34px;
- height: 34px;
- display: grid;
- place-items: center;
- border-radius: 9px;
- color: var(--fg-2);
- background: transparent;
- border: 0;
- cursor: pointer;
- transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
-}
-.transport .tbtn:hover {
- background: var(--surface-3);
- color: var(--fg);
-}
-.transport .tbtn.on {
- color: var(--accent);
- background: var(--accent-soft);
-}
-.transport .play {
- width: 44px;
- height: 44px;
- border-radius: 12px;
- background: var(--accent);
- color: #fff;
- box-shadow: 0 4px 14px -4px var(--accent-soft);
-}
-.transport .play:hover {
- background: var(--brand-lo);
- color: #fff;
-}
-.transport .time {
- font-family: var(--font-mono);
- font-size: 13px;
- color: var(--fg);
- min-width: 104px;
- text-align: center;
-}
-.transport .time b {
- font-weight: 600;
-}
-.transport .time .slash {
- color: var(--meta);
- margin: 0 5px;
-}
-.transport .time .total {
- color: var(--muted);
-}
-.transport .vsep {
- width: 1px;
- height: 22px;
- background: var(--border);
- margin: 0 2px;
-}
-
/* ─── TIMELINE FOOTER ──────────────────────────────────────────────── */
.timeline {
grid-row: 3;
@@ -523,7 +433,7 @@
.mediaCardStats .size {
font-family: var(--font-mono);
font-size: 10.5px;
- color: var(--meta);
+ color: var(--muted);
}
.mediaHint {
display: flex;
@@ -571,20 +481,41 @@
}
/* ─── REC STAGE ────────────────────────────────────────────────────── */
+/* A settings panel sized for the editor's real estate — not a copy of the
+ floating HUD's small draggable pill toolbar (no drag handle, orientation
+ toggle, or collapse affordance; those only make sense on a cramped OS
+ overlay). Source/mic/camera state is read from the same cross-window
+ prefs bridge the HUD hook seeds itself from, so the two stay in sync. */
.recStage {
position: absolute;
inset: 0;
display: flex;
+ flex-direction: column;
+ padding: 24px 28px;
+ gap: 14px;
+}
+.recCols {
+ flex: 1;
+ min-height: 0;
+ display: flex;
+ flex-direction: row;
+ align-items: stretch;
+ gap: 20px;
+}
+.recPreviewCol {
+ flex: 1;
+ min-width: 0;
+ min-height: 0;
+ display: flex;
align-items: center;
justify-content: center;
- padding: 24px 48px 110px;
}
-.recFrame {
+.recPreviewFrame {
position: relative;
- aspect-ratio: 16 / 9;
width: 100%;
- max-width: 820px;
- max-height: 100%;
+ max-width: 720px;
+ aspect-ratio: 16 / 9;
+ margin: 0;
background: linear-gradient(135deg, #1a1c22, #0e0f14);
border-radius: 16px;
box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.75), 0 12px 28px -12px rgba(0, 0, 0, 0.5),
@@ -593,6 +524,26 @@
display: grid;
place-items: center;
}
+.recCameraVideo {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ transform: scaleX(-1);
+}
+.recPreviewPlaceholder {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 8px;
+ color: rgba(255, 255, 255, 0.45);
+ font-size: 13px;
+ font-weight: 500;
+}
+.recPreviewHint {
+ color: rgba(255, 255, 255, 0.3);
+ font-size: 11.5px;
+ font-weight: 400;
+}
.recBadge {
position: absolute;
top: 16px;
@@ -616,92 +567,155 @@
border-radius: 50%;
background: var(--danger);
}
-.recBarWrap {
- position: absolute;
- bottom: 22px;
- left: 0;
- right: 0;
+.recPanel {
+ width: 360px;
+ flex-shrink: 0;
+ min-height: 0;
+ margin: 0;
display: flex;
- justify-content: center;
+ flex-direction: column;
+ background: var(--surface-1);
+ border: 1px solid var(--border);
+ border-radius: 16px;
+ overflow-y: auto;
+ scrollbar-width: thin;
+ scrollbar-color: var(--border-hi) transparent;
}
-.recBar {
+@media (max-width: 760px) {
+ .recCols {
+ flex-direction: column;
+ overflow-y: auto;
+ }
+ .recPreviewCol {
+ flex: 0 0 auto;
+ }
+ .recPanel {
+ width: 100%;
+ }
+}
+.recRow {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 12px;
+ padding: 13px 16px;
+ border-bottom: 1px solid var(--border-soft);
+}
+.recRow:last-child {
+ border-bottom: 0;
+}
+.recRowLabel {
+ display: flex;
+ align-items: center;
+ gap: 9px;
+ color: var(--fg-2);
+ font-size: 13px;
+ font-weight: 500;
+}
+.recRowControl {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+}
+.recRowMuted {
display: inline-flex;
align-items: center;
- gap: 3px;
- padding: 5px;
- border-radius: 16px;
- background: rgba(20, 22, 27, 0.72);
- backdrop-filter: blur(20px) saturate(1.4);
- -webkit-backdrop-filter: blur(20px) saturate(1.4);
- border: 1px solid rgba(255, 255, 255, 0.12);
- box-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
+ gap: 6px;
+ color: var(--muted);
+ font-size: 12px;
}
-.recBarBtn {
+.recRowSourceBtn {
display: inline-flex;
align-items: center;
- gap: 7px;
- height: 36px;
+ gap: 6px;
+ height: 32px;
padding: 0 12px;
- border-radius: 10px;
- border: 0;
- background: rgba(255, 255, 255, 0.1);
- color: #fff;
+ border-radius: 9px;
+ border: 1px solid var(--border);
+ background: var(--surface);
+ color: var(--fg);
font-size: 12.5px;
font-weight: 500;
cursor: pointer;
+ max-width: 220px;
+}
+.recRowSourceBtn > span,
+.recRowSourceBtn {
white-space: nowrap;
- transition: background var(--motion-fast) var(--ease);
+ overflow: hidden;
+ text-overflow: ellipsis;
}
-.recBarBtn:hover {
- background: rgba(255, 255, 255, 0.16);
+.recRowSourceBtn:hover {
+ border-color: var(--border-hi);
+ background: var(--surface-2);
}
-.recIconBtn {
- width: 36px;
- height: 36px;
- display: grid;
- place-items: center;
- border-radius: 10px;
- border: 0;
- background: transparent;
- color: rgba(255, 255, 255, 0.72);
+.recSelect {
+ height: 32px;
+ max-width: 200px;
+ padding: 0 8px;
+ border-radius: 9px;
+ border: 1px solid var(--border);
+ background: var(--surface);
+ color: var(--fg);
+ font-size: 12.5px;
cursor: pointer;
- transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
}
-.recIconBtn:hover {
- background: rgba(255, 255, 255, 0.14);
- color: #fff;
+.recLevelMeter {
+ width: 56px;
+ height: 18px;
}
-.recIconBtn.on {
+.recToggleBtn {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ min-width: 44px;
+ height: 28px;
+ padding: 0 10px;
+ border-radius: 8px;
+ border: 1px solid var(--border);
+ background: var(--surface);
+ color: var(--muted);
+ font-size: 12px;
+ font-weight: 600;
+ cursor: pointer;
+ transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease),
+ border-color var(--motion-fast) var(--ease);
+}
+.recToggleBtn:hover {
+ border-color: var(--border-hi);
+}
+.recToggleBtn.on {
background: var(--accent-soft);
+ border-color: var(--accent-border);
color: var(--accent);
}
-.recBarSep {
- width: 1px;
- height: 20px;
- background: rgba(255, 255, 255, 0.14);
- margin: 0 3px;
-}
-.recDragHandle {
- display: grid;
- grid-auto-rows: 3.5px;
- gap: 3.5px;
- width: 36px;
- height: 32px;
- place-items: center;
+.recActions {
+ flex-shrink: 0;
+ display: flex;
+ align-items: center;
justify-content: center;
- align-content: center;
- cursor: grab;
+ gap: 10px;
+}
+.recActionsHint {
flex-shrink: 0;
- touch-action: none;
+ text-align: center;
+ color: var(--muted);
+ font-size: 11.5px;
+ margin: -6px 0 0;
}
-.recDragHandle:active {
- cursor: grabbing;
+.recCancelBtn {
+ height: 44px;
+ padding: 0 18px;
+ border-radius: 12px;
+ border: 1px solid var(--border);
+ background: transparent;
+ color: var(--fg-2);
+ font-size: 13.5px;
+ font-weight: 500;
+ cursor: pointer;
}
-.recDragDot {
- width: 3.5px;
- height: 3.5px;
- border-radius: 50%;
- background: rgba(255, 255, 255, 0.3);
+.recCancelBtn:hover {
+ background: var(--surface-2);
}
.recMenu {
position: absolute;
@@ -876,15 +890,6 @@
background: var(--surface-2);
}
-.bigRecWrap {
- position: absolute;
- left: 0;
- right: 0;
- bottom: 22px;
- display: flex;
- justify-content: center;
- z-index: 15;
-}
.bigRecBtn {
display: inline-flex;
align-items: center;
@@ -1023,7 +1028,7 @@
.tlRuler span {
font-family: var(--font-mono);
font-size: 10px;
- color: var(--meta);
+ color: var(--muted);
}
.tlLane {
position: relative;
@@ -1039,7 +1044,7 @@
align-items: center;
justify-content: center;
font-size: 11px;
- color: var(--meta);
+ color: var(--muted);
pointer-events: none;
}
.lanePill {
diff --git a/src/components/ai-edition/v4/EditorTopBar.tsx b/src/components/ai-edition/v4/EditorTopBar.tsx
index 7422d35d1..793727140 100644
--- a/src/components/ai-edition/v4/EditorTopBar.tsx
+++ b/src/components/ai-edition/v4/EditorTopBar.tsx
@@ -11,9 +11,9 @@ import {
Sun,
} from "lucide-react";
import { useEffect, useRef, useState } from "react";
-import { useI18n } from "@/contexts/I18nContext";
+import { useI18n, useScopedT } from "@/contexts/I18nContext";
import { useTheme } from "@/hooks/useTheme";
-import type { Locale } from "@/i18n/config";
+import { getAvailableLocales, getLocaleName, getLocaleShort } from "@/i18n/loader";
import styles from "./EditorShellV4.module.css";
export type EditorMode = "media" | "edit" | "rec";
@@ -38,26 +38,10 @@ interface EditorTopBarProps {
actions: TopBarActions;
}
-const LANGS: Array<{ code: string; label: string }> = [
- { code: "en", label: "English" },
- { code: "fr", label: "Français" },
- { code: "es", label: "Español" },
- { code: "de", label: "Deutsch" },
- { code: "it", label: "Italiano" },
- { code: "ja-JP", label: "日本語" },
- { code: "ko-KR", label: "한국어" },
- { code: "pt-BR", label: "Português (BR)" },
- { code: "ru", label: "Русский" },
- { code: "tr", label: "Türkçe" },
- { code: "vi", label: "Tiếng Việt" },
- { code: "zh-CN", label: "简体中文" },
- { code: "zh-TW", label: "繁體中文" },
-];
-
-const MODES: Array<{ id: EditorMode; label: string }> = [
- { id: "media", label: "Media" },
- { id: "edit", label: "Edit" },
- { id: "rec", label: "Rec" },
+const MODES: Array<{ id: EditorMode; labelKey: string }> = [
+ { id: "media", labelKey: "topbar.modes.media" },
+ { id: "edit", labelKey: "topbar.modes.edit" },
+ { id: "rec", labelKey: "topbar.modes.rec" },
];
export function EditorTopBar({
@@ -70,14 +54,15 @@ export function EditorTopBar({
actions,
}: EditorTopBarProps) {
const { theme, toggle: toggleTheme } = useTheme();
+ const t = useScopedT("editor");
return (
<header className={styles.topbar}>
<button
type="button"
className={`${styles.iconBtn}${chatOpen ? ` ${styles.on}` : ""}`}
- title="Toggle chat panel"
- aria-label="Toggle chat panel"
+ title={t("topbar.toggleChatPanel")}
+ aria-label={t("topbar.toggleChatPanel")}
aria-pressed={chatOpen}
onClick={actions.toggleChat}
>
@@ -91,17 +76,13 @@ export function EditorTopBar({
<span className={styles.name}>OpenScreen</span>
</span>
<span className={styles.sep} aria-hidden />
- <ProjectNameField
- title={projectTitle}
- onRename={actions.renameProject}
- onOpenProjects={actions.openProject}
- />
+ <ProjectNameField title={projectTitle} onRename={actions.renameProject} />
<span className={styles.sep} aria-hidden />
<button
type="button"
className={styles.iconBtn}
- title="Open project"
- aria-label="Open project"
+ title={t("topbar.openProject")}
+ aria-label={t("topbar.openProject")}
onClick={actions.openProject}
>
<FolderOpen size={16} />
@@ -109,8 +90,8 @@ export function EditorTopBar({
<button
type="button"
className={styles.iconBtn}
- title="New project"
- aria-label="New project"
+ title={t("topbar.newProject")}
+ aria-label={t("topbar.newProject")}
onClick={actions.newProject}
>
<FolderPlus size={16} />
@@ -118,8 +99,8 @@ export function EditorTopBar({
<button
type="button"
className={styles.iconBtn}
- title="Save project"
- aria-label="Save project"
+ title={t("topbar.saveProject")}
+ aria-label={t("topbar.saveProject")}
onClick={actions.save}
style={{ position: "relative" }}
>
@@ -149,17 +130,17 @@ export function EditorTopBar({
aria-hidden
style={{ background: "var(--warn)", boxShadow: "0 0 0 3px var(--warn-soft)" }}
/>
- Unsaved
+ {t("topbar.unsaved")}
</>
) : (
<>
<span className={styles.dot} aria-hidden />
- Saved
+ {t("topbar.saved")}
</>
)}
</span>
- <div className={styles.modeSwitch} role="tablist" aria-label="Editor mode">
+ <div className={styles.modeSwitch} role="tablist" aria-label={t("topbar.editorMode")}>
{MODES.map((m) => (
<button
key={m.id}
@@ -168,7 +149,7 @@ export function EditorTopBar({
aria-selected={mode === m.id}
onClick={() => onModeChange(m.id)}
>
- {m.label}
+ {t(m.labelKey)}
</button>
))}
</div>
@@ -176,8 +157,8 @@ export function EditorTopBar({
<button
type="button"
className={styles.iconBtn}
- title={theme === "dark" ? "Switch to light theme" : "Switch to dark theme"}
- aria-label="Toggle theme"
+ title={theme === "dark" ? t("topbar.switchToLightTheme") : t("topbar.switchToDarkTheme")}
+ aria-label={t("topbar.toggleTheme")}
onClick={toggleTheme}
>
{theme === "dark" ? <Moon size={16} /> : <Sun size={16} />}
@@ -185,8 +166,8 @@ export function EditorTopBar({
<button
type="button"
className={styles.iconBtn}
- title="Settings"
- aria-label="Settings"
+ title={t("topbar.settings")}
+ aria-label={t("topbar.settings")}
onClick={actions.openSettings}
>
<Settings size={16} />
@@ -194,13 +175,13 @@ export function EditorTopBar({
<button
type="button"
className={styles.exportBtn}
- title="Export"
- aria-label="Export"
+ title={t("topbar.export")}
+ aria-label={t("topbar.export")}
onClick={actions.export}
disabled={!canExport}
>
<Download size={15} />
- Export
+ {t("topbar.export")}
</button>
</header>
);
@@ -209,12 +190,11 @@ export function EditorTopBar({
function ProjectNameField({
title,
onRename,
- onOpenProjects,
}: {
title: string | null;
onRename: (title: string) => void;
- onOpenProjects: () => void;
}) {
+ const t = useScopedT("editor");
const [editing, setEditing] = useState(false);
const [draft, setDraft] = useState(title ?? "");
const inputRef = useRef<HTMLInputElement | null>(null);
@@ -266,8 +246,8 @@ function ProjectNameField({
<span className={styles.ghostBtn}>
<button
type="button"
- title="Rename project"
- aria-label="Rename project"
+ title={t("topbar.renameProject")}
+ aria-label={t("topbar.renameProject")}
disabled={!title}
onClick={() => setEditing(true)}
style={{
@@ -277,25 +257,7 @@ function ProjectNameField({
font: "inherit",
}}
>
- {title ?? "No project"}
- </button>
- <button
- type="button"
- title="Switch project"
- aria-label="Switch project"
- onClick={(e) => {
- e.stopPropagation();
- onOpenProjects();
- }}
- style={{
- all: "unset",
- display: "grid",
- placeItems: "center",
- cursor: "pointer",
- padding: 2,
- }}
- >
- <ChevronDown size={11} style={{ color: "var(--muted)" }} />
+ {title ?? t("topbar.noProject")}
</button>
</span>
);
@@ -303,6 +265,7 @@ function ProjectNameField({
function LangButton() {
const { locale, setLocale } = useI18n();
+ const t = useScopedT("editor");
const [open, setOpen] = useState(false);
const ref = useRef<HTMLDivElement | null>(null);
useEffect(() => {
@@ -320,12 +283,12 @@ function LangButton() {
className={styles.iconBtn}
style={{ width: "auto", padding: "0 8px", gap: 6, display: "inline-flex" }}
onClick={() => setOpen((v) => !v)}
- aria-label="Change language"
+ aria-label={t("topbar.changeLanguage")}
aria-pressed={open}
>
<Languages size={15} />
<span style={{ fontFamily: "var(--font-mono)", fontSize: 11, fontWeight: 600 }}>
- {locale.toUpperCase()}
+ {getLocaleShort(locale)}
</span>
<ChevronDown size={9} style={{ color: "var(--muted)" }} />
</button>
@@ -344,9 +307,9 @@ function LangButton() {
zIndex: 60,
}}
>
- {LANGS.map((l) => (
+ {getAvailableLocales().map((code) => (
<button
- key={l.code}
+ key={code}
type="button"
style={{
display: "block",
@@ -354,18 +317,18 @@ function LangButton() {
textAlign: "left",
padding: "6px 10px",
border: 0,
- background: l.code === locale ? "var(--accent-wash)" : "transparent",
- color: l.code === locale ? "var(--accent)" : "var(--fg-2)",
+ background: code === locale ? "var(--accent-wash)" : "transparent",
+ color: code === locale ? "var(--accent)" : "var(--fg-2)",
borderRadius: "var(--r-sm)",
cursor: "pointer",
font: "500 12px var(--font-body)",
}}
onClick={() => {
- setLocale(l.code as Locale);
+ setLocale(code);
setOpen(false);
}}
>
- {l.label}
+ {getLocaleName(code)}
</button>
))}
</div>
diff --git a/src/components/ai-edition/v4/FloatingInspector.tsx b/src/components/ai-edition/v4/FloatingInspector.tsx
index 02cb79ac4..1c2450ea5 100644
--- a/src/components/ai-edition/v4/FloatingInspector.tsx
+++ b/src/components/ai-edition/v4/FloatingInspector.tsx
@@ -1,11 +1,11 @@
import {
Captions as CaptionsIcon,
ChevronRight,
- Crop as CropIcon,
FileText,
Image as ImageIcon,
Layout as LayoutIcon,
MousePointer2,
+ Pencil,
Scissors,
SlidersHorizontal,
Trash2,
@@ -13,8 +13,12 @@ import {
ZoomIn,
} from "lucide-react";
import type { ComponentProps } from "react";
+import { useState } from "react";
+import { useScopedT } from "@/contexts/I18nContext";
+import type { AxcutClip } from "@/lib/ai-edition/schema";
import type { useTimeline } from "@/lib/ai-edition/store/useTimeline";
import { coalescedTrimGroups } from "@/lib/ai-edition/timeline/trim-mapping";
+import { formatSeconds } from "@/lib/ai-edition/timeline/virtual-preview";
import {
BackgroundPane,
CursorPane,
@@ -26,23 +30,15 @@ import styles from "./EditorShellV4.module.css";
type TimelineApi = ReturnType<typeof useTimeline>;
-export type Facet =
- | "background"
- | "effects"
- | "layout"
- | "cursor"
- | "captions"
- | "transcript"
- | "crop";
+export type Facet = "background" | "effects" | "layout" | "cursor" | "captions" | "transcript";
-const FACETS: Array<{ id: Facet; label: string; icon: typeof ImageIcon }> = [
- { id: "background", label: "Background", icon: ImageIcon },
- { id: "effects", label: "Effects", icon: SlidersHorizontal },
- { id: "layout", label: "Layout", icon: LayoutIcon },
- { id: "cursor", label: "Cursor", icon: MousePointer2 },
- { id: "captions", label: "Captions", icon: CaptionsIcon },
- { id: "transcript", label: "Transcript", icon: FileText },
- { id: "crop", label: "Crop", icon: CropIcon },
+const FACETS: Array<{ id: Facet; labelKey: string; icon: typeof ImageIcon }> = [
+ { id: "background", labelKey: "background.title", icon: ImageIcon },
+ { id: "effects", labelKey: "effects.title", icon: SlidersHorizontal },
+ { id: "layout", labelKey: "layout.title", icon: LayoutIcon },
+ { id: "cursor", labelKey: "cursor.title", icon: MousePointer2 },
+ { id: "captions", labelKey: "facets.captions", icon: CaptionsIcon },
+ { id: "transcript", labelKey: "facets.transcript", icon: FileText },
];
type TranscriptProps = ComponentProps<typeof TranscriptPane>;
@@ -52,7 +48,12 @@ interface FloatingInspectorProps {
open: boolean;
onFacetChange: (facet: Facet) => void;
onToggleOpen: () => void;
- onCrop: () => void;
+ /** Clips on the timeline, for the "Edit clip" picker — crop + trim now live
+ * per-clip (see clipSchema.cropRegion) instead of behind a document-wide
+ * facet, so this button opens EditClipModal directly instead of routing
+ * through a facet body. */
+ clips: AxcutClip[];
+ onEditClip: (clip: AxcutClip) => void;
onCaptions: () => void;
transcriptProps: TranscriptProps;
/** Drives the selected-element settings pane (zoom/speed/annotation/trim) —
@@ -67,11 +68,15 @@ export function FloatingInspector({
open,
onFacetChange,
onToggleOpen,
- onCrop,
+ clips,
+ onEditClip,
onCaptions,
transcriptProps,
tl,
}: FloatingInspectorProps) {
+ const ts = useScopedT("settings");
+ const te = useScopedT("editor");
+ const [clipPickerOpen, setClipPickerOpen] = useState(false);
const selection = tl.selection;
const effectiveOpen = open || selection !== null;
return (
@@ -83,7 +88,6 @@ export function FloatingInspector({
) : (
<FacetBody
facet={facet}
- onCrop={onCrop}
onCaptions={onCaptions}
onCollapse={onToggleOpen}
transcriptProps={transcriptProps}
@@ -92,24 +96,17 @@ export function FloatingInspector({
</div>
) : null}
<div className={styles.facetRail}>
- {FACETS.map(({ id, label, icon: Icon }) => (
+ {FACETS.map(({ id, labelKey, icon: Icon }) => (
<button
key={id}
type="button"
- title={label}
- aria-label={label}
+ title={ts(labelKey)}
+ aria-label={ts(labelKey)}
aria-pressed={!selection && open && facet === id}
onClick={() => {
// Switching facets while an element is selected should show
// the facet, not leave the selection pane on top of it.
if (selection) tl.clearSelection();
- // Crop has no useful "settings" pane of its own — jump straight
- // to the crop modal instead of routing through FacetBody's
- // now-removed intermediate "Open crop…" pane.
- if (id === "crop") {
- onCrop();
- return;
- }
if (facet === id && open) {
onToggleOpen();
} else {
@@ -120,12 +117,97 @@ export function FloatingInspector({
<Icon size={17} />
</button>
))}
+ <div style={{ position: "relative" }}>
+ <button
+ type="button"
+ title={te("editClipDialog.title")}
+ aria-label={te("editClipDialog.title")}
+ aria-haspopup={clips.length > 1 ? "menu" : undefined}
+ aria-expanded={clips.length > 1 ? clipPickerOpen : undefined}
+ onClick={() => {
+ if (selection) tl.clearSelection();
+ if (clips.length === 0) return;
+ if (clips.length === 1) {
+ onEditClip(clips[0]);
+ return;
+ }
+ setClipPickerOpen((v) => !v);
+ }}
+ >
+ <Pencil size={17} />
+ </button>
+ {clipPickerOpen && clips.length > 1 ? (
+ <div
+ role="menu"
+ aria-label={te("editClipDialog.pickClipTitle")}
+ style={{
+ position: "absolute",
+ top: 0,
+ right: "calc(100% + 8px)",
+ minWidth: 200,
+ maxHeight: 320,
+ overflowY: "auto",
+ background: "var(--surface-1)",
+ border: "1px solid var(--border)",
+ borderRadius: 12,
+ boxShadow: "var(--elev-pop)",
+ backdropFilter: "blur(18px)",
+ padding: 6,
+ zIndex: 30,
+ }}
+ >
+ <p
+ style={{
+ margin: "4px 8px 6px",
+ fontSize: 11,
+ fontWeight: 600,
+ textTransform: "uppercase",
+ letterSpacing: "0.04em",
+ color: "var(--muted)",
+ }}
+ >
+ {te("editClipDialog.pickClipTitle")}
+ </p>
+ {clips.map((clip, index) => (
+ <button
+ key={clip.id}
+ type="button"
+ role="menuitem"
+ onClick={() => {
+ setClipPickerOpen(false);
+ onEditClip(clip);
+ }}
+ style={{
+ display: "flex",
+ flexDirection: "column",
+ alignItems: "flex-start",
+ width: "100%",
+ padding: "7px 8px",
+ border: "none",
+ borderRadius: 8,
+ background: "transparent",
+ color: "var(--fg)",
+ cursor: "pointer",
+ textAlign: "left",
+ }}
+ >
+ <span style={{ font: "600 12.5px var(--font-display)" }}>
+ {te("editClipDialog.clipLabel", { index: index + 1 })}
+ </span>
+ <span style={{ font: "500 11px var(--font-mono)", color: "var(--muted)" }}>
+ {formatSeconds(clip.timelineStartSec)}–{formatSeconds(clip.timelineEndSec)}
+ </span>
+ </button>
+ ))}
+ </div>
+ ) : null}
+ </div>
</div>
</div>
);
}
-function paneHeader(icon: React.ReactNode, title: string, onClose: () => void) {
+function paneHeader(icon: React.ReactNode, title: string, onClose: () => void, closeLabel: string) {
return (
<header
style={{
@@ -151,8 +233,8 @@ function paneHeader(icon: React.ReactNode, title: string, onClose: () => void) {
</h2>
<button
type="button"
- title="Close"
- aria-label="Close"
+ title={closeLabel}
+ aria-label={closeLabel}
onClick={onClose}
style={{
width: 26,
@@ -192,6 +274,10 @@ const ZOOM_DEPTHS = [1, 2, 3, 4, 5, 6] as const;
const SPEED_VALUES = [0.5, 0.75, 1, 1.25, 1.5, 2, 3];
function SelectionPane({ tl, onClose }: { tl: TimelineApi; onClose: () => void }) {
+ const ts = useScopedT("settings");
+ const tt = useScopedT("timeline");
+ const tc = useScopedT("common");
+ const te = useScopedT("editor");
const selection = tl.selection;
if (!selection) return null;
@@ -225,10 +311,10 @@ function SelectionPane({ tl, onClose }: { tl: TimelineApi; onClose: () => void }
if (!region) return null;
return (
<div style={{ display: "flex", flexDirection: "column", minHeight: 0 }}>
- {paneHeader(<ZoomIn size={15} />, "Zoom", onClose)}
+ {paneHeader(<ZoomIn size={15} />, tt("labels.zoom"), onClose, tc("actions.close"))}
<div style={bodyStyle}>
{paneRow(
- "Zoom level",
+ ts("zoom.level"),
<select
value={region.depth}
onChange={(e) =>
@@ -251,11 +337,11 @@ function SelectionPane({ tl, onClose }: { tl: TimelineApi; onClose: () => void }
}}
style={secondaryBtnStyle}
>
- Reset focus point
+ {te("inspector.resetFocusPoint")}
</button>
<button type="button" onClick={deleteAndClose} style={deleteBtnStyle}>
<Trash2 size={14} />
- Delete zoom
+ {ts("zoom.deleteZoom")}
</button>
</div>
</div>
@@ -267,10 +353,10 @@ function SelectionPane({ tl, onClose }: { tl: TimelineApi; onClose: () => void }
if (!region) return null;
return (
<div style={{ display: "flex", flexDirection: "column", minHeight: 0 }}>
- {paneHeader(<ZoomIn size={15} />, "Speed", onClose)}
+ {paneHeader(<ZoomIn size={15} />, tt("labels.speed"), onClose, tc("actions.close"))}
<div style={bodyStyle}>
{paneRow(
- "Playback speed",
+ ts("speed.playbackSpeed"),
<select
value={region.speed}
onChange={(e) => void tl.updateSpeedValue(region.id, Number(e.target.value))}
@@ -285,7 +371,7 @@ function SelectionPane({ tl, onClose }: { tl: TimelineApi; onClose: () => void }
)}
<button type="button" onClick={deleteAndClose} style={deleteBtnStyle}>
<Trash2 size={14} />
- Delete speed region
+ {ts("speed.deleteRegion")}
</button>
</div>
</div>
@@ -298,10 +384,17 @@ function SelectionPane({ tl, onClose }: { tl: TimelineApi; onClose: () => void }
const colors = ["#ffffff", "#0f172a", "#10b981", "#f59e0b", "#f43f5e", "#6366f1"];
return (
<div style={{ display: "flex", flexDirection: "column", minHeight: 0 }}>
- {paneHeader(<FileText size={15} />, "Annotation", onClose)}
+ {paneHeader(
+ <FileText size={15} />,
+ tt("labels.annotationItem"),
+ onClose,
+ tc("actions.close"),
+ )}
<div style={bodyStyle}>
<div style={{ display: "flex", flexDirection: "column", gap: 6 }}>
- <span style={{ fontSize: 12.5, color: "var(--fg-2)", fontWeight: 500 }}>Text</span>
+ <span style={{ fontSize: 12.5, color: "var(--fg-2)", fontWeight: 500 }}>
+ {ts("annotation.textContent")}
+ </span>
<textarea
value={region.content ?? ""}
onChange={(e) => tl.updateAnnotationLive(region.id, { content: e.target.value })}
@@ -319,14 +412,14 @@ function SelectionPane({ tl, onClose }: { tl: TimelineApi; onClose: () => void }
/>
</div>
{paneRow(
- "Color",
+ ts("annotation.color"),
<div style={{ display: "flex", gap: 6 }}>
{colors.map((c) => (
<button
key={c}
type="button"
title={c}
- aria-label={`Set color ${c}`}
+ aria-label={te("inspector.setColor", { color: c })}
aria-pressed={region.style?.color === c}
onClick={() => {
tl.updateAnnotationLive(region.id, {
@@ -351,7 +444,7 @@ function SelectionPane({ tl, onClose }: { tl: TimelineApi; onClose: () => void }
)}
<button type="button" onClick={deleteAndClose} style={deleteBtnStyle}>
<Trash2 size={14} />
- Delete annotation
+ {ts("annotation.deleteAnnotation")}
</button>
</div>
</div>
@@ -373,14 +466,14 @@ function SelectionPane({ tl, onClose }: { tl: TimelineApi; onClose: () => void }
};
return (
<div style={{ display: "flex", flexDirection: "column", minHeight: 0 }}>
- {paneHeader(<Scissors size={15} />, "Trim", onClose)}
+ {paneHeader(<Scissors size={15} />, tt("labels.trim"), onClose, tc("actions.close"))}
<div style={bodyStyle}>
<p style={{ margin: 0, fontSize: 12, lineHeight: 1.5, color: "var(--muted)" }}>
- {durationSec.toFixed(1)}s of source media hidden from the edited timeline.
+ {te("inspector.trimHiddenDuration", { duration: durationSec.toFixed(1) })}
</p>
<button type="button" onClick={deleteTrimGroup} style={deleteBtnStyle}>
<Trash2 size={14} />
- Restore (delete trim)
+ {te("inspector.restoreDeleteTrim")}
</button>
</div>
</div>
@@ -409,23 +502,23 @@ const secondaryBtnStyle: React.CSSProperties = {
function FacetBody({
facet,
- onCrop,
onCaptions,
onCollapse,
transcriptProps,
}: {
facet: Facet;
- onCrop: () => void;
onCaptions: () => void;
onCollapse: () => void;
transcriptProps: TranscriptProps;
}) {
+ const te = useScopedT("editor");
+ const ts = useScopedT("settings");
// A small collapse affordance floated over the reused pane header.
const collapse = (
<button
type="button"
- title="Collapse inspector"
- aria-label="Collapse inspector"
+ title={te("inspector.collapseInspector")}
+ aria-label={te("inspector.collapseInspector")}
onClick={onCollapse}
style={{
position: "absolute",
@@ -452,27 +545,13 @@ function FacetBody({
if (facet === "layout") return wrap(collapse, <LayoutPane />);
if (facet === "cursor") return wrap(collapse, <CursorPane />);
if (facet === "transcript") return wrap(collapse, <TranscriptPane {...transcriptProps} />);
- if (facet === "captions")
- return wrap(
- collapse,
- <SimpleFacet
- title="Captions"
- description="Generate word-timed captions from the transcript and drop them onto the timeline."
- actionLabel="Generate captions"
- onAction={onCaptions}
- />,
- );
- // crop: the rail button bypasses FacetBody and opens CropModal directly
- // (see the facet rail's onClick above) — this is a defensive fallback for
- // the unlikely case `facet` state is ever "crop" without going through
- // the rail.
return wrap(
collapse,
<SimpleFacet
- title="Crop"
- description="Reframe the recording — pick an aspect ratio and zoom into the region you want to keep."
- actionLabel="Open crop…"
- onAction={onCrop}
+ title={ts("facets.captions")}
+ description={te("inspector.captionsDescription")}
+ actionLabel={te("inspector.generateCaptions")}
+ onAction={onCaptions}
/>,
);
}
diff --git a/src/components/ai-edition/v4/FloatingTransport.tsx b/src/components/ai-edition/v4/FloatingTransport.tsx
deleted file mode 100644
index ff137022a..000000000
--- a/src/components/ai-edition/v4/FloatingTransport.tsx
+++ /dev/null
@@ -1,92 +0,0 @@
-import { Maximize, Pause, Play, Repeat, SkipBack, SkipForward } from "lucide-react";
-import type { AxcutClip } from "@/lib/ai-edition/schema";
-import styles from "./EditorShellV4.module.css";
-
-function fmt(sec: number): string {
- if (!Number.isFinite(sec) || sec < 0) sec = 0;
- const m = Math.floor(sec / 60);
- const s = (sec % 60).toFixed(1);
- return `${m}:${s.padStart(4, "0")}`;
-}
-
-export function FloatingTransport({
- playing,
- loop,
- currentTimeSec,
- clips,
- onTogglePlay,
- onPrevClip,
- onNextClip,
- onToggleLoop,
- onExpand,
-}: {
- playing: boolean;
- loop: boolean;
- currentTimeSec: number;
- clips: AxcutClip[];
- onTogglePlay: () => void;
- onPrevClip: () => void;
- onNextClip: () => void;
- onToggleLoop: () => void;
- onExpand: () => void;
-}) {
- const total = clips.reduce((max, c) => Math.max(max, c.timelineEndSec), 0);
- return (
- <div className={styles.transportWrap}>
- <div className={styles.transport} role="toolbar" aria-label="Playback">
- <button
- type="button"
- className={styles.tbtn}
- title="Previous"
- aria-label="Previous"
- onClick={onPrevClip}
- >
- <SkipBack size={15} />
- </button>
- <button
- type="button"
- className={`${styles.tbtn} ${styles.play}`}
- title="Play / Pause"
- aria-label="Play / Pause"
- onClick={onTogglePlay}
- >
- {playing ? <Pause size={16} /> : <Play size={16} />}
- </button>
- <button
- type="button"
- className={styles.tbtn}
- title="Next"
- aria-label="Next"
- onClick={onNextClip}
- >
- <SkipForward size={15} />
- </button>
- <span className={styles.vsep} aria-hidden />
- <span className={styles.time}>
- <b>{fmt(currentTimeSec)}</b>
- <span className={styles.slash}>/</span>
- <span className={styles.total}>{fmt(total)}</span>
- </span>
- <button
- type="button"
- className={`${styles.tbtn}${loop ? ` ${styles.on}` : ""}`}
- title="Loop"
- aria-label="Loop"
- aria-pressed={loop}
- onClick={onToggleLoop}
- >
- <Repeat size={15} />
- </button>
- <button
- type="button"
- className={styles.tbtn}
- title="Fullscreen"
- aria-label="Fullscreen"
- onClick={onExpand}
- >
- <Maximize size={15} />
- </button>
- </div>
- </div>
- );
-}
diff --git a/src/components/ai-edition/v4/MediaStage.tsx b/src/components/ai-edition/v4/MediaStage.tsx
index 882bad8fa..83cdb41d9 100644
--- a/src/components/ai-edition/v4/MediaStage.tsx
+++ b/src/components/ai-edition/v4/MediaStage.tsx
@@ -1,6 +1,7 @@
import { ArrowDown, Film, Plus, RotateCw, Search, X } from "lucide-react";
import { useMemo, useState } from "react";
import { toast } from "sonner";
+import { useScopedT } from "@/contexts/I18nContext";
import type { AxcutAsset } from "@/lib/ai-edition/schema";
import { useProjectStore } from "@/lib/ai-edition/store/projectStore";
import styles from "./EditorShellV4.module.css";
@@ -41,6 +42,7 @@ export function MediaStage({
assetStatuses?: Record<string, "pending" | "running" | "failed">;
onRegenerateAsset?: (assetId: string, language: string) => Promise<void>;
}) {
+ const t = useScopedT("editor");
const projectId = useProjectStore((s) => s.projectId);
const document = useProjectStore((s) => s.document);
const addAsset = useProjectStore((s) => s.addAsset);
@@ -66,17 +68,18 @@ export function MediaStage({
const handleImport = async () => {
if (!projectId) {
- toast.error("Open a project first");
+ toast.error(t("mediaStage.openProjectFirst"));
return;
}
const picker = await window.electronAPI?.openVideoFilePicker();
if (!picker?.success || !picker.path) return;
setBusy(true);
try {
- await addAsset(picker.path);
- toast.success(`Added ${basename(picker.path)}`);
+ const label = picker.name || basename(picker.path);
+ await addAsset(picker.path, label);
+ toast.success(t("mediaStage.added", { label }));
} catch (err) {
- toast.error("Could not add asset", {
+ toast.error(t("mediaStage.couldNotAddAsset"), {
description: err instanceof Error ? err.message : String(err),
});
} finally {
@@ -97,7 +100,7 @@ export function MediaStage({
<input
value={query}
onChange={(e) => setQuery(e.target.value)}
- placeholder="Search media…"
+ placeholder={t("mediaStage.searchPlaceholder")}
/>
</div>
<div className={styles.mediaCols}>
@@ -166,12 +169,10 @@ export function MediaStage({
{assets.length > 0 ? (
<div className={styles.mediaHint}>
<ArrowDown size={12} />
- Drag a clip onto the timeline below to add it
+ {t("mediaStage.dragHint")}
</div>
) : (
- <div className={styles.mediaHint}>
- No media yet — import a recording to get started.
- </div>
+ <div className={styles.mediaHint}>{t("mediaStage.emptyHint")}</div>
)}
<button
type="button"
@@ -180,7 +181,7 @@ export function MediaStage({
disabled={!projectId || busy}
>
<Plus size={14} />
- Import media
+ {t("mediaStage.importMedia")}
</button>
</div>
@@ -204,12 +205,12 @@ export function MediaStage({
letterSpacing: "-0.01em",
}}
>
- Source Transcript
+ {t("mediaStage.sourceTranscript")}
</h2>
<button
type="button"
- title="Close"
- aria-label="Close"
+ title={t("mediaStage.close")}
+ aria-label={t("mediaStage.close")}
onClick={() => setDetailOpen(false)}
style={{
width: 26,
@@ -262,7 +263,7 @@ export function MediaStage({
background: transcript ? "var(--success)" : "var(--accent)",
}}
/>
- {transcript ? "Transcript ready" : "Not generated yet"}
+ {transcript ? t("mediaStage.transcriptReady") : t("mediaStage.notGeneratedYet")}
</span>
</div>
@@ -275,7 +276,7 @@ export function MediaStage({
marginBottom: 6,
}}
>
- Regenerate as
+ {t("mediaStage.regenerateAs")}
</div>
<div style={{ display: "flex", gap: 8 }}>
<select
@@ -295,15 +296,15 @@ export function MediaStage({
outline: "none",
}}
>
- <option value="auto">Auto</option>
+ <option value="auto">{t("mediaStage.auto")}</option>
<option value="en">English</option>
<option value="fr">Français</option>
<option value="es">Español</option>
</select>
<button
type="button"
- title="Regenerate"
- aria-label="Regenerate"
+ title={t("mediaStage.regenerate")}
+ aria-label={t("mediaStage.regenerate")}
disabled={!onRegenerateAsset || assetStatuses?.[selected.id] === "running"}
onClick={() => {
if (onRegenerateAsset) void onRegenerateAsset(selected.id, lang);
@@ -342,11 +343,9 @@ export function MediaStage({
{transcript ? (
(transcript.segments ?? [])
.map((seg) => (seg as { text?: string }).text ?? "")
- .join(" ") || "Transcript is empty."
+ .join(" ") || t("mediaStage.transcriptEmpty")
) : (
- <span style={{ color: "var(--muted)" }}>
- Not generated yet — pick a language and click regenerate.
- </span>
+ <span style={{ color: "var(--muted)" }}>{t("mediaStage.notGeneratedHint")}</span>
)}
</div>
</div>
diff --git a/src/components/ai-edition/v4/RecStage.tsx b/src/components/ai-edition/v4/RecStage.tsx
index ddf6a59c3..39a0dec1a 100644
--- a/src/components/ai-edition/v4/RecStage.tsx
+++ b/src/components/ai-edition/v4/RecStage.tsx
@@ -1,32 +1,24 @@
import {
- AppWindow,
Camera,
CameraOff,
ChevronDown,
Loader2,
MicOff,
Mic as MicOn,
- Minus,
MonitorSmartphone,
MousePointer2,
Volume2,
VolumeX,
- X,
} from "lucide-react";
-import {
- type PointerEvent as ReactPointerEvent,
- useCallback,
- useEffect,
- useRef,
- useState,
-} from "react";
+import { useEffect, useRef, useState } from "react";
+import { AudioLevelMeter } from "@/components/ui/audio-level-meter";
+import { useScopedT } from "@/contexts/I18nContext";
+import { useAudioLevelMeter } from "@/hooks/useAudioLevelMeter";
import { useCameraDevices } from "@/hooks/useCameraDevices";
+import { useCameraPreviewStream } from "@/hooks/useCameraPreviewStream";
import { useMicrophoneDevices } from "@/hooks/useMicrophoneDevices";
import styles from "./EditorShellV4.module.css";
-type Menu = "system" | "mic" | "camera" | null;
-type Orientation = "horizontal" | "vertical";
-
interface RecordingPrefsState {
micEnabled: boolean;
micDeviceId: string | null;
@@ -47,68 +39,25 @@ const DEFAULT_PREFS: RecordingPrefsState = {
/**
* Rec-mode stage. The real capture pipeline lives in the standalone recorder
- * HUD window (`electronAPI.startNewRecording`); this stage presents a real
- * source/mic/camera/cursor configuration bar — ported from the "OpenScreen
- * Recording Widget" design — and hands off to the HUD when the user hits
- * record. Device lists, source selection, and capture-preference state are
- * all read from the same single sources of truth the rest of the app uses
- * (useMicrophoneDevices/useCameraDevices for enumeration, the main-process
- * selected-source + recording-prefs IPC for cross-window selection) — this
- * component holds no invented state of its own for any of that.
+ * HUD window (`electronAPI.startNewRecording`); this stage is a pre-flight
+ * config panel — source/mic/camera/cursor — that hands off to the HUD when
+ * the user hits record. It shares state with the HUD through the same
+ * cross-window bridges the rest of the app uses (main-process recording
+ * prefs + selected-source IPC, useMicrophoneDevices/useCameraDevices for
+ * enumeration) rather than owning an invented copy — and, unlike the HUD's
+ * own floating pill toolbar, it lays that state out as a normal settings
+ * panel sized for the editor's real estate, with a live camera/mic preview
+ * so device selection is verifiably wired to real hardware instead of just
+ * flipping a boolean.
*/
export function RecStage({
onStartRecording,
onClose,
}: {
onStartRecording: () => void;
- /** "Close" on the widget has nothing to close (no separate OS window in
- * this embedded context) — the closest real equivalent is leaving Rec
- * mode. Optional so the component still works if a caller doesn't wire it. */
onClose?: () => void;
}) {
- const [menu, setMenu] = useState<Menu>(null);
- const toggleMenu = (m: Menu) => setMenu((cur) => (cur === m ? null : m));
-
- const [orientation, setOrientation] = useState<Orientation>("horizontal");
- const isVertical = orientation === "vertical";
- const [collapsed, setCollapsed] = useState(false);
-
- // Drag-to-reposition the toolbar within the frame — position is null
- // (CSS-centered default) until the user first drags, then becomes an
- // explicit, clamped {x,y} offset from the frame's own top-left.
- const frameRef = useRef<HTMLDivElement | null>(null);
- const barRef = useRef<HTMLDivElement | null>(null);
- const [dragPos, setDragPos] = useState<{ x: number; y: number } | null>(null);
- const startDrag = useCallback((e: ReactPointerEvent) => {
- e.preventDefault();
- const frame = frameRef.current;
- const bar = barRef.current;
- if (!frame || !bar) return;
- const frameRect = frame.getBoundingClientRect();
- const barRect = bar.getBoundingClientRect();
- const startX = e.clientX;
- const startY = e.clientY;
- const startLeft = barRect.left - frameRect.left;
- const startTop = barRect.top - frameRect.top;
- const move = (ev: PointerEvent) => {
- const x = Math.min(
- frameRect.width - barRect.width,
- Math.max(0, startLeft + (ev.clientX - startX)),
- );
- const y = Math.min(
- frameRect.height - barRect.height,
- Math.max(0, startTop + (ev.clientY - startY)),
- );
- setDragPos({ x, y });
- };
- const up = () => {
- window.removeEventListener("pointermove", move);
- window.removeEventListener("pointerup", up);
- };
- window.addEventListener("pointermove", move);
- window.addEventListener("pointerup", up);
- }, []);
-
+ const t = useScopedT("editor");
const [prefs, setPrefsState] = useState<RecordingPrefsState>(DEFAULT_PREFS);
useEffect(() => {
let cancelled = false;
@@ -119,13 +68,13 @@ export function RecStage({
cancelled = true;
};
}, []);
- const updatePrefs = useCallback((patch: Partial<RecordingPrefsState>) => {
+ const updatePrefs = (patch: Partial<RecordingPrefsState>) => {
setPrefsState((prev) => {
const next = { ...prev, ...patch };
void window.electronAPI?.setRecordingPrefs?.(patch);
return next;
});
- }, []);
+ };
const micDevices = useMicrophoneDevices(true);
const camDevices = useCameraDevices(true);
@@ -144,6 +93,21 @@ export function RecStage({
}
}, [prefs.camDeviceId, camDevices.devices, camDevices.setSelectedDeviceId]);
+ // Live proof the selected devices actually work — a level meter for mic,
+ // a real <video> feed for camera — instead of just toggling a pref flag.
+ const { level: micLevel } = useAudioLevelMeter({
+ enabled: prefs.micEnabled,
+ deviceId: prefs.micDeviceId ?? undefined,
+ });
+ const { stream: cameraStream, error: cameraError } = useCameraPreviewStream({
+ enabled: prefs.camEnabled,
+ deviceId: prefs.camDeviceId ?? undefined,
+ });
+ const cameraVideoRef = useRef<HTMLVideoElement | null>(null);
+ useEffect(() => {
+ if (cameraVideoRef.current) cameraVideoRef.current.srcObject = cameraStream;
+ }, [cameraStream]);
+
// ── capture source (screen/window) ──────────────────────────────
const [source, setSource] = useState<ProcessedDesktopSource | null>(null);
useEffect(() => {
@@ -153,8 +117,7 @@ export function RecStage({
const [sourceTab, setSourceTab] = useState<"screen" | "window">("screen");
const [sources, setSources] = useState<ProcessedDesktopSource[]>([]);
const [loadingSources, setLoadingSources] = useState(false);
- const openSourceModal = useCallback(async () => {
- setMenu(null);
+ const openSourceModal = async () => {
setSourceModalOpen(true);
setLoadingSources(true);
try {
@@ -167,320 +130,182 @@ export function RecStage({
} finally {
setLoadingSources(false);
}
- }, []);
- const chooseSource = useCallback(async (candidate: ProcessedDesktopSource) => {
+ };
+ const chooseSource = async (candidate: ProcessedDesktopSource) => {
const result = await window.electronAPI?.selectSource?.(candidate);
setSource(result ?? candidate);
setSourceModalOpen(false);
- }, []);
+ };
const screenSources = sources.filter((s) => s.id.startsWith("screen:"));
const windowSources = sources.filter((s) => s.id.startsWith("window:"));
const visibleSources = sourceTab === "screen" ? screenSources : windowSources;
const cursorHighlight = prefs.cursorCaptureMode === "editable-overlay";
+ const sourceLabel = source?.name ?? t("rec.entireScreen");
- // Popovers open beside the bar in vertical mode (there's no room below a
- // column layout) and above it in horizontal mode — mirrors the design's
- // V-conditional menu positioning.
- const menuStyle = (horizontalPos: React.CSSProperties, width: number): React.CSSProperties =>
- isVertical
- ? { top: 0, bottom: "auto", left: "calc(100% + 8px)", width }
- : { ...horizontalPos, width };
-
- if (collapsed) {
- return (
- <div className={styles.recStage}>
- <div className={styles.recFrame} ref={frameRef}>
- <span
- aria-hidden
- style={{
- width: 88,
- height: 88,
- borderRadius: "50%",
- background: "linear-gradient(180deg,#c2c6cc 0%,#676d78 100%)",
- }}
- />
- <div className={styles.recBadge}>
- <span className={styles.recDot} aria-hidden />
- <span>Ready to record</span>
+ return (
+ <div className={styles.recStage}>
+ <div className={styles.recCols}>
+ <div className={styles.recPreviewCol}>
+ <div className={styles.recPreviewFrame}>
+ {prefs.camEnabled ? (
+ cameraStream ? (
+ <video
+ ref={cameraVideoRef}
+ autoPlay
+ muted
+ playsInline
+ className={styles.recCameraVideo}
+ />
+ ) : cameraError ? (
+ <div className={styles.recPreviewPlaceholder}>
+ <CameraOff size={28} />
+ <span>{t("rec.cameraAccessError")}</span>
+ </div>
+ ) : (
+ <div className={styles.recPreviewPlaceholder}>
+ <Loader2 size={28} className="animate-spin" />
+ <span>{t("rec.startingCamera")}</span>
+ </div>
+ )
+ ) : (
+ <div className={styles.recPreviewPlaceholder}>
+ <MonitorSmartphone size={28} />
+ <span>{sourceLabel}</span>
+ <span className={styles.recPreviewHint}>{t("rec.turnOnCameraHint")}</span>
+ </div>
+ )}
+ <div className={styles.recBadge}>
+ <span className={styles.recDot} aria-hidden />
+ <span>{sourceLabel}</span>
+ </div>
</div>
- <div className={styles.recBarWrap}>
+ </div>
+
+ <div className={styles.recPanel}>
+ <div className={styles.recRow}>
+ <div className={styles.recRowLabel}>
+ <MonitorSmartphone size={15} />
+ {t("rec.source")}
+ </div>
<button
type="button"
- className={styles.recIconBtn}
- title="Expand recording widget"
- aria-label="Expand recording widget"
- onClick={() => setCollapsed(false)}
- style={{
- background: "rgba(20, 22, 27, 0.72)",
- border: "1px solid rgba(255,255,255,0.12)",
- }}
+ className={styles.recRowSourceBtn}
+ onClick={() => void openSourceModal()}
>
- <span className={styles.recDot} aria-hidden />
+ {sourceLabel}
+ <ChevronDown size={13} style={{ opacity: 0.6 }} />
</button>
</div>
- </div>
- </div>
- );
- }
- return (
- <div className={styles.recStage}>
- <div className={styles.recFrame} ref={frameRef}>
- <span
- aria-hidden
- style={{
- width: 88,
- height: 88,
- borderRadius: "50%",
- background: "linear-gradient(180deg,#c2c6cc 0%,#676d78 100%)",
- }}
- />
- <div className={styles.recBadge}>
- <span className={styles.recDot} aria-hidden />
- <span>Ready to record</span>
- </div>
-
- <div
- className={styles.recBarWrap}
- style={
- dragPos ? { left: dragPos.x, top: dragPos.y, right: "auto", bottom: "auto" } : undefined
- }
- >
- <div
- ref={barRef}
- className={styles.recBar}
- style={isVertical ? { flexDirection: "column" } : undefined}
- >
- {/* drag handle */}
- <span
- title="Drag to move"
- aria-hidden="true"
- onPointerDown={startDrag}
- className={styles.recDragHandle}
- style={
- isVertical
- ? { gridTemplateColumns: "repeat(3, 3.5px)" }
- : { gridTemplateColumns: "repeat(2, 3.5px)" }
- }
- >
- {Array.from({ length: 6 }).map((_, i) => (
- <span key={i} className={styles.recDragDot} />
- ))}
- </span>
-
- <span className={styles.recBarSep} aria-hidden />
-
- {/* orientation toggle */}
+ <div className={styles.recRow}>
+ <div className={styles.recRowLabel}>
+ {prefs.systemAudioEnabled ? <Volume2 size={15} /> : <VolumeX size={15} />}
+ {t("rec.systemAudio")}
+ </div>
<button
type="button"
- className={styles.recIconBtn}
- title={isVertical ? "Switch to horizontal layout" : "Switch to vertical layout"}
- aria-label={isVertical ? "Switch to horizontal layout" : "Switch to vertical layout"}
- aria-pressed={isVertical}
- onClick={() => setOrientation(isVertical ? "horizontal" : "vertical")}
+ className={`${styles.recToggleBtn}${prefs.systemAudioEnabled ? ` ${styles.on}` : ""}`}
+ aria-pressed={prefs.systemAudioEnabled}
+ onClick={() => updatePrefs({ systemAudioEnabled: !prefs.systemAudioEnabled })}
>
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="1.6"
- strokeLinecap="round"
- strokeLinejoin="round"
- aria-hidden="true"
- >
- {isVertical ? (
- <>
- <rect x="3" y="7" width="18" height="10" rx="3" />
- <path d="M12 7v10" />
- </>
- ) : (
- <>
- <rect x="7" y="3" width="10" height="18" rx="3" />
- <path d="M7 12h10" />
- </>
- )}
- </svg>
+ {prefs.systemAudioEnabled ? t("rec.on") : t("rec.off")}
</button>
+ </div>
- <span className={styles.recBarSep} aria-hidden />
-
- {/* source */}
- <div style={{ position: "relative" }}>
- <button
- type="button"
- className={styles.recBarBtn}
- title="Recording source"
- aria-label="Recording source"
- onClick={() => void openSourceModal()}
- >
- <MonitorSmartphone size={15} />
- {isVertical ? null : <span>{source?.name ?? "Entire Screen"}</span>}
- {isVertical ? null : <ChevronDown size={10} style={{ opacity: 0.6 }} />}
- </button>
+ <div className={styles.recRow}>
+ <div className={styles.recRowLabel}>
+ {prefs.micEnabled ? <MicOn size={15} /> : <MicOff size={15} />}
+ {t("rec.microphone")}
</div>
-
- <span className={styles.recBarSep} aria-hidden />
-
- {/* system audio */}
- <div style={{ position: "relative" }}>
- <button
- type="button"
- className={`${styles.recIconBtn}${prefs.systemAudioEnabled ? ` ${styles.on}` : ""}`}
- title="System audio"
- aria-label="System audio"
- aria-pressed={prefs.systemAudioEnabled}
- onClick={() => toggleMenu("system")}
- >
- {prefs.systemAudioEnabled ? <Volume2 size={15} /> : <VolumeX size={15} />}
- </button>
- {menu === "system" ? (
- <div className={styles.recMenu} style={menuStyle({ left: 0 }, 200)}>
- <button
- type="button"
- className={`${styles.recMenuRow}${prefs.systemAudioEnabled ? ` ${styles.active}` : ""}`}
- onClick={() => {
- updatePrefs({ systemAudioEnabled: !prefs.systemAudioEnabled });
- setMenu(null);
- }}
- >
- {prefs.systemAudioEnabled ? <Volume2 size={14} /> : <VolumeX size={14} />}
- {prefs.systemAudioEnabled ? "Mute system audio" : "Capture system audio"}
- </button>
- </div>
+ <div className={styles.recRowControl}>
+ {prefs.micEnabled ? (
+ <>
+ {micDevices.isLoading ? (
+ <span className={styles.recRowMuted}>
+ <Loader2 size={13} className="animate-spin" />
+ {t("rec.loading")}
+ </span>
+ ) : (
+ <select
+ className={styles.recSelect}
+ value={prefs.micDeviceId ?? micDevices.selectedDeviceId}
+ onChange={(e) => {
+ micDevices.setSelectedDeviceId(e.target.value);
+ updatePrefs({ micDeviceId: e.target.value });
+ }}
+ >
+ {micDevices.devices.map((d) => (
+ <option key={d.deviceId} value={d.deviceId}>
+ {d.label}
+ </option>
+ ))}
+ </select>
+ )}
+ <AudioLevelMeter level={micLevel} className={styles.recLevelMeter} />
+ </>
) : null}
- </div>
-
- {/* mic */}
- <div style={{ position: "relative" }}>
<button
type="button"
- className={`${styles.recIconBtn}${prefs.micEnabled ? ` ${styles.on}` : ""}`}
- title="Microphone"
- aria-label="Microphone"
+ className={`${styles.recToggleBtn}${prefs.micEnabled ? ` ${styles.on}` : ""}`}
aria-pressed={prefs.micEnabled}
- onClick={() => toggleMenu("mic")}
+ onClick={() => updatePrefs({ micEnabled: !prefs.micEnabled })}
>
- {prefs.micEnabled ? <MicOn size={15} /> : <MicOff size={15} />}
+ {prefs.micEnabled ? t("rec.on") : t("rec.off")}
</button>
- {menu === "mic" ? (
- <div
- className={styles.recMenu}
- style={menuStyle({ left: "50%", transform: "translateX(-50%)" }, 220)}
- >
- <button
- type="button"
- className={`${styles.recMenuRow}${!prefs.micEnabled ? ` ${styles.active}` : ""}`}
- onClick={() => {
- updatePrefs({ micEnabled: false });
- setMenu(null);
+ </div>
+ </div>
+
+ <div className={styles.recRow}>
+ <div className={styles.recRowLabel}>
+ {prefs.camEnabled ? <Camera size={15} /> : <CameraOff size={15} />}
+ {t("rec.camera")}
+ </div>
+ <div className={styles.recRowControl}>
+ {prefs.camEnabled ? (
+ camDevices.isLoading ? (
+ <span className={styles.recRowMuted}>
+ <Loader2 size={13} className="animate-spin" />
+ {t("rec.loading")}
+ </span>
+ ) : camDevices.devices.length === 0 ? (
+ <span className={styles.recRowMuted}>{t("rec.noCameraFound")}</span>
+ ) : (
+ <select
+ className={styles.recSelect}
+ value={prefs.camDeviceId ?? camDevices.selectedDeviceId}
+ onChange={(e) => {
+ camDevices.setSelectedDeviceId(e.target.value);
+ updatePrefs({ camDeviceId: e.target.value });
}}
>
- <MicOff size={14} />
- No microphone
- </button>
- {micDevices.isLoading ? (
- <div
- className={styles.recMenuRow}
- style={{ color: "var(--muted)", cursor: "default" }}
- >
- <Loader2 size={14} className="animate-spin" />
- Loading microphones…
- </div>
- ) : (
- micDevices.devices.map((d) => (
- <button
- key={d.deviceId}
- type="button"
- className={`${styles.recMenuRow}${
- prefs.micEnabled && prefs.micDeviceId === d.deviceId
- ? ` ${styles.active}`
- : ""
- }`}
- onClick={() => {
- micDevices.setSelectedDeviceId(d.deviceId);
- updatePrefs({ micEnabled: true, micDeviceId: d.deviceId });
- setMenu(null);
- }}
- >
- <MicOn size={14} />
+ {camDevices.devices.map((d) => (
+ <option key={d.deviceId} value={d.deviceId}>
{d.label}
- </button>
- ))
- )}
- </div>
+ </option>
+ ))}
+ </select>
+ )
) : null}
- </div>
-
- {/* camera */}
- <div style={{ position: "relative" }}>
<button
type="button"
- className={`${styles.recIconBtn}${prefs.camEnabled ? ` ${styles.on}` : ""}`}
- title="Camera"
- aria-label="Camera"
+ className={`${styles.recToggleBtn}${prefs.camEnabled ? ` ${styles.on}` : ""}`}
aria-pressed={prefs.camEnabled}
- onClick={() => toggleMenu("camera")}
+ onClick={() => updatePrefs({ camEnabled: !prefs.camEnabled })}
>
- {prefs.camEnabled ? <Camera size={15} /> : <CameraOff size={15} />}
+ {prefs.camEnabled ? t("rec.on") : t("rec.off")}
</button>
- {menu === "camera" ? (
- <div
- className={styles.recMenu}
- style={menuStyle({ left: "50%", transform: "translateX(-50%)" }, 220)}
- >
- <button
- type="button"
- className={`${styles.recMenuRow}${!prefs.camEnabled ? ` ${styles.active}` : ""}`}
- onClick={() => {
- updatePrefs({ camEnabled: false });
- setMenu(null);
- }}
- >
- <CameraOff size={14} />
- No camera
- </button>
- {camDevices.isLoading ? (
- <div
- className={styles.recMenuRow}
- style={{ color: "var(--muted)", cursor: "default" }}
- >
- <Loader2 size={14} className="animate-spin" />
- Loading cameras…
- </div>
- ) : (
- camDevices.devices.map((d) => (
- <button
- key={d.deviceId}
- type="button"
- className={`${styles.recMenuRow}${
- prefs.camEnabled && prefs.camDeviceId === d.deviceId
- ? ` ${styles.active}`
- : ""
- }`}
- onClick={() => {
- camDevices.setSelectedDeviceId(d.deviceId);
- updatePrefs({ camEnabled: true, camDeviceId: d.deviceId });
- setMenu(null);
- }}
- >
- <Camera size={14} />
- {d.label}
- </button>
- ))
- )}
- </div>
- ) : null}
</div>
+ </div>
- {/* cursor highlight */}
+ <div className={styles.recRow}>
+ <div className={styles.recRowLabel}>
+ <MousePointer2 size={15} />
+ {t("rec.cursorHighlight")}
+ </div>
<button
type="button"
- className={`${styles.recIconBtn}${cursorHighlight ? ` ${styles.on}` : ""}`}
- title={cursorHighlight ? "Hide cursor highlight" : "Show cursor highlight"}
- aria-label="Toggle cursor highlight"
+ className={`${styles.recToggleBtn}${cursorHighlight ? ` ${styles.on}` : ""}`}
aria-pressed={cursorHighlight}
onClick={() =>
updatePrefs({
@@ -488,53 +313,24 @@ export function RecStage({
})
}
>
- <MousePointer2 size={15} />
- </button>
-
- <span className={styles.recBarSep} aria-hidden />
-
- {/* switch to the real floating recording widget — moved here from
- the topbar's old generic "New recording" camera-icon shortcut. */}
- <button
- type="button"
- className={styles.recIconBtn}
- title="Switch to recording widget"
- aria-label="Switch to recording widget"
- onClick={onStartRecording}
- >
- <AppWindow size={15} />
- </button>
-
- <span className={styles.recBarSep} aria-hidden />
-
- {/* minimize / close */}
- <button
- type="button"
- className={styles.recIconBtn}
- title="Minimize"
- aria-label="Minimize"
- onClick={() => setCollapsed(true)}
- >
- <Minus size={14} />
+ {cursorHighlight ? t("rec.on") : t("rec.off")}
</button>
- {onClose ? (
- <button
- type="button"
- className={styles.recIconBtn}
- title="Close"
- aria-label="Close"
- onClick={onClose}
- >
- <X size={14} />
- </button>
- ) : null}
</div>
</div>
</div>
- {menu ? (
- <div style={{ position: "fixed", inset: 0, zIndex: 20 }} onClick={() => setMenu(null)} />
- ) : null}
+ <div className={styles.recActions}>
+ {onClose ? (
+ <button type="button" className={styles.recCancelBtn} onClick={onClose}>
+ {t("rec.cancel")}
+ </button>
+ ) : null}
+ <button type="button" className={styles.bigRecBtn} onClick={onStartRecording}>
+ <span className={styles.bigRecDot} aria-hidden />
+ {t("rec.startRecording")}
+ </button>
+ </div>
+ <p className={styles.recActionsHint}>{t("rec.startRecordingHint")}</p>
{sourceModalOpen ? (
<SourceModal
@@ -549,13 +345,6 @@ export function RecStage({
onClose={() => setSourceModalOpen(false)}
/>
) : null}
-
- <div className={styles.bigRecWrap}>
- <button type="button" className={styles.bigRecBtn} onClick={onStartRecording}>
- <span className={styles.bigRecDot} aria-hidden />
- Start recording
- </button>
- </div>
</div>
);
}
@@ -581,6 +370,7 @@ function SourceModal({
onSelect: (source: ProcessedDesktopSource) => void;
onClose: () => void;
}) {
+ const t = useScopedT("editor");
return (
<div className={styles.sourceModalOverlay} onClick={onClose}>
<div className={styles.sourceModalCard} onClick={(e) => e.stopPropagation()}>
@@ -590,24 +380,28 @@ function SourceModal({
className={`${styles.sourceModalTab}${tab === "screen" ? ` ${styles.active}` : ""}`}
onClick={() => onTabChange("screen")}
>
- Screens ({screenCount})
+ {t("rec.sourceModal.screens", { count: screenCount })}
</button>
<button
type="button"
className={`${styles.sourceModalTab}${tab === "window" ? ` ${styles.active}` : ""}`}
onClick={() => onTabChange("window")}
>
- Windows ({windowCount})
+ {t("rec.sourceModal.windows", { count: windowCount })}
</button>
</div>
<div className={styles.sourceGrid}>
{loading ? (
<div className={styles.sourceModalEmpty}>
<Loader2 size={20} className="animate-spin" />
- Loading sources…
+ {t("rec.sourceModal.loadingSources")}
</div>
) : sources.length === 0 ? (
- <div className={styles.sourceModalEmpty}>No {tab}s found</div>
+ <div className={styles.sourceModalEmpty}>
+ {tab === "screen"
+ ? t("rec.sourceModal.noScreensFound")
+ : t("rec.sourceModal.noWindowsFound")}
+ </div>
) : (
sources.map((s) => (
<button
@@ -626,7 +420,7 @@ function SourceModal({
</div>
<div className={styles.sourceModalFooter}>
<button type="button" className={styles.sourceModalCancelBtn} onClick={onClose}>
- Cancel
+ {t("rec.sourceModal.cancel")}
</button>
</div>
</div>
diff --git a/src/components/ai-edition/v4/V4Timeline.tsx b/src/components/ai-edition/v4/V4Timeline.tsx
index eba5f0aaa..c82063401 100644
--- a/src/components/ai-edition/v4/V4Timeline.tsx
+++ b/src/components/ai-edition/v4/V4Timeline.tsx
@@ -22,6 +22,9 @@ import {
import { toast } from "sonner";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
import { fromFileUrl } from "@/components/video-editor/projectPersistence";
+import { ZOOM_DEPTH_SCALES } from "@/components/video-editor/types";
+import { useScopedT } from "@/contexts/I18nContext";
+import { useAudioPeaks } from "@/hooks/useAudioPeaks";
import { createId } from "@/lib/ai-edition/document/ids";
import type { AxcutClip } from "@/lib/ai-edition/schema";
import { useChatPromptBus } from "@/lib/ai-edition/store/useChatPromptBus";
@@ -36,7 +39,7 @@ import {
import { buildAutoZoomSuggestions } from "@/lib/ai-edition/timeline/zoom-suggestions";
import { nativeBridgeClient } from "@/native/client";
import { ASPECT_RATIOS } from "@/utils/aspectRatioUtils";
-import { EditClipModal } from "../Modals";
+import { TransportBar } from "../TransportBar";
import type { VideoSource } from "../VirtualPreview";
import styles from "./EditorShellV4.module.css";
@@ -58,21 +61,67 @@ function fmt(sec: number): string {
return `${m}:${s.padStart(4, "0")}`;
}
-// Deterministic pseudo-random waveform bar heights (0..1), seeded per clip —
-// ported verbatim from the v4 design's `waveformFor`.
-function waveformFor(seed: number, count: number): number[] {
- let x = seed * 9301 + 49297;
- const rand = () => {
- x = (x * 9301 + 49297) % 233280;
- return x / 233280;
- };
- const bars: number[] = [];
- let v = 0.55;
- for (let i = 0; i < count; i++) {
- v = v * 0.6 + rand() * 0.4;
- bars.push(0.3 + v * 0.7);
- }
- return bars;
+// Real per-clip audio waveform, sliced from the underlying asset's decoded
+// peaks (useAudioPeaks) down to this clip's [sourceStartSec, sourceEndSec]
+// range. A separate component (not inline in the clips .map) so each clip
+// gets its own hook call — useAudioPeaks caches by URL, so clips sharing an
+// asset only decode once. Renders nothing while decoding or if the source has
+// no audio track, so the clip pill just shows its label until peaks arrive.
+function ClipWaveform({
+ videoUrl,
+ assetDurationSec,
+ sourceStartSec,
+ sourceEndSec,
+}: {
+ videoUrl: string | undefined;
+ assetDurationSec: number | undefined;
+ sourceStartSec: number;
+ sourceEndSec: number;
+}) {
+ const peaks = useAudioPeaks(videoUrl);
+ const bars = useMemo(() => {
+ if (!peaks || peaks.length === 0 || !assetDurationSec) return null;
+ const totalBlocks = Math.floor(peaks.length / 2);
+ if (totalBlocks === 0) return null;
+ const blocksPerSec = totalBlocks / assetDurationSec;
+ const startBlock = Math.max(0, Math.floor(sourceStartSec * blocksPerSec));
+ const endBlock = Math.min(totalBlocks, Math.ceil(sourceEndSec * blocksPerSec));
+ const rangeBlocks = Math.max(1, endBlock - startBlock);
+ // One bar per ~120ms of clip duration — dense enough to read as a
+ // continuous waveform rather than a handful of scattered ticks.
+ const barCount = Math.max(20, Math.round((sourceEndSec - sourceStartSec) * 8));
+ const result: number[] = [];
+ for (let i = 0; i < barCount; i++) {
+ const blockStart = startBlock + Math.floor((i / barCount) * rangeBlocks);
+ const blockEnd = Math.max(
+ blockStart + 1,
+ startBlock + Math.floor(((i + 1) / barCount) * rangeBlocks),
+ );
+ let amp = 0;
+ for (let b = blockStart; b < blockEnd && b < totalBlocks; b++) {
+ const lo = Math.abs(peaks[b * 2] ?? 0);
+ const hi = Math.abs(peaks[b * 2 + 1] ?? 0);
+ amp = Math.max(amp, lo, hi);
+ }
+ result.push(amp);
+ }
+ return result;
+ }, [peaks, assetDurationSec, sourceStartSec, sourceEndSec]);
+
+ if (!bars) return null;
+ return (
+ <div aria-hidden className={styles.tlWave}>
+ {bars.map((h, bi) => (
+ <span
+ key={bi}
+ style={{
+ height: `${Math.max(8, Math.round(h * 100))}%`,
+ opacity: (0.5 + h * 0.5).toFixed(2),
+ }}
+ />
+ ))}
+ </div>
+ );
}
interface LanePill {
@@ -92,6 +141,14 @@ export function V4Timeline({
variant = "edit",
onDropAsset,
videoSources = [],
+ playing,
+ loop,
+ onTogglePlay,
+ onPrevClip,
+ onNextClip,
+ onToggleLoop,
+ onExpand,
+ onEditClip,
}: {
tl: TimelineApi;
currentTimeSec: number;
@@ -99,7 +156,18 @@ export function V4Timeline({
variant?: "edit" | "media";
onDropAsset?: (assetId: string) => void;
videoSources?: VideoSource[];
+ playing: boolean;
+ loop: boolean;
+ onTogglePlay: () => void;
+ onPrevClip: () => void;
+ onNextClip: () => void;
+ onToggleLoop: () => void;
+ onExpand: () => void;
+ /** Opens the (now single, shell-level) EditClipModal for this clip —
+ * trim in/out and crop both live there per-clip. */
+ onEditClip: (clip: AxcutClip) => void;
}) {
+ const t = useScopedT("timeline");
const tracksRef = useRef<HTMLDivElement | null>(null);
const navRef = useRef<HTMLDivElement | null>(null);
const clipsRef = useRef<HTMLDivElement | null>(null);
@@ -122,7 +190,6 @@ export function V4Timeline({
pointerDeltaX: number;
shiftPx: number;
} | null>(null);
- const [editClipTarget, setEditClipTarget] = useState<AxcutClip | null>(null);
const { settings, set: setSettings } = useEditorSettings();
const [aspectMenuOpen, setAspectMenuOpen] = useState(false);
@@ -150,7 +217,7 @@ export function V4Timeline({
kind: "annotation",
start: a.startMs / 1000,
end: a.endMs / 1000,
- label: "New annotation",
+ label: t("toolbar.newAnnotation"),
sourceIds: [a.id],
}));
const speedPills: LanePill[] = tl.speedRegions.map((s) => ({
@@ -166,7 +233,10 @@ export function V4Timeline({
kind: "zoom",
start: z.startMs / 1000,
end: z.endMs / 1000,
- label: `${(((z as { depth?: number }).depth ?? 3) / 2 + 0.5).toFixed(1)}×`,
+ // Matches RightPanelStack's effectiveZoomScale: a custom scale (from the
+ // slider) overrides the depth preset; otherwise show the depth's actual
+ // preset value, not a fabricated linear approximation of it.
+ label: `${(z.customScale ?? ZOOM_DEPTH_SCALES[z.depth]).toFixed(2)}×`,
sourceIds: [z.id],
}));
// trims: content-free (no per-instance text/settings), so touching rows —
@@ -508,9 +578,9 @@ export function V4Timeline({
);
const tools: Array<{ id: ToolId; label: string; icon: React.ReactNode }> = [
- { id: "cut", label: "Add trim at playhead", icon: <SplitSquareHorizontal size={15} /> },
- { id: "comment", label: "Comment", icon: <MessageSquare size={15} /> },
- { id: "speed", label: "Speed", icon: <Clock size={15} /> },
+ { id: "cut", label: t("buttons.addTrim"), icon: <SplitSquareHorizontal size={15} /> },
+ { id: "comment", label: t("toolbar.comment"), icon: <MessageSquare size={15} /> },
+ { id: "speed", label: t("buttons.addSpeed"), icon: <Clock size={15} /> },
];
// Auto-enhance option 1 — the deterministic cursor-telemetry auto-zoom
@@ -521,7 +591,7 @@ export function V4Timeline({
const source = videoSources[0];
const asset = tl.assets.find((a) => a.id === source?.id) ?? tl.assets[0];
if (!source || !asset) {
- toast.error("Import a recording first");
+ toast.error(t("toolbar.importRecordingFirst"));
return;
}
setAutoBusy(true);
@@ -535,30 +605,31 @@ export function V4Timeline({
defaultDurationMs: 2000,
});
if (suggestions.length === 0) {
- toast.info("No auto-zoom moments found", {
- description:
- "This recording has no cursor movement data, or existing zooms already cover the busy moments.",
+ toast.info(t("toolbar.noAutoZoomMoments"), {
+ description: t("toolbar.noAutoZoomMomentsDescription"),
});
return;
}
const added = await tl.addZoomsBulk(suggestions);
- toast.success(`Added ${added} automatic zoom${added === 1 ? "" : "s"}`);
+ toast.success(
+ t(added === 1 ? "toolbar.addedAutoZoom" : "toolbar.addedAutoZoomPlural", { count: added }),
+ );
} catch (err) {
- toast.error("Auto-zoom failed", {
+ toast.error(t("toolbar.autoZoomFailed"), {
description: err instanceof Error ? err.message : String(err),
});
} finally {
setAutoBusy(false);
}
- }, [videoSources, tl]);
+ }, [videoSources, tl, t]);
// Auto-enhance option 2 — hand a generic prompt to the AI agent (smart
// zooms + cuts) via the chat prompt-bus.
const runAiEnhance = useCallback(() => {
setAutoEnhanceOpen(false);
useChatPromptBus.getState().submit(AI_ENHANCE_PROMPT);
- toast.success("Asked the AI agent to enhance this recording");
- }, []);
+ toast.success(t("toolbar.aiEnhanceRequested"));
+ }, [t]);
const isPillSelected = (id: string) =>
tl.selection?.id === id || tl.multiSelection.some((m) => m.id === id);
@@ -717,14 +788,14 @@ export function V4Timeline({
<div className={styles.tl}>
<div className={styles.tlToolbar}>
{showLanes ? (
- <div className={styles.tlTools} role="toolbar" aria-label="Timeline tools">
+ <div className={styles.tlTools} role="toolbar" aria-label={t("toolbar.timelineTools")}>
<Popover open={autoEnhanceOpen} onOpenChange={setAutoEnhanceOpen}>
<PopoverTrigger asChild>
<button
type="button"
className={styles.tlToolBtn}
- title="Auto-enhance"
- aria-label="Auto-enhance"
+ title={t("toolbar.autoEnhance")}
+ aria-label={t("toolbar.autoEnhance")}
disabled={autoBusy}
>
{autoBusy ? <Loader2 className="animate-spin" size={15} /> : <Wand2 size={15} />}
@@ -747,44 +818,46 @@ export function V4Timeline({
>
<ZoomIn size={15} style={{ flexShrink: 0 }} />
<span style={{ display: "flex", flexDirection: "column", gap: 1 }}>
- <span style={{ fontWeight: 600 }}>Automatic zooms</span>
+ <span style={{ fontWeight: 600 }}>{t("toolbar.automaticZooms")}</span>
<span style={{ fontSize: 11, color: "var(--muted)" }}>
- From recorded cursor movement
+ {t("toolbar.automaticZoomsHint")}
</span>
</span>
</button>
<button type="button" className={styles.recMenuRow} onClick={runAiEnhance}>
<Sparkles size={15} style={{ flexShrink: 0 }} />
<span style={{ display: "flex", flexDirection: "column", gap: 1 }}>
- <span style={{ fontWeight: 600 }}>Smart zooms + cuts</span>
- <span style={{ fontSize: 11, color: "var(--muted)" }}>With AI</span>
+ <span style={{ fontWeight: 600 }}>{t("toolbar.smartZoomsAndCuts")}</span>
+ <span style={{ fontSize: 11, color: "var(--muted)" }}>
+ {t("toolbar.smartZoomsAndCutsHint")}
+ </span>
</span>
</button>
</div>
</PopoverContent>
</Popover>
<span className={styles.tlToolSep} aria-hidden />
- {tools.map((t) => (
+ {tools.map((tool) => (
<button
type="button"
- key={t.id}
+ key={tool.id}
className={styles.tlToolBtn}
- title={t.label}
- aria-label={t.label}
+ title={tool.label}
+ aria-label={tool.label}
onClick={() => {
- if (t.id === "speed") void tl.addSpeed();
- if (t.id === "comment") void tl.addAnnotation();
- if (t.id === "cut") void tl.addTrim();
+ if (tool.id === "speed") void tl.addSpeed();
+ if (tool.id === "comment") void tl.addAnnotation();
+ if (tool.id === "cut") void tl.addTrim();
}}
>
- {t.icon}
+ {tool.icon}
</button>
))}
<button
type="button"
className={styles.tlToolBtn}
- title="Add zoom"
- aria-label="Add zoom"
+ title={t("buttons.addZoom")}
+ aria-label={t("buttons.addZoom")}
onClick={() => void tl.addZoom()}
>
<ZoomIn size={15} />
@@ -795,8 +868,8 @@ export function V4Timeline({
<button
type="button"
className={styles.tlAspect}
- title="Aspect ratio"
- aria-label="Aspect ratio"
+ title={t("toolbar.aspectRatio")}
+ aria-label={t("toolbar.aspectRatio")}
>
{settings.aspectRatio}
<ChevronDown size={10} />
@@ -834,19 +907,31 @@ export function V4Timeline({
) : (
<div style={{ display: "flex", flexDirection: "column", gap: 2 }}>
<span style={{ fontSize: 12.5, fontWeight: 600, color: "var(--fg-2)" }}>
- Arrange clips
+ {t("toolbar.arrangeClips")}
</span>
<span style={{ fontSize: 11.5, color: "var(--meta)" }}>
- Drag clips below to reorder or drop new ones in
+ {t("toolbar.arrangeClipsHint")}
</span>
</div>
)}
+ <TransportBar
+ playing={playing}
+ loop={loop}
+ currentTimeSec={currentTimeSec}
+ clips={clips}
+ onTogglePlay={onTogglePlay}
+ onPrevClip={onPrevClip}
+ onNextClip={onNextClip}
+ onToggleLoop={onToggleLoop}
+ onExpand={onExpand}
+ onSeek={setCurrentTime}
+ />
<div className={styles.tlHints}>
<span className={styles.tlHint}>
- <span className={styles.tlKbd}>Scroll</span> Pan
+ <span className={styles.tlKbd}>Scroll</span> {t("labels.pan")}
</span>
<span className={styles.tlHint}>
- <span className={styles.tlKbd}>Ctrl+Scroll</span> Zoom
+ <span className={styles.tlKbd}>Ctrl+Scroll</span> {t("labels.zoom")}
</span>
</div>
</div>
@@ -879,9 +964,13 @@ export function V4Timeline({
{showLanes ? (
<>
- <div className={styles.tlLane}>{renderPills(annPills, "No annotations yet")}</div>
- <div className={styles.tlLane}>{renderPills(speedPills, "Constant speed")}</div>
- <div className={styles.tlLane}>{renderPills(trimPills, "No trims")}</div>
+ <div className={styles.tlLane}>
+ {renderPills(annPills, t("toolbar.noAnnotationsYet"))}
+ </div>
+ <div className={styles.tlLane}>
+ {renderPills(speedPills, t("toolbar.constantSpeed"))}
+ </div>
+ <div className={styles.tlLane}>{renderPills(trimPills, t("toolbar.noTrims"))}</div>
<div className={styles.tlLane}>{renderPills(zoomPills, "")}</div>
</>
) : null}
@@ -904,7 +993,8 @@ export function V4Timeline({
>
{clips.map((c, i) => {
const dur = c.timelineEndSec - c.timelineStartSec;
- const bars = waveformFor(i + 1, Math.max(12, Math.round(dur * 0.6)));
+ const asset = tl.assets.find((a) => a.id === c.assetId);
+ const clipVideoUrl = videoSources.find((v) => v.id === c.assetId)?.src;
const selected = tl.clipSelection === c.id;
const dragging = clipDrag?.id === c.id;
// Siblings between the dragged clip's origin and its live
@@ -943,29 +1033,24 @@ export function V4Timeline({
}}
onDoubleClick={(e) => {
e.stopPropagation();
- setEditClipTarget(c);
+ onEditClip(c);
}}
- title="Drag to reorder · double-click to edit in/out points"
+ title={t("toolbar.dragToReorderHint")}
>
- <div aria-hidden className={styles.tlWave}>
- {bars.map((h, bi) => (
- <span
- key={bi}
- style={{
- height: `${Math.round(h * 100)}%`,
- opacity: (0.5 + h * 0.5).toFixed(2),
- }}
- />
- ))}
- </div>
+ <ClipWaveform
+ videoUrl={clipVideoUrl}
+ assetDurationSec={asset?.durationSec}
+ sourceStartSec={c.sourceStartSec}
+ sourceEndSec={c.sourceEndSec ?? c.sourceStartSec + dur}
+ />
<div className={styles.tlClipLabel}>
<span
className={styles.tlClipIcon}
data-no-clip-drag
- title="Edit in/out points"
+ title={t("toolbar.editInOutPoints")}
onClick={(e) => {
e.stopPropagation();
- setEditClipTarget(c);
+ onEditClip(c);
}}
>
<Pencil size={9} />
@@ -979,8 +1064,8 @@ export function V4Timeline({
type="button"
data-no-clip-drag
className={styles.tlClipDelete}
- title="Delete clip"
- aria-label="Delete clip"
+ title={t("toolbar.deleteClip")}
+ aria-label={t("toolbar.deleteClip")}
onClick={(e) => {
e.stopPropagation();
void tl.removeClip(c.id);
@@ -994,7 +1079,7 @@ export function V4Timeline({
})}
{dragOver ? (
<div aria-hidden className={styles.tlDropHint}>
- Drop to add to timeline
+ {t("toolbar.dropToAdd")}
</div>
) : null}
</div>
@@ -1026,27 +1111,6 @@ export function V4Timeline({
<span />
</div>
</div>
-
- <EditClipModal
- open={editClipTarget !== null}
- onClose={() => setEditClipTarget(null)}
- clip={editClipTarget}
- assetMeta={
- editClipTarget
- ? {
- label:
- tl.assets.find((a) => a.id === editClipTarget.assetId)?.label ??
- editClipTarget.assetId,
- durationSec: tl.assets.find((a) => a.id === editClipTarget.assetId)?.durationSec,
- }
- : null
- }
- videoSources={videoSources}
- onApply={(sStart, sEnd) => {
- if (editClipTarget) void tl.updateClipSourceRange(editClipTarget.id, sStart, sEnd);
- setEditClipTarget(null);
- }}
- />
</div>
);
}
diff --git a/src/components/launch/LaunchWindow.module.css b/src/components/launch/LaunchWindow.module.css
index 20b871887..6fc40ac5f 100644
--- a/src/components/launch/LaunchWindow.module.css
+++ b/src/components/launch/LaunchWindow.module.css
@@ -1,83 +1,113 @@
-/* Electron-specific: no Tailwind equivalent for -webkit-app-region */
-.electronDrag {
- -webkit-app-region: drag;
-}
-
-.electronNoDrag {
- -webkit-app-region: no-drag;
-}
-
-.languageMenuScroll {
- max-height: 16rem;
- overflow-y: auto;
- overflow-x: hidden;
- overscroll-behavior: contain;
- touch-action: pan-y;
- -webkit-overflow-scrolling: touch;
-}
-
-.languageMenuScroll::-webkit-scrollbar {
- width: 8px;
-}
-
-.languageMenuScroll::-webkit-scrollbar-track {
- background: rgba(255, 255, 255, 0.04);
- border-radius: 999px;
-}
-
-.languageMenuScroll::-webkit-scrollbar-thumb {
- background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.2));
- border-radius: 999px;
- border: 1px solid rgba(255, 255, 255, 0.15);
-}
-
-.languageMenuScroll::-webkit-scrollbar-thumb:hover {
- background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.3));
-}
-
-.languageMenuContainer {
- position: relative;
- z-index: 20;
-}
-
-.languageMenuPanel {
- position: fixed;
- right: 0;
- top: 0;
- width: 11rem;
- padding: 0.25rem;
- border-radius: 0.625rem;
- border: 1px solid rgba(255, 255, 255, 0.1);
- background: rgba(8, 9, 12, 0.96);
- box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.045);
- backdrop-filter: blur(18px) saturate(140%);
- pointer-events: auto;
- box-sizing: border-box;
-}
-
-.languageMenuItem {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0.425rem 0.5rem;
- border-radius: 0.45rem;
- font-size: 11px;
- color: rgba(255, 255, 255, 0.72);
- background: transparent;
- border: 0;
- cursor: pointer;
- transition: background-color 120ms ease, color 120ms ease;
-}
-
-.languageMenuItem:hover,
-.languageMenuItem:focus-visible {
- background: rgba(255, 255, 255, 0.075);
- color: #ffffff;
- outline: none;
-}
-
-.languageMenuItemActive {
- background: rgba(52, 178, 123, 0.14);
- color: #ffffff;
-}
+/* Electron-specific: no Tailwind equivalent for -webkit-app-region */
+.electronDrag {
+ -webkit-app-region: drag;
+}
+
+.electronNoDrag {
+ -webkit-app-region: no-drag;
+}
+
+.languageMenuScroll {
+ max-height: 20rem;
+ overflow-y: auto;
+ overflow-x: hidden;
+ overscroll-behavior: contain;
+ touch-action: pan-y;
+ -webkit-overflow-scrolling: touch;
+}
+
+.languageMenuScroll::-webkit-scrollbar {
+ width: 8px;
+}
+
+.languageMenuScroll::-webkit-scrollbar-track {
+ background: rgba(255, 255, 255, 0.04);
+ border-radius: 999px;
+}
+
+.languageMenuScroll::-webkit-scrollbar-thumb {
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.2));
+ border-radius: 999px;
+ border: 1px solid rgba(255, 255, 255, 0.15);
+}
+
+.languageMenuScroll::-webkit-scrollbar-thumb:hover {
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.3));
+}
+
+.languageMenuContainer {
+ position: relative;
+ z-index: 20;
+}
+
+/* Matches the mic/camera device-picker popovers' visual language (see the
+ activeDeviceMenu panel in LaunchWindow.tsx) so every HUD popover reads as
+ one coherent design. Anchored with `bottom` (set inline) instead of `top`
+ so it opens upward, above the widget, sized to its own content. */
+.languageMenuPanel {
+ position: fixed;
+ right: 0;
+ width: 220px;
+ padding: 6px;
+ border-radius: 15px;
+ border: 1px solid rgba(255, 255, 255, 0.1);
+ background: #1a1e25;
+ box-shadow: 0 20px 44px -14px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
+ pointer-events: auto;
+ box-sizing: border-box;
+}
+
+.languageMenuItem {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 0.425rem 0.5rem;
+ border-radius: 0.45rem;
+ font-size: 11px;
+ color: rgba(255, 255, 255, 0.72);
+ background: transparent;
+ border: 0;
+ cursor: pointer;
+ transition: background-color 120ms ease, color 120ms ease;
+}
+
+.languageMenuItem:hover,
+.languageMenuItem:focus-visible {
+ background: rgba(255, 255, 255, 0.075);
+ color: #ffffff;
+ outline: none;
+}
+
+.languageMenuItemActive {
+ background: rgba(52, 178, 123, 0.14);
+ color: #ffffff;
+}
+
+/* Device-picker popovers (microphone / camera) — reuse the language menu's
+ panel/item/checkmark shell (same floating-menu shape), just add the
+ section-label piece the language menu doesn't need since it has no
+ device grouping. These only ever open while the device is off, so there's
+ no on/off header toggle — the device list is the whole popover body. */
+.hudMenuSectionLabel {
+ padding: 6px 10px 4px;
+ font-family: var(--font-mono, ui-monospace, monospace);
+ font-size: 9.5px;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.4);
+}
+
+/* Thin separators between HUD toolbar control groups. */
+.hudDivider {
+ flex-shrink: 0;
+ background: rgba(255, 255, 255, 0.1);
+}
+.hudDividerHorizontal {
+ width: 1px;
+ height: 22px;
+}
+.hudDividerVertical {
+ width: 22px;
+ height: 1px;
+}
diff --git a/src/components/launch/LaunchWindow.tsx b/src/components/launch/LaunchWindow.tsx
index 00cdfc778..e4bb7cec7 100644
--- a/src/components/launch/LaunchWindow.tsx
+++ b/src/components/launch/LaunchWindow.tsx
@@ -1,44 +1,20 @@
-import {
- Check,
- ChevronDown,
- Clapperboard,
- Columns3,
- Languages,
- Loader2,
- NotepadText,
- Rows3,
-} from "lucide-react";
+import { Check, Languages, Loader2, NotepadText } from "lucide-react";
import { useCallback, useEffect, useRef, useState } from "react";
import { createPortal } from "react-dom";
-import { BsPauseCircle, BsPlayCircle, BsRecordCircle } from "react-icons/bs";
-import { FaRegStopCircle } from "react-icons/fa";
+import { BsPauseCircle, BsPlayCircle } from "react-icons/bs";
import { FaFolderOpen } from "react-icons/fa6";
import { FiMinus, FiX } from "react-icons/fi";
-import {
- MdCancel,
- MdMic,
- MdMicOff,
- MdMonitor,
- MdMouse,
- MdRestartAlt,
- MdVideocam,
- MdVideocamOff,
- MdVideoFile,
- MdVolumeOff,
- MdVolumeUp,
-} from "react-icons/md";
+import { MdCancel, MdRestartAlt, MdVideoFile } from "react-icons/md";
import { RxDragHandleDots2 } from "react-icons/rx";
import { useI18n, useScopedT } from "@/contexts/I18nContext";
import { getAvailableLocales, getLocaleName } from "@/i18n/loader";
import { loadUserPreferences, saveUserPreferences } from "@/lib/userPreferences";
import { nativeBridgeClient } from "@/native";
-import { useAudioLevelMeter } from "../../hooks/useAudioLevelMeter";
import { useCameraDevices } from "../../hooks/useCameraDevices";
import { useMicrophoneDevices } from "../../hooks/useMicrophoneDevices";
import { useScreenRecorder } from "../../hooks/useScreenRecorder";
import { requestCameraAccess } from "../../lib/requestCameraAccess";
import { formatTimePadded } from "../../utils/timeUtils";
-import { AudioLevelMeter } from "../ui/audio-level-meter";
import { Button } from "../ui/button";
import { Tooltip } from "../ui/tooltip";
import styles from "./LaunchWindow.module.css";
@@ -50,23 +26,16 @@ const ICON_SIZE = 20;
const HUD_DEVICE_POPUP_GAP = 28;
// Horizontal layout: mirrors the `bottom-[68px]` class on the popup element.
const HUD_DEVICE_POPUP_HORIZONTAL_BOTTOM = 68;
+// Cap on the language list's own height so it doesn't stretch to fill the whole
+// screen above the widget -- it should size to its content, like the other popovers.
+const LANGUAGE_MENU_MAX_HEIGHT = 320;
const ICON_CONFIG = {
drag: { icon: RxDragHandleDots2, size: ICON_SIZE },
- monitor: { icon: MdMonitor, size: ICON_SIZE },
- volumeOn: { icon: MdVolumeUp, size: ICON_SIZE },
- volumeOff: { icon: MdVolumeOff, size: ICON_SIZE },
- micOn: { icon: MdMic, size: ICON_SIZE },
- micOff: { icon: MdMicOff, size: ICON_SIZE },
- webcamOn: { icon: MdVideocam, size: ICON_SIZE },
- webcamOff: { icon: MdVideocamOff, size: ICON_SIZE },
- cursor: { icon: MdMouse, size: ICON_SIZE },
pause: { icon: BsPauseCircle, size: ICON_SIZE },
resume: { icon: BsPlayCircle, size: ICON_SIZE },
- stop: { icon: FaRegStopCircle, size: ICON_SIZE },
restart: { icon: MdRestartAlt, size: ICON_SIZE },
cancel: { icon: MdCancel, size: ICON_SIZE },
- record: { icon: BsRecordCircle, size: ICON_SIZE },
videoFile: { icon: MdVideoFile, size: ICON_SIZE },
folder: { icon: FaFolderOpen, size: ICON_SIZE },
minimize: { icon: FiMinus, size: ICON_SIZE },
@@ -82,20 +51,152 @@ function getIcon(name: IconName, className?: string) {
return <Icon size={size} className={className} />;
}
+// Custom glyphs matching the Claude Design "OpenScreen Recording Widget"
+// spec exactly (source/audio/mic/camera/cursor/record) — these are the
+// controls most visible in the collapsed toolbar, so the design's own paths
+// are used verbatim rather than the closest lucide/react-icons stand-in.
+const HUD_SVG_PROPS = {
+ width: ICON_SIZE,
+ height: ICON_SIZE,
+ viewBox: "0 0 24 24",
+ fill: "none",
+ stroke: "currentColor",
+ strokeWidth: 1.6,
+ strokeLinecap: "round",
+ strokeLinejoin: "round",
+} as const;
+
+function OrientationIcon({ vertical, className }: { vertical: boolean; className?: string }) {
+ return (
+ <svg {...HUD_SVG_PROPS} className={className} aria-hidden="true">
+ {vertical ? (
+ <>
+ <rect x="3" y="7" width="18" height="10" rx="3" />
+ <path d="M12 7v10" />
+ </>
+ ) : (
+ <>
+ <rect x="7" y="3" width="10" height="18" rx="3" />
+ <path d="M7 12h10" />
+ </>
+ )}
+ </svg>
+ );
+}
+
+function SourceIcon({ className }: { className?: string }) {
+ return (
+ <svg {...HUD_SVG_PROPS} className={className} aria-hidden="true">
+ <rect x="2.5" y="4.5" width="19" height="13" rx="2.2" />
+ <path d="M8.5 21h7M12 17.5v3.3" />
+ </svg>
+ );
+}
+
+function VolumeIcon({ muted, className }: { muted: boolean; className?: string }) {
+ return (
+ <svg {...HUD_SVG_PROPS} className={className} aria-hidden="true">
+ <path
+ d="M10.2 5.6 5.6 9H3a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h2.6l4.6 3.4a.6.6 0 0 0 1-.48V6.08a.6.6 0 0 0-1-.48Z"
+ fill="currentColor"
+ stroke="none"
+ />
+ {muted ? (
+ <path d="M15.2 9.3 19.4 14.7M19.4 9.3l-4.2 5.4" />
+ ) : (
+ <>
+ <path d="M15.5 8.5a5 5 0 0 1 0 7" />
+ <path d="M18 6a9 9 0 0 1 0 12" />
+ </>
+ )}
+ </svg>
+ );
+}
+
+function MicIcon({ muted, className }: { muted: boolean; className?: string }) {
+ return (
+ <svg {...HUD_SVG_PROPS} className={className} aria-hidden="true">
+ <rect x="9" y="3" width="6" height="11" rx="3" />
+ <path d="M18.5 11a6.5 6.5 0 0 1-13 0" />
+ <path d="M12 17.5v3" />
+ {muted ? <path d="M4 4l16 16" /> : null}
+ </svg>
+ );
+}
+
+function CameraIcon({ off, className }: { off: boolean; className?: string }) {
+ return (
+ <svg {...HUD_SVG_PROPS} className={className} aria-hidden="true">
+ <rect x="3" y="6.5" width="13" height="11" rx="2.4" />
+ <path d="M16 10.3 21 7v10l-5-3.3" />
+ {off ? <path d="M4 4l16 16" /> : null}
+ </svg>
+ );
+}
+
+function CursorIcon({ className }: { className?: string }) {
+ return (
+ <svg
+ width={ICON_SIZE}
+ height={ICON_SIZE}
+ viewBox="0 0 24 24"
+ fill="currentColor"
+ stroke="none"
+ className={className}
+ aria-hidden="true"
+ >
+ <path d="M6.7 3.3 6.7 18.3 10.3 14.8 12.7 20.7 15.1 19.7 12.7 13.8 17.3 13.8Z" />
+ </svg>
+ );
+}
+
+function RecordGlyph({ recording, className }: { recording: boolean; className?: string }) {
+ return (
+ <svg
+ width={ICON_SIZE}
+ height={ICON_SIZE}
+ viewBox="0 0 24 24"
+ className={className}
+ aria-hidden="true"
+ >
+ {recording ? (
+ <rect x="6.5" y="6.5" width="11" height="11" rx="2.5" fill="currentColor" />
+ ) : (
+ <circle cx="12" cy="12" r="7.5" fill="currentColor" />
+ )}
+ </svg>
+ );
+}
+
+function OpenInEditorIcon({ className }: { className?: string }) {
+ return (
+ <svg {...HUD_SVG_PROPS} className={className} aria-hidden="true">
+ <path d="M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z" />
+ <path d="m6.2 5.3 3.1 5.4" />
+ <path d="m12.4 3.4 3.1 5.4" />
+ <path d="M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" />
+ </svg>
+ );
+}
+
const hudDisabledClasses =
"disabled:opacity-30 disabled:cursor-not-allowed disabled:pointer-events-none";
-const hudGroupClasses = `flex items-center gap-0.5 rounded-xl border border-white/[0.07] bg-white/[0.045] transition-colors duration-150 hover:bg-white/[0.075] ${hudDisabledClasses}`;
+// Exact values from the design's renderVals() (comfortable density, rounded
+// shape, #10b981 accent) — btnSize 34 / btnRadius 10 / containerRadius 17
+// (btnRadius + padY) / dividerLen 22. Every control is its own standalone
+// transparent icon button (no shared "group" pill background) — grouping
+// reads purely from proximity + the divider spans between logical sections.
+const hudIconBtnClasses = `flex h-[34px] w-[34px] shrink-0 items-center justify-center rounded-[10px] border-0 bg-transparent cursor-pointer text-[#828c99] transition-all duration-150 hover:bg-[#1a1e25] hover:text-[#f5f7fa] active:scale-95 ${hudDisabledClasses}`;
-const hudIconBtnClasses = `flex h-8 w-8 items-center justify-center rounded-lg transition-all duration-150 cursor-pointer text-white hover:bg-white/10 active:scale-95 ${hudDisabledClasses}`;
+const hudAuxIconBtnClasses = `flex h-7 w-7 shrink-0 items-center justify-center rounded-[10px] border-0 bg-transparent cursor-pointer text-[#828c99] transition-colors duration-150 hover:bg-[#1a1e25] hover:text-[#f5f7fa] ${hudDisabledClasses}`;
-const hudAuxIconBtnClasses = `flex h-7 w-7 items-center justify-center rounded-lg transition-colors duration-150 text-white/55 hover:bg-white/10 ${hudDisabledClasses}`;
+const windowBtnClasses = `flex h-[30px] w-[30px] shrink-0 items-center justify-center rounded-[9px] border-0 bg-transparent cursor-pointer text-[#828c99] transition-all duration-150 hover:bg-[#1a1e25] hover:text-[#e9edf3] ${hudDisabledClasses}`;
-const windowBtnClasses = `flex h-8 w-8 items-center justify-center rounded-lg transition-all duration-150 cursor-pointer opacity-50 hover:opacity-90 hover:bg-white/[0.08] ${hudDisabledClasses}`;
+const closeBtnClasses = `flex h-[30px] w-[30px] shrink-0 items-center justify-center rounded-[9px] border-0 bg-transparent cursor-pointer text-[#828c99] transition-all duration-150 hover:bg-[rgba(248,113,113,0.16)] hover:text-[#f87171] ${hudDisabledClasses}`;
-const hudSidebarClasses = "ml-0.5 pl-1.5 border-l border-white/10 flex items-center gap-0.5";
-const hudSidebarVerticalClasses =
- "mt-0.5 pt-1.5 border-t border-white/10 flex flex-col items-center gap-0.5";
+const hudSidebarClasses = "flex items-center gap-[5px]";
+const hudSidebarVerticalClasses = "flex flex-col items-center gap-[5px]";
/** Launches the floating recording HUD and its recorder controls. */
export function LaunchWindow() {
@@ -111,6 +212,10 @@ export function LaunchWindow() {
} = useI18n();
const suggestedLanguageName = systemLocaleSuggestion ? getLocaleName(systemLocaleSuggestion) : "";
const activeLanguageLabel = getLocaleName(locale).split(/\s+/)[0] || locale.toUpperCase();
+ // Short mono-font code shown on the button itself (matches the design's
+ // "EN"/"FR" treatment) — activeLanguageLabel (the full localized name)
+ // stays as the tooltip/aria-label text.
+ const languageCode = locale.split("-")[0].toUpperCase();
const {
recording,
@@ -140,16 +245,20 @@ export function LaunchWindow() {
dismissSoftwareEncoderFallbackNotice,
} = useScreenRecorder();
- const showMicControls = microphoneEnabled && !recording;
- const showWebcamControls = webcamEnabled && !recording;
-
- const [isMicHovered, setIsMicHovered] = useState(false);
- const [isMicFocused, setIsMicFocused] = useState(false);
- const micExpanded = isMicHovered || isMicFocused;
-
- const [isWebcamHovered, setIsWebcamHovered] = useState(false);
- const [isWebcamFocused, setIsWebcamFocused] = useState(false);
- const webcamExpanded = isWebcamHovered || isWebcamFocused;
+ // Device-picker popovers (mic / camera only — system audio has no device
+ // list to pick from, so it's a plain direct toggle) are click-to-open,
+ // mutually exclusive with each other and with the language menu. Unlike
+ // the design's mockup, picking a device IS the activation step and
+ // re-clicking an already-enabled icon disables it directly — no separate
+ // "turn on" popover step, since that was a redundant extra click.
+ const [activeDeviceMenu, setActiveDeviceMenu] = useState<"mic" | "camera" | null>(null);
+ const micTriggerRef = useRef<HTMLButtonElement | null>(null);
+ const camTriggerRef = useRef<HTMLButtonElement | null>(null);
+ const deviceMenuTriggerRefsRef = useRef({
+ mic: micTriggerRef,
+ camera: camTriggerRef,
+ });
+ const deviceMenuTriggerRefs = deviceMenuTriggerRefsRef.current;
const [isLanguageMenuOpen, setIsLanguageMenuOpen] = useState(false);
const [trayLayout, setTrayLayout] = useState<"horizontal" | "vertical">(
() => loadUserPreferences().trayLayout,
@@ -166,45 +275,30 @@ export function LaunchWindow() {
const [hudBarHeight, setHudBarHeight] = useState(0);
const [languageMenuStyle, setLanguageMenuStyle] = useState<{
right: number;
- top: number;
+ bottom: number;
maxHeight: number;
}>({
right: 12,
- top: 12,
- maxHeight: 240,
+ bottom: 12,
+ maxHeight: LANGUAGE_MENU_MAX_HEIGHT,
});
+ // These hooks only enumerate devices while their `enabled` arg is true, but the
+ // device-picker popover now opens precisely while the mic/camera is OFF (picking
+ // a device is what turns it on) -- so it must also enumerate while its own menu
+ // is open, or the picker would always render empty.
const {
devices: micDevices,
selectedDeviceId: selectedMicId,
setSelectedDeviceId: setSelectedMicId,
- } = useMicrophoneDevices(microphoneEnabled);
+ } = useMicrophoneDevices(microphoneEnabled || activeDeviceMenu === "mic");
const {
devices: cameraDevices,
selectedDeviceId: selectedCameraId,
setSelectedDeviceId: setSelectedCameraId,
isLoading: isCameraDevicesLoading,
error: cameraDevicesError,
- } = useCameraDevices(webcamEnabled);
-
- const selectedMicLabel =
- micDevices.find((d) => d.deviceId === (microphoneDeviceId || selectedMicId))?.label ||
- t("audio.defaultMicrophone");
- const selectedCameraDevice = cameraDevices.find(
- (d) => d.deviceId === (webcamDeviceId || selectedCameraId),
- );
- const selectedCameraLabel = isCameraDevicesLoading
- ? t("webcam.searching")
- : cameraDevicesError
- ? t("webcam.unavailable")
- : cameraDevices.length === 0
- ? t("webcam.noneFound")
- : selectedCameraDevice?.label || t("webcam.defaultCamera");
-
- const { level } = useAudioLevelMeter({
- enabled: showMicControls,
- deviceId: microphoneDeviceId,
- });
+ } = useCameraDevices(webcamEnabled || activeDeviceMenu === "camera");
useEffect(() => {
if (selectedMicId && selectedMicId !== "default") {
@@ -279,6 +373,33 @@ export function LaunchWindow() {
};
}, [isLanguageMenuOpen]);
+ useEffect(() => {
+ if (!activeDeviceMenu) return;
+
+ const handlePointerDown = (event: PointerEvent) => {
+ const target = event.target as Node;
+ const clickedTrigger = deviceMenuTriggerRefs[activeDeviceMenu].current?.contains(target);
+ const clickedMenu = deviceSelectorRef.current?.contains(target);
+ if (!clickedTrigger && !clickedMenu) {
+ setActiveDeviceMenu(null);
+ }
+ };
+
+ const handleEscape = (event: KeyboardEvent) => {
+ if (event.key === "Escape") {
+ setActiveDeviceMenu(null);
+ }
+ };
+
+ window.addEventListener("pointerdown", handlePointerDown);
+ window.addEventListener("keydown", handleEscape);
+
+ return () => {
+ window.removeEventListener("pointerdown", handlePointerDown);
+ window.removeEventListener("keydown", handleEscape);
+ };
+ }, [activeDeviceMenu, deviceMenuTriggerRefs]);
+
useEffect(() => {
if (!isLanguageMenuOpen || !languageTriggerRef.current) return;
@@ -287,13 +408,14 @@ export function LaunchWindow() {
const rect = languageTriggerRef.current.getBoundingClientRect();
const gap = 8;
const viewportPadding = 8;
+ // Space between the viewport top and the trigger, in case the screen is too
+ // short for the full LANGUAGE_MENU_MAX_HEIGHT -- clamp to whatever fits.
const availableHeight = Math.max(80, rect.top - viewportPadding - gap);
- const top = Math.max(viewportPadding, rect.top - gap - availableHeight);
setLanguageMenuStyle({
right: Math.max(viewportPadding, window.innerWidth - rect.right),
- top,
- maxHeight: availableHeight,
+ bottom: Math.max(viewportPadding, window.innerHeight - rect.top + gap),
+ maxHeight: Math.min(LANGUAGE_MENU_MAX_HEIGHT, availableHeight),
});
};
@@ -320,8 +442,17 @@ export function LaunchWindow() {
// Resize the overlay window to fit content, else the taller vertical tray gets clipped
// and scrolls. Measure from the window's bottom-centre (the anchor the main process
// preserves) so fixed bottom/centre offsets keep this stable and it doesn't oscillate.
- const lastHudSizeRef = useRef({ width: 0, height: 0 });
- const isDraggingHudRef = useRef(false);
+ //
+ // Only ever GROWS the window (a high-water mark), reset when the orientation changes.
+ // Even with an eased tween, a native OS window resize on every content change (record
+ // starting/stopping, a device popover opening, mic/cam toggling) reads as constant
+ // jitter -- there's no way to make that many resizes-per-minute look smooth. Since the
+ // window is transparent and the bar is centred within it, an oversized window is
+ // invisible: once the widest/tallest state for this orientation has been seen, later
+ // content changes just reflow inside the already-big-enough window via ordinary CSS
+ // (instant, GPU-composited, no native resize at all), and only a genuinely new maximum
+ // triggers the animated resize -- rare enough that its motion is acceptable.
+ const hudAllocatedSizeRef = useRef({ width: 0, height: 0, orientation: trayLayout });
const measureHudSize = useCallback(() => {
const barEl = hudBarRef.current;
if (!barEl || !window.electronAPI?.setHudOverlaySize) return;
@@ -398,12 +529,26 @@ export function LaunchWindow() {
return Math.abs(prev - next) > 1 ? next : prev;
});
- const width = Math.max(MIN_WIDTH, Math.ceil(halfWidth * 2) + SIDE_MARGIN);
- const height = Math.ceil(topFromBottom) + TOP_MARGIN;
- if (width === lastHudSizeRef.current.width && height === lastHudSizeRef.current.height) {
+ const requiredWidth = Math.max(MIN_WIDTH, Math.ceil(halfWidth * 2) + SIDE_MARGIN);
+ const requiredHeight = Math.ceil(topFromBottom) + TOP_MARGIN;
+
+ const allocated = hudAllocatedSizeRef.current;
+ if (allocated.orientation !== trayLayout) {
+ // Different shape entirely (wide-short vs narrow-tall) -- the old high-water
+ // mark doesn't apply, start fresh so we don't carry a stale huge footprint
+ // from the other orientation.
+ allocated.width = 0;
+ allocated.height = 0;
+ allocated.orientation = trayLayout;
+ }
+
+ const width = Math.max(requiredWidth, allocated.width);
+ const height = Math.max(requiredHeight, allocated.height);
+ if (width === allocated.width && height === allocated.height) {
return;
}
- lastHudSizeRef.current = { width, height };
+ allocated.width = width;
+ allocated.height = height;
window.electronAPI.setHudOverlaySize(width, height);
}, [trayLayout]);
@@ -552,11 +697,12 @@ export function LaunchWindow() {
return { opened: false, reason: "electron-api-unavailable" };
};
- const handleRecordButtonClick = () => {
+ const handleRecordButtonClick = (sourceSelectedOverride?: boolean) => {
if (saving) {
return;
}
- if (!hasSelectedSource && !recording) {
+ const sourceSelected = sourceSelectedOverride ?? hasSelectedSource;
+ if (!sourceSelected && !recording) {
recordAfterSourceSelectionRef.current = true;
void openSourceSelector()
.then((result) => {
@@ -573,6 +719,34 @@ export function LaunchWindow() {
toggleRecording();
};
+ // The editor's Rec-mode stage sends this once it hands off to the HUD
+ // (source + prefs already persisted via IPC), so the user doesn't have to
+ // click Record a second time after "Start recording" reopens this window.
+ // The auto-start signal can arrive before this window's own
+ // `checkSelectedSource` poll (above) has resolved its first round-trip, so
+ // `hasSelectedSource` may still be stale — fetch a fresh value here instead
+ // of trusting it, otherwise auto-start can wrongly fall through to opening
+ // the source selector instead of actually starting the recording.
+ const handleRecordButtonClickRef = useRef(handleRecordButtonClick);
+ handleRecordButtonClickRef.current = handleRecordButtonClick;
+ const hasSelectedSourceRef = useRef(hasSelectedSource);
+ hasSelectedSourceRef.current = hasSelectedSource;
+ useEffect(() => {
+ return window.electronAPI?.onAutoStartRecording?.(() => {
+ void (async () => {
+ let sourceSelected = hasSelectedSourceRef.current;
+ try {
+ const source = await window.electronAPI?.getSelectedSource?.();
+ sourceSelected = !!source;
+ applySelectedSource(source ?? null);
+ } catch (error) {
+ console.warn("Failed to refresh selected source before auto-start:", error);
+ }
+ handleRecordButtonClickRef.current(sourceSelected);
+ })();
+ });
+ }, [applySelectedSource]);
+
const sendHudOverlayHide = () => {
if (window.electronAPI && window.electronAPI.hudOverlayHide) {
window.electronAPI.hudOverlayHide();
@@ -756,12 +930,21 @@ export function LaunchWindow() {
</div>
)}
- {/* Device selectors, fixed above HUD bar, viewport-relative, never clipped */}
- {(showMicControls || showWebcamControls) && (
+ {/* Device pickers: mic / camera only (system audio has no device list,
+ it's a plain toggle). This popover ONLY ever opens while the device
+ is disabled — picking a device turns it on and closes the popover
+ immediately; toggling off happens with a single click on the icon
+ itself (see the trigger buttons below), no popover involved. Fixed
+ above the HUD bar (or beside it in vertical layout), viewport-
+ relative, never clipped -- reuses the same measured-position wiring
+ the old combined mic/webcam panel used (deviceSelectorRef feeds
+ measureHudSize so the overlay window grows to fit whichever popover
+ is open). Only one popover is open at a time (see activeDeviceMenu). */}
+ {activeDeviceMenu && (
<div
ref={setDeviceSelectorEl}
data-hud-interactive="true"
- className={`fixed left-1/2 -translate-x-1/2 flex items-center gap-2 animate-mic-panel-in ${trayLayout === "vertical" ? "" : "bottom-[68px]"} ${styles.electronNoDrag}`}
+ className={`fixed left-1/2 w-[220px] -translate-x-1/2 rounded-[15px] border border-white/10 bg-[#1a1e25] p-1.5 shadow-[0_20px_44px_-14px_rgba(0,0,0,0.6),0_4px_12px_rgba(0,0,0,0.4)] backdrop-blur-2xl animate-mic-panel-in ${trayLayout === "vertical" ? "" : "bottom-[68px]"} ${styles.electronNoDrag}`}
style={
trayLayout === "vertical"
? // Sit above the tall vertical tray, anchored to the measured bar
@@ -770,137 +953,74 @@ export function LaunchWindow() {
: undefined
}
>
- {/* Mic selector */}
- {showMicControls && (
- <div
- className={`flex h-9 items-center gap-2 overflow-hidden rounded-xl border border-white/[0.08] bg-[#0b0c10]/90 px-3 py-1.5 shadow-[0_18px_42px_rgba(0,0,0,0.4)] backdrop-blur-2xl transition-all duration-300 ${!micExpanded ? "opacity-60 grayscale-[0.5]" : "opacity-100"}`}
- onMouseEnter={() => setIsMicHovered(true)}
- onMouseLeave={() => setIsMicHovered(false)}
- onFocus={() => setIsMicFocused(true)}
- onBlur={() => setIsMicFocused(false)}
- style={{
- width: micExpanded ? "240px" : "140px",
- transition: "width 300ms ease",
- }}
- >
- <div className="relative flex-1 min-w-0">
- {!micExpanded && (
- <div className="text-white/60 text-[10px] font-medium truncate">
- {selectedMicLabel}
- </div>
- )}
- <select
- value={microphoneDeviceId || selectedMicId}
- onChange={(e) => {
- const selectedDevice = micDevices.find((d) => d.deviceId === e.target.value);
- setSelectedMicId(e.target.value);
- setMicrophoneDeviceId(e.target.value);
- setMicrophoneDeviceName(selectedDevice?.label);
- }}
- className={`w-full appearance-none bg-white/5 text-white text-[11px] rounded-lg pl-2 pr-6 py-1 border border-white/10 outline-none hover:bg-white/10 transition-colors cursor-pointer ${!micExpanded ? "sr-only" : ""}`}
- >
- {micDevices.map((device) => (
- <option key={device.deviceId} value={device.deviceId} className="bg-[#1c1c24]">
- {device.label}
- </option>
- ))}
- </select>
- {micExpanded && (
- <ChevronDown
- size={12}
- className="absolute right-1.5 top-1/2 -translate-y-1/2 text-white/40 pointer-events-none"
- />
- )}
- </div>
- <AudioLevelMeter
- level={level}
- className={`${micExpanded ? "w-16" : "w-8"} h-2 transition-all duration-300`}
- />
- </div>
- )}
-
- {/* Webcam selector */}
- {showWebcamControls && (
- <div
- className={`flex h-9 items-center gap-2 overflow-hidden rounded-xl border border-white/[0.08] bg-[#0b0c10]/90 px-3 py-1.5 shadow-[0_18px_42px_rgba(0,0,0,0.4)] backdrop-blur-2xl transition-all duration-300 ${!webcamExpanded ? "opacity-60 grayscale-[0.5]" : "opacity-100"}`}
- onMouseEnter={() => setIsWebcamHovered(true)}
- onMouseLeave={() => setIsWebcamHovered(false)}
- onFocus={() => setIsWebcamFocused(true)}
- onBlur={() => setIsWebcamFocused(false)}
- style={{
- width: webcamExpanded ? "240px" : "140px",
- transition: "width 300ms ease",
- }}
- >
- <div className="relative flex-1 min-w-0">
- {!webcamExpanded && (
- <div className="text-white/60 text-[10px] font-medium truncate">
- {selectedCameraLabel}
- </div>
- )}
- {webcamExpanded &&
- (isCameraDevicesLoading ? (
- <span className="text-white/40 text-[10px] italic">
- {t("webcam.searching")}
- </span>
- ) : cameraDevicesError ? (
- <span className="text-white/40 text-[10px] italic">
- {t("webcam.unavailable")}
- </span>
- ) : cameraDevices.length === 0 ? (
- <span className="text-white/40 text-[10px] italic">
- {t("webcam.noneFound")}
- </span>
- ) : (
- <>
- <select
- value={webcamDeviceId || selectedCameraId}
- onChange={(e) => {
- const device = cameraDevices.find(
- (item) => item.deviceId === e.target.value,
- );
- setSelectedCameraId(e.target.value);
- setWebcamDeviceId(e.target.value);
- setWebcamDeviceName(device?.label);
- }}
- className="w-full appearance-none bg-white/5 text-white text-[11px] rounded-lg pl-2 pr-6 py-1 border border-white/10 outline-none hover:bg-white/10 transition-colors cursor-pointer"
- >
- {cameraDevices.map((device) => (
- <option
- key={device.deviceId}
- value={device.deviceId}
- className="bg-[#1c1c24]"
- >
- {device.label}
- </option>
- ))}
- </select>
- <ChevronDown
- size={12}
- className="absolute right-1.5 top-1/2 -translate-y-1/2 text-white/40 pointer-events-none"
- />
- </>
- ))}
- {(!webcamExpanded || cameraDevices.length === 0) && (
- <select
- value={webcamDeviceId || selectedCameraId}
- onChange={(e) => {
- const device = cameraDevices.find((item) => item.deviceId === e.target.value);
- setSelectedCameraId(e.target.value);
- setWebcamDeviceId(e.target.value);
- setWebcamDeviceName(device?.label);
+ {activeDeviceMenu === "mic" && (
+ <>
+ <div className={styles.hudMenuSectionLabel}>{t("audio.inputDevice")}</div>
+ {micDevices.map((device) => {
+ const isActive = device.deviceId === (microphoneDeviceId || selectedMicId);
+ return (
+ <button
+ key={device.deviceId}
+ type="button"
+ role="menuitemradio"
+ aria-checked={isActive}
+ onClick={() => {
+ setSelectedMicId(device.deviceId);
+ setMicrophoneDeviceId(device.deviceId);
+ setMicrophoneDeviceName(device.label);
+ setMicrophoneEnabled(true);
+ setActiveDeviceMenu(null);
}}
- className="sr-only"
+ className={`${styles.languageMenuItem} ${isActive ? styles.languageMenuItemActive : ""}`}
>
- {cameraDevices.map((device) => (
- <option key={device.deviceId} value={device.deviceId}>
- {device.label}
- </option>
- ))}
- </select>
- )}
- </div>
- </div>
+ <span className="truncate">{device.label}</span>
+ {isActive ? <Check size={11} className="text-white/85" /> : null}
+ </button>
+ );
+ })}
+ </>
+ )}
+
+ {activeDeviceMenu === "camera" && (
+ <>
+ <div className={styles.hudMenuSectionLabel}>{t("webcam.cameraDevice")}</div>
+ {isCameraDevicesLoading ? (
+ <div className="px-2.5 py-2 text-[11px] italic text-white/40">
+ {t("webcam.searching")}
+ </div>
+ ) : cameraDevicesError ? (
+ <div className="px-2.5 py-2 text-[11px] italic text-white/40">
+ {t("webcam.unavailable")}
+ </div>
+ ) : cameraDevices.length === 0 ? (
+ <div className="px-2.5 py-2 text-[11px] italic text-white/40">
+ {t("webcam.noneFound")}
+ </div>
+ ) : (
+ cameraDevices.map((device) => {
+ const isActive = device.deviceId === (webcamDeviceId || selectedCameraId);
+ return (
+ <button
+ key={device.deviceId}
+ type="button"
+ role="menuitemradio"
+ aria-checked={isActive}
+ onClick={async () => {
+ setSelectedCameraId(device.deviceId);
+ setWebcamDeviceId(device.deviceId);
+ setWebcamDeviceName(device.label);
+ await setWebcamEnabled(true);
+ setActiveDeviceMenu(null);
+ }}
+ className={`${styles.languageMenuItem} ${isActive ? styles.languageMenuItemActive : ""}`}
+ >
+ <span className="truncate">{device.label}</span>
+ {isActive ? <Check size={11} className="text-white/85" /> : null}
+ </button>
+ );
+ })
+ )}
+ </>
)}
</div>
)}
@@ -910,10 +1030,10 @@ export function LaunchWindow() {
ref={setHudBarEl}
data-hud-interactive="true"
data-tray-layout={trayLayout}
- className={`fixed bottom-5 left-1/2 -translate-x-1/2 flex rounded-2xl border border-white/[0.10] bg-[#07080a]/90 backdrop-blur-2xl backdrop-saturate-[140%] ${
+ className={`fixed bottom-5 left-1/2 -translate-x-1/2 flex rounded-[17px] border border-[#242932] bg-[#14171c] shadow-[0_2px_6px_-2px_rgba(0,0,0,0.35)] backdrop-blur-2xl backdrop-saturate-[140%] ${
trayLayout === "vertical"
- ? "max-h-[calc(100vh-2.5rem)] flex-col items-center gap-1 overflow-y-auto px-1 py-1.5"
- : "items-center gap-1.5 px-2 py-1.5"
+ ? "max-h-[calc(100vh-2.5rem)] flex-col items-center gap-[5px] overflow-y-auto px-[7px] py-[9px]"
+ : "items-center gap-[5px] px-[9px] py-[7px]"
}`}
onPointerEnter={() => setHudMouseEventsEnabled(true)}
onPointerDown={() => setHudMouseEventsEnabled(true)}
@@ -926,16 +1046,20 @@ export function LaunchWindow() {
>
{/* Drag handle */}
<div
- data-testid="hud-drag-handle"
- className={`flex ${trayLayout === "vertical" ? "h-6 w-8" : "h-8 w-7"} cursor-grab items-center justify-center active:cursor-grabbing ${styles.electronNoDrag}`}
+ className={`flex ${trayLayout === "vertical" ? "h-6 w-8" : "h-8 w-7"} shrink-0 cursor-grab items-center justify-center active:cursor-grabbing ${styles.electronNoDrag}`}
onPointerDown={handleHudDragPointerDown}
onPointerMove={handleHudDragPointerMove}
onPointerUp={handleHudDragPointerEnd}
onPointerCancel={handleHudDragPointerEnd}
>
- {getIcon("drag", "text-white/30")}
+ {getIcon("drag", "text-[#333a45]")}
</div>
+ <span
+ className={`${styles.hudDivider} ${trayLayout === "vertical" ? styles.hudDividerVertical : styles.hudDividerHorizontal}`}
+ aria-hidden
+ />
+
<Tooltip
content={
trayLayout === "horizontal"
@@ -955,103 +1079,129 @@ export function LaunchWindow() {
className={`${hudIconBtnClasses} ${styles.electronNoDrag}`}
onClick={toggleTrayLayout}
>
- {trayLayout === "horizontal" ? (
- <Columns3 size={ICON_SIZE} className="text-white/60" />
- ) : (
- <Rows3 size={ICON_SIZE} className="text-white/60" />
- )}
+ <OrientationIcon vertical={trayLayout === "vertical"} />
</button>
</Tooltip>
- {/* Source selector */}
+ {/* Source selector — transparent at rest, same hover treatment
+ (background only, no border) as every other toolbar button. */}
<button
data-testid="launch-source-selector-button"
- className={`${hudGroupClasses} h-8 ${trayLayout === "vertical" ? "w-8 justify-center px-0" : "px-2.5"} ${styles.electronNoDrag}`}
+ className={`flex h-[34px] shrink-0 items-center gap-[7px] rounded-[10px] border-0 bg-transparent text-[#f5f7fa] transition-all duration-150 hover:bg-[#1a1e25] active:scale-[0.97] ${hudDisabledClasses} ${
+ trayLayout === "vertical" ? "w-[34px] justify-center px-0" : "pr-3 pl-2.5"
+ } ${styles.electronNoDrag}`}
onClick={openSourceSelector}
disabled={recording || saving}
title={selectedSource}
aria-label={selectedSource}
>
- {getIcon("monitor", "text-white/80")}
+ <SourceIcon className="shrink-0" />
<span
- className={`${trayLayout === "vertical" ? "sr-only" : "max-w-[86px]"} truncate text-[11px] font-medium text-white/75`}
+ className={`${trayLayout === "vertical" ? "sr-only" : "max-w-[86px]"} truncate text-[13px] font-medium`}
>
{selectedSource}
</span>
</button>
- {/* Audio controls group */}
- <div
- className={`${hudGroupClasses} ${trayLayout === "vertical" ? "flex-col py-1" : ""} ${styles.electronNoDrag}`}
+ <span
+ className={`${styles.hudDivider} ${trayLayout === "vertical" ? styles.hudDividerVertical : styles.hudDividerHorizontal}`}
+ aria-hidden
+ />
+
+ {/* System audio / mic / camera / cursor — each its own standalone
+ transparent icon button (no shared group pill), matching the
+ design exactly: rest color is muted gray, active/enabled color
+ is the accent green. */}
+ <button
+ data-testid="launch-system-audio-button"
+ className={`${hudIconBtnClasses} ${styles.electronNoDrag}`}
+ onClick={() => !(recording || saving) && setSystemAudioEnabled(!systemAudioEnabled)}
+ disabled={recording || saving}
+ title={systemAudioEnabled ? t("audio.disableSystemAudio") : t("audio.enableSystemAudio")}
+ >
+ <VolumeIcon
+ muted={!systemAudioEnabled}
+ className={systemAudioEnabled ? "text-[#10b981]" : ""}
+ />
+ </button>
+ <button
+ ref={micTriggerRef}
+ data-testid="launch-microphone-button"
+ className={`${hudIconBtnClasses} ${styles.electronNoDrag}`}
+ aria-expanded={activeDeviceMenu === "mic"}
+ aria-haspopup={microphoneEnabled ? undefined : "menu"}
+ onClick={() => {
+ if (recording || saving) return;
+ // Already on: a single click just turns it off, no popover.
+ // Already off: open the device picker — selecting a device
+ // (or the mic already having one) is what turns it on.
+ if (microphoneEnabled) {
+ toggleMicrophone();
+ return;
+ }
+ setIsLanguageMenuOpen(false);
+ setActiveDeviceMenu((prev) => (prev === "mic" ? null : "mic"));
+ }}
+ disabled={recording || saving}
+ title={microphoneEnabled ? t("audio.disableMicrophone") : t("audio.enableMicrophone")}
+ onPointerDown={() => {
+ setRecordPointerDownCount((count) => count + 1);
+ }}
+ >
+ <MicIcon
+ muted={!microphoneEnabled}
+ className={microphoneEnabled ? "text-[#10b981]" : ""}
+ />
+ </button>
+ <button
+ ref={camTriggerRef}
+ data-testid="launch-webcam-button"
+ className={`${hudIconBtnClasses} ${styles.electronNoDrag}`}
+ aria-expanded={activeDeviceMenu === "camera"}
+ aria-haspopup={webcamEnabled ? undefined : "menu"}
+ onClick={() => {
+ if (recording || saving) return;
+ if (webcamEnabled) {
+ void setWebcamEnabled(false);
+ return;
+ }
+ setIsLanguageMenuOpen(false);
+ setActiveDeviceMenu((prev) => (prev === "camera" ? null : "camera"));
+ }}
+ disabled={recording || saving}
+ title={webcamEnabled ? t("webcam.disableWebcam") : t("webcam.enableWebcam")}
>
+ <CameraIcon off={!webcamEnabled} className={webcamEnabled ? "text-[#10b981]" : ""} />
+ </button>
+ {supportsCursorModeToggle && (
<button
- data-testid="launch-system-audio-button"
- className={`${hudIconBtnClasses} ${systemAudioEnabled ? "drop-shadow-[0_0_4px_rgba(74,222,128,0.4)]" : ""}`}
- onClick={() => !(recording || saving) && setSystemAudioEnabled(!systemAudioEnabled)}
+ data-testid="launch-cursor-mode-button"
+ className={`flex h-[34px] w-[34px] shrink-0 items-center justify-center rounded-[10px] border-0 cursor-pointer transition-all duration-150 active:scale-95 ${hudDisabledClasses} ${styles.electronNoDrag} ${
+ cursorCaptureMode === "editable-overlay"
+ ? "bg-[#10b981] text-[#08090d] hover:bg-[#0e9e6e]"
+ : "bg-transparent text-[#828c99] hover:bg-[#1a1e25] hover:text-[#f5f7fa]"
+ }`}
+ onClick={() =>
+ !(recording || saving) &&
+ setCursorCaptureMode(
+ cursorCaptureMode === "editable-overlay" ? "system" : "editable-overlay",
+ )
+ }
disabled={recording || saving}
title={
- systemAudioEnabled ? t("audio.disableSystemAudio") : t("audio.enableSystemAudio")
+ cursorCaptureMode === "editable-overlay"
+ ? t("cursor.useSystemCursor")
+ : t("cursor.useEditableCursor")
}
>
- {systemAudioEnabled
- ? getIcon("volumeOn", "text-green-400")
- : getIcon("volumeOff", "text-white/40")}
- </button>
- <button
- data-testid="launch-microphone-button"
- className={`${hudIconBtnClasses} ${microphoneEnabled ? "drop-shadow-[0_0_4px_rgba(74,222,128,0.4)]" : ""}`}
- onClick={toggleMicrophone}
- disabled={recording || saving}
- title={microphoneEnabled ? t("audio.disableMicrophone") : t("audio.enableMicrophone")}
- onPointerDown={() => {
- setRecordPointerDownCount((count) => count + 1);
- }}
- >
- {microphoneEnabled
- ? getIcon("micOn", "text-green-400")
- : getIcon("micOff", "text-white/40")}
- </button>
- <button
- data-testid="launch-webcam-button"
- className={`${hudIconBtnClasses} ${webcamEnabled ? "drop-shadow-[0_0_4px_rgba(74,222,128,0.4)]" : ""}`}
- onClick={async () => {
- await setWebcamEnabled(!webcamEnabled);
- }}
- disabled={recording || saving}
- title={webcamEnabled ? t("webcam.disableWebcam") : t("webcam.enableWebcam")}
- >
- {webcamEnabled
- ? getIcon("webcamOn", "text-green-400")
- : getIcon("webcamOff", "text-white/40")}
+ <CursorIcon />
</button>
- {supportsCursorModeToggle && (
- <button
- data-testid="launch-cursor-mode-button"
- className={`${hudIconBtnClasses} ${
- cursorCaptureMode === "editable-overlay"
- ? "drop-shadow-[0_0_4px_rgba(74,222,128,0.4)]"
- : ""
- }`}
- onClick={() =>
- !(recording || saving) &&
- setCursorCaptureMode(
- cursorCaptureMode === "editable-overlay" ? "system" : "editable-overlay",
- )
- }
- disabled={recording || saving}
- title={
- cursorCaptureMode === "editable-overlay"
- ? t("cursor.useSystemCursor")
- : t("cursor.useEditableCursor")
- }
- >
- {getIcon(
- "cursor",
- cursorCaptureMode === "editable-overlay" ? "text-green-400" : "text-white/40",
- )}
- </button>
- )}
- </div>
+ )}
+
+ <span
+ className={`${styles.hudDivider} ${trayLayout === "vertical" ? styles.hudDividerVertical : styles.hudDividerHorizontal}`}
+ aria-hidden
+ />
{/* Record/Stop group */}
<Tooltip
@@ -1066,18 +1216,12 @@ export function LaunchWindow() {
<button
data-testid="launch-record-button"
disabled={saving}
- className={`flex items-center justify-center rounded-full p-2 transition-[min-width,background-color] duration-150 ${recording || saving ? "min-w-[78px]" : "min-w-[36px]"} ${trayLayout === "vertical" ? "min-h-9" : ""} ${styles.electronNoDrag} ${
+ className={`flex h-[34px] shrink-0 items-center justify-center rounded-[17px] border-0 transition-all duration-150 ${recording || saving ? "min-w-[78px] px-3" : "w-[34px]"} ${styles.electronNoDrag} ${
saving
- ? "bg-white/[0.06] opacity-60 cursor-not-allowed"
- : recording
- ? paused
- ? "bg-amber-500/10 hover:bg-amber-500/15"
- : "bg-red-500/12 hover:bg-red-500/16"
- : hasSelectedSource
- ? "bg-white/[0.06] hover:bg-white/[0.10]"
- : "bg-white/[0.035] hover:bg-white/[0.08]"
+ ? "bg-transparent opacity-60 cursor-not-allowed"
+ : "bg-transparent hover:bg-[rgba(248,113,113,0.16)]"
}`}
- onClick={handleRecordButtonClick}
+ onClick={() => handleRecordButtonClick()}
title={
saving
? t("recording.saving")
@@ -1099,21 +1243,22 @@ export function LaunchWindow() {
>
{saving ? (
<div className="animate-spin flex items-center justify-center">
- {getIcon("spinner", "text-white/80")}
+ {getIcon("spinner", "text-[#f87171]")}
</div>
- ) : recording ? (
- getIcon("stop", paused ? "text-amber-400" : "text-red-400")
) : (
- getIcon("record", hasSelectedSource ? "text-white/80" : "text-white/45")
+ <RecordGlyph
+ recording={recording}
+ className={paused ? "text-amber-400" : "text-[#f87171]"}
+ />
)}
{saving && (
- <span className="text-white/80 text-xs font-semibold select-none">
+ <span className="text-[#f87171] text-xs font-semibold select-none">
{t("recording.saving")}
</span>
)}
{recording && (
<span
- className={`${paused ? "text-amber-400" : "text-red-400"} inline-block w-[34px] text-left text-xs font-semibold tabular-nums`}
+ className={`${paused ? "text-amber-400" : "text-[#f87171]"} inline-block w-[34px] text-left text-xs font-semibold tabular-nums`}
>
{formatTimePadded(elapsedSeconds)}
</span>
@@ -1122,6 +1267,19 @@ export function LaunchWindow() {
</button>
</Tooltip>
+ {!recording && (
+ <Tooltip content={t("tooltips.openStudio")}>
+ <button
+ data-testid="launch-open-studio-button"
+ disabled={saving}
+ className={`${hudIconBtnClasses} ${styles.electronNoDrag} ${saving ? "opacity-30 cursor-not-allowed pointer-events-none" : ""}`}
+ onClick={() => !saving && window.electronAPI.switchToEditor()}
+ >
+ <OpenInEditorIcon />
+ </button>
+ </Tooltip>
+ )}
+
{recording && (
<div
className={`flex items-center gap-0.5 ${trayLayout === "vertical" ? "flex-col" : ""} ${styles.electronNoDrag}`}
@@ -1172,23 +1330,15 @@ export function LaunchWindow() {
className={`${hudIconBtnClasses} ${styles.electronNoDrag} ${saving ? "opacity-30 cursor-not-allowed pointer-events-none" : ""}`}
onClick={() => !saving && window.electronAPI.openNotes()}
>
- <NotepadText size={ICON_SIZE} className="text-white/60" />
+ <NotepadText size={ICON_SIZE} />
</button>
</Tooltip>
)}
- {!recording && (
- <Tooltip content={t("tooltips.openStudio")}>
- <button
- data-testid="launch-open-studio-button"
- disabled={saving}
- className={`${hudIconBtnClasses} ${styles.electronNoDrag} ${saving ? "opacity-30 cursor-not-allowed pointer-events-none" : ""}`}
- onClick={() => !saving && window.electronAPI.switchToEditor()}
- >
- <Clapperboard size={ICON_SIZE} className="text-white/60" />
- </button>
- </Tooltip>
- )}
+ <span
+ className={`${styles.hudDivider} ${trayLayout === "vertical" ? styles.hudDividerVertical : styles.hudDividerHorizontal}`}
+ aria-hidden
+ />
{/* Right sidebar controls */}
<div
@@ -1198,21 +1348,25 @@ export function LaunchWindow() {
<button
ref={languageTriggerRef}
type="button"
- aria-label={t("language")}
+ aria-label={activeLanguageLabel}
aria-expanded={isLanguageMenuOpen}
aria-haspopup="menu"
disabled={saving}
- onClick={() => !saving && setIsLanguageMenuOpen((open) => !open)}
+ onClick={() => {
+ if (saving) return;
+ setActiveDeviceMenu(null);
+ setIsLanguageMenuOpen((open) => !open);
+ }}
title={activeLanguageLabel}
- className={`flex h-8 items-center rounded-lg border border-white/10 bg-white/[0.045] text-white/85 shadow-none transition-colors hover:bg-white/10 ${
- trayLayout === "vertical" ? "w-8 justify-center px-0" : "gap-1.5 px-2"
+ className={`flex h-[34px] items-center rounded-[10px] border-0 bg-transparent text-[#828c99] transition-all duration-150 hover:bg-[#1a1e25] hover:text-[#e9edf3] ${
+ trayLayout === "vertical" ? "w-[34px] justify-center px-0" : "gap-1.5 px-2.5"
} ${styles.electronNoDrag} ${saving ? "opacity-30 cursor-not-allowed pointer-events-none" : ""}`}
>
- <Languages size={13} className="text-white/70" />
+ <Languages size={16} className="shrink-0" />
<span
- className={`${trayLayout === "vertical" ? "sr-only" : "max-w-[54px]"} truncate text-[10px] font-semibold text-white/75`}
+ className={`${trayLayout === "vertical" ? "sr-only" : ""} font-mono text-[11px] font-semibold tracking-wide text-[#f5f7fa]`}
>
- {activeLanguageLabel}
+ {languageCode}
</span>
</button>
</div>
@@ -1229,7 +1383,7 @@ export function LaunchWindow() {
WebkitAppRegion: "no-drag",
pointerEvents: "auto",
right: `${languageMenuStyle.right}px`,
- top: `${languageMenuStyle.top}px`,
+ bottom: `${languageMenuStyle.bottom}px`,
maxHeight: `${languageMenuStyle.maxHeight}px`,
} as React.CSSProperties
}
@@ -1263,9 +1417,14 @@ export function LaunchWindow() {
)
: null}
+ <span
+ className={`${styles.hudDivider} ${trayLayout === "vertical" ? styles.hudDividerVertical : styles.hudDividerHorizontal}`}
+ aria-hidden
+ />
+
{/* Window controls */}
<div
- className={`flex items-center gap-0.5 ${trayLayout === "vertical" ? "flex-col" : ""}`}
+ className={`flex items-center gap-[5px] ${trayLayout === "vertical" ? "flex-col" : ""}`}
>
<button
className={windowBtnClasses}
@@ -1273,15 +1432,15 @@ export function LaunchWindow() {
onClick={sendHudOverlayHide}
disabled={saving}
>
- {getIcon("minimize", "text-white")}
+ {getIcon("minimize")}
</button>
<button
- className={windowBtnClasses}
+ className={closeBtnClasses}
title={t("tooltips.closeApp")}
onClick={sendHudOverlayClose}
disabled={saving}
>
- {getIcon("close", "text-white")}
+ {getIcon("close")}
</button>
</div>
</div>
diff --git a/src/components/launch/SourceSelector.module.css b/src/components/launch/SourceSelector.module.css
index 5bd4d9629..14522a858 100644
--- a/src/components/launch/SourceSelector.module.css
+++ b/src/components/launch/SourceSelector.module.css
@@ -1,104 +1,99 @@
.glassContainer {
- background: linear-gradient(145deg, rgba(13, 14, 17, 0.94) 0%, rgba(8, 9, 12, 0.9) 100%);
- backdrop-filter: blur(24px) saturate(150%);
- -webkit-backdrop-filter: blur(24px) saturate(150%);
- border-radius: 24px;
+ background: #14171c;
+ border-radius: 20px;
corner-shape: squircle;
/*
- Removed box-shadow here because electron doesn't round corners of the shadow, thereby leaving a square border shadow conflicting with the rounded corners of the SourceSelector.
- The result is easily visible when you place a white window just behind the SourceSelector
+ No box-shadow: Electron doesn't round the shadow's corners on this
+ transparent frameless window, leaving a square shadow that clashes with
+ the rounded card. Border + surface contrast carries the elevation instead.
*/
- /* box-shadow:
- 0 0px 16px 0 rgba(0, 0, 0, 0.32),
- 0 1px 3px 0 rgba(0, 0, 0, 0.18) inset; */
- border: 1px solid rgba(255, 255, 255, 0.1);
+ border: 1px solid #333a45;
}
.sourceCard {
+ position: relative;
corner-shape: squircle;
- border-radius: 13px;
- background: rgba(255, 255, 255, 0.045);
- border: 1px solid rgba(255, 255, 255, 0.07);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
- transition:
- box-shadow 0.2s ease,
- border-color 0.2s ease,
- background-color 0.2s ease,
- transform 0.2s ease;
+ border-radius: 14px;
+ background: #0f1216;
+ border: 1.5px solid #242932;
+ overflow: hidden;
cursor: pointer;
+ transition:
+ border-color 0.15s ease,
+ box-shadow 0.15s ease,
+ transform 0.15s ease;
}
.sourceCard:hover {
- background: rgba(255, 255, 255, 0.065);
- border-color: rgba(255, 255, 255, 0.14);
- transform: translateY(-1px);
- box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
+ border-color: #333a45;
+ transform: translateY(-2px);
}
-.selected {
- border-color: rgba(52, 178, 123, 0.68);
- background: linear-gradient(145deg, rgba(52, 178, 123, 0.13), rgba(255, 255, 255, 0.045));
- box-shadow:
- 0 0 0 1px rgba(52, 178, 123, 0.18) inset,
- 0 12px 28px rgba(0, 0, 0, 0.22);
+.sourceCard:active {
+ transform: translateY(-1px) scale(0.98);
}
-.selected:hover {
- transform: translateY(0);
+.selected {
+ border-color: #10b981;
+ box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}
-.icon {
- width: 12px;
- height: 12px;
- color: #c7d2fe;
+.selected:hover {
+ border-color: #10b981;
+ transform: translateY(-2px);
}
-.name {
- font-size: 0.72rem;
- color: #e4e4e7;
- font-weight: 500;
- letter-spacing: 0;
+.thumb {
+ position: relative;
+ aspect-ratio: 16 / 10.5;
+ background: #0a0c10;
+ overflow: hidden;
}
-.cardText {
- color: #a1a1aa;
- font-size: 0.75rem;
+.icon {
+ width: 15px;
+ height: 15px;
+ border-radius: 9999px;
+ object-fit: cover;
+ flex-shrink: 0;
+ border: 1px solid #333a45;
}
-/* Checkmark badge */
-.checkBadge {
- width: 17px;
- height: 17px;
- background: #34b27b;
+.iconFallback {
+ width: 15px;
+ height: 15px;
border-radius: 9999px;
+ background: #232830;
+ border: 1px solid #333a45;
+ color: #828c99;
display: flex;
align-items: center;
justify-content: center;
- box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
+ flex-shrink: 0;
+}
+
+.name {
+ font-size: 12.5px;
+ color: #f5f7fa;
+ font-weight: 600;
+ letter-spacing: 0;
}
/* scrollbar */
.sourceGridScroll::-webkit-scrollbar {
- width: 3px;
+ width: 6px;
}
.sourceGridScroll::-webkit-scrollbar-track {
- background: rgba(30, 30, 38, 0.3);
- border-radius: 4px;
+ background: transparent;
}
.sourceGridScroll::-webkit-scrollbar-thumb {
- background: rgba(52, 178, 123, 0.5);
- border-radius: 10px;
+ background: #333a45;
+ border-radius: 999px;
}
.sourceGridScroll::-webkit-scrollbar-thumb:hover {
- background: rgba(52, 178, 123, 0.6);
- cursor: grab;
-}
-
-.sourceGridScroll::-webkit-scrollbar-thumb:active {
- background: rgba(52, 178, 123, 0.8);
- cursor: grabbing;
+ background: #3a4150;
}
diff --git a/src/components/launch/SourceSelector.tsx b/src/components/launch/SourceSelector.tsx
index b1a8a6a96..caac8c1fa 100644
--- a/src/components/launch/SourceSelector.tsx
+++ b/src/components/launch/SourceSelector.tsx
@@ -1,5 +1,4 @@
import { useCallback, useEffect, useState } from "react";
-import { MdCheck } from "react-icons/md";
import { useScopedT } from "@/contexts/I18nContext";
import { Button } from "../ui/button";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../ui/tabs";
@@ -75,8 +74,8 @@ export function SourceSelector() {
style={{ minHeight: "100vh" }}
>
<div className="text-center">
- <div className="animate-spin duration-500 rounded-[50%] h-6 w-6 border-2 border-b-transparent border-[#34B27B] mx-auto mb-2" />
- <p className="text-xs text-zinc-400">{t("sourceSelector.loading")}</p>
+ <div className="animate-spin duration-500 rounded-[50%] h-6 w-6 border-2 border-b-transparent border-[#10b981] mx-auto mb-2" />
+ <p className="text-xs text-[#828c99]">{t("sourceSelector.loading")}</p>
</div>
</div>
);
@@ -89,15 +88,15 @@ export function SourceSelector() {
style={{ minHeight: "100vh" }}
>
<div className="max-w-[320px] px-6 text-center">
- <h2 className="text-sm font-semibold text-white">{t("sourceSelector.emptyTitle")}</h2>
- <p className="mt-2 text-xs leading-5 text-zinc-400">
+ <h2 className="text-sm font-semibold text-[#ffffff]">{t("sourceSelector.emptyTitle")}</h2>
+ <p className="mt-2 text-xs leading-5 text-[#828c99]">
{loadFailed
? t("sourceSelector.loadFailedDescription")
: t("sourceSelector.emptyDescription")}
</p>
<Button
onClick={() => void fetchSources()}
- className="mt-4 h-8 rounded-lg bg-[#34B27B] px-5 text-[11px] font-semibold text-white transition-transform duration-150 hover:bg-[#34B27B]/85 active:scale-95"
+ className="mt-4 h-8 rounded-[9px] bg-[#10b981] px-5 text-[11px] font-semibold text-[#08090d] transition-transform duration-150 hover:bg-[#10b981]/85 active:scale-95"
>
{tc("actions.reload")}
</Button>
@@ -110,82 +109,80 @@ export function SourceSelector() {
const isSelected = selectedSource?.id === source.id;
const sourceKind = source.id.startsWith("screen:") ? "screen" : "window";
return (
- <div
+ <button
key={source.id}
+ type="button"
data-testid="source-selector-card"
data-source-kind={sourceKind}
- className={`${styles.sourceCard} ${isSelected ? styles.selected : ""} p-1.5`}
+ className={`${styles.sourceCard} ${isSelected ? styles.selected : ""} flex flex-col text-left`}
onClick={() => handleSourceSelect(source)}
>
- <div className="relative mb-1.5 overflow-hidden rounded-lg border border-white/[0.06] bg-black/30">
+ <div className={styles.thumb}>
<img
src={source.thumbnail || ""}
alt={source.name}
- className="w-full aspect-video object-cover"
+ className="w-full h-full object-cover"
/>
- {isSelected && (
- <div className="absolute right-1.5 top-1.5">
- <div className={styles.checkBadge}>
- <MdCheck size={11} className="text-white" />
- </div>
- </div>
- )}
</div>
- <div className="flex items-center gap-1.5 px-1 pb-0.5">
- {source.appIcon && (
- <img src={source.appIcon} alt="" className={`${styles.icon} flex-shrink-0`} />
+ <div className="flex items-center gap-[7px] px-[11px] py-[9px]">
+ {source.appIcon ? (
+ <img src={source.appIcon} alt="" className={styles.icon} />
+ ) : (
+ <span className={styles.iconFallback}>
+ <svg width="9" height="9" viewBox="0 0 24 24" fill="currentColor">
+ <circle cx="12" cy="12" r="10" />
+ </svg>
+ </span>
)}
<div className={`${styles.name} truncate`}>{source.name}</div>
</div>
- </div>
+ </button>
);
};
return (
- <div className={`min-h-screen flex flex-col ${styles.glassContainer}`}>
- <div className="flex-1 flex flex-col w-full px-3.5 pt-3.5">
- <Tabs
- defaultValue={screenSources.length === 0 ? "windows" : "screens"}
- className="flex-1 flex flex-col"
- >
- <TabsList className="mb-3 grid h-8 grid-cols-2 rounded-xl border border-white/[0.06] bg-white/[0.04] p-0.5">
- <TabsTrigger
- value="screens"
- className="rounded-lg py-1 text-[11px] text-zinc-400 transition-all data-[state=active]:bg-white/[0.12] data-[state=active]:text-white"
+ <div className={`h-screen flex flex-col ${styles.glassContainer}`}>
+ <Tabs
+ defaultValue={screenSources.length === 0 ? "windows" : "screens"}
+ className="flex-1 flex flex-col min-h-0"
+ >
+ <TabsList className="flex items-center gap-1.5 h-auto p-3.5 rounded-none bg-transparent border-b border-[#191d24] flex-shrink-0">
+ <TabsTrigger
+ value="screens"
+ className="flex-1 h-10 rounded-[11px] text-[13.5px] font-medium text-[#828c99] border border-transparent transition-all data-[state=active]:bg-[#232830] data-[state=active]:border-[#333a45] data-[state=active]:text-[#ffffff] data-[state=active]:font-semibold data-[state=active]:shadow-none"
+ >
+ {t("sourceSelector.screens", { count: String(screenSources.length) })}
+ </TabsTrigger>
+ <TabsTrigger
+ value="windows"
+ className="flex-1 h-10 rounded-[11px] text-[13.5px] font-medium text-[#828c99] border border-transparent transition-all data-[state=active]:bg-[#232830] data-[state=active]:border-[#333a45] data-[state=active]:text-[#ffffff] data-[state=active]:font-semibold data-[state=active]:shadow-none"
+ >
+ {t("sourceSelector.windows", { count: String(windowSources.length) })}
+ </TabsTrigger>
+ </TabsList>
+ <div className="flex-1 min-h-0 px-[18px] pt-[18px] pb-1.5">
+ <TabsContent value="screens" className="h-full mt-0">
+ <div
+ className={`grid h-full auto-rows-min grid-cols-2 gap-3.5 overflow-y-auto pr-1.5 ${styles.sourceGridScroll}`}
>
- {t("sourceSelector.screens", { count: String(screenSources.length) })}
- </TabsTrigger>
- <TabsTrigger
- value="windows"
- className="rounded-lg py-1 text-[11px] text-zinc-400 transition-all data-[state=active]:bg-white/[0.12] data-[state=active]:text-white"
+ {screenSources.map(renderSourceCard)}
+ </div>
+ </TabsContent>
+ <TabsContent value="windows" className="h-full mt-0">
+ <div
+ className={`grid h-full auto-rows-min grid-cols-2 gap-3.5 overflow-y-auto pr-1.5 ${styles.sourceGridScroll}`}
>
- {t("sourceSelector.windows", { count: String(windowSources.length) })}
- </TabsTrigger>
- </TabsList>
- <div className="flex-1 min-h-0">
- <TabsContent value="screens" className="h-full mt-0">
- <div
- className={`grid h-[282px] auto-rows-min grid-cols-2 gap-2.5 overflow-y-auto pr-1.5 pt-1 ${styles.sourceGridScroll}`}
- >
- {screenSources.map(renderSourceCard)}
- </div>
- </TabsContent>
- <TabsContent value="windows" className="h-full mt-0">
- <div
- className={`grid h-[282px] auto-rows-min grid-cols-2 gap-2.5 overflow-y-auto pr-1.5 pt-1 ${styles.sourceGridScroll}`}
- >
- {windowSources.map(renderSourceCard)}
- </div>
- </TabsContent>
- </div>
- </Tabs>
- </div>
- <div className="flex justify-center gap-2 border-t border-white/[0.06] p-3">
+ {windowSources.map(renderSourceCard)}
+ </div>
+ </TabsContent>
+ </div>
+ </Tabs>
+ <div className="flex justify-end gap-2.5 border-t border-[#191d24] px-[18px] py-4">
<Button
data-testid="source-selector-cancel-button"
variant="ghost"
onClick={() => window.close()}
- className="h-8 rounded-lg px-5 text-[11px] text-zinc-400 transition-transform duration-150 hover:bg-white/5 hover:text-white active:scale-95"
+ className="h-9 rounded-[9px] border border-[#333a45] px-4 text-[13px] font-medium text-[#f5f7fa] transition-colors duration-150 hover:bg-[#1a1e25] hover:text-[#f5f7fa]"
>
{tc("actions.cancel")}
</Button>
@@ -193,7 +190,7 @@ export function SourceSelector() {
data-testid="source-selector-share-button"
onClick={handleShare}
disabled={!selectedSource}
- className="h-8 rounded-lg bg-[#34B27B] px-5 text-[11px] font-semibold text-white transition-transform duration-150 hover:bg-[#34B27B]/85 active:scale-95 disabled:bg-zinc-700 disabled:opacity-30"
+ className="h-9 rounded-[9px] bg-[#10b981] px-5 text-[13px] font-semibold text-[#08090d] transition-transform duration-150 hover:bg-[#10b981]/85 active:scale-95 disabled:bg-[#232830] disabled:border disabled:border-[#242932] disabled:text-[#565f6b] disabled:opacity-100"
>
{tc("actions.share")}
</Button>
diff --git a/src/components/video-editor/projectPersistence.ts b/src/components/video-editor/projectPersistence.ts
index 4727b685e..d77fe242a 100644
--- a/src/components/video-editor/projectPersistence.ts
+++ b/src/components/video-editor/projectPersistence.ts
@@ -148,6 +148,12 @@ function encodePathSegments(pathname: string, keepWindowsDrive = false): string
}
export function toFileUrl(filePath: string): string {
+ // Browser-mode assets (blob:/http(s):/data: URLs from an <input type=file>
+ // or Vite-served asset) are already valid URLs — passing them through the
+ // file:// encoder below would mangle them (e.g. "file:///blob:...").
+ if (/^(https?|blob|data):/.test(filePath)) {
+ return filePath;
+ }
const normalized = filePath.replace(/\\/g, "/");
if (normalized.match(/^[a-zA-Z]:/)) {
return `file:///${encodePathSegments(normalized, true)}`;
diff --git a/src/hooks/useCameraPreviewStream.ts b/src/hooks/useCameraPreviewStream.ts
new file mode 100644
index 000000000..9080e7c8d
--- /dev/null
+++ b/src/hooks/useCameraPreviewStream.ts
@@ -0,0 +1,57 @@
+import { useEffect, useRef, useState } from "react";
+
+export interface CameraPreviewStreamOptions {
+ enabled: boolean;
+ deviceId?: string;
+}
+
+/**
+ * Opens a live getUserMedia video stream for a webcam preview — separate
+ * from the recorder's own capture stream (useScreenRecorder keeps that in a
+ * private ref), so this is safe to mount anywhere that just wants to *show*
+ * the camera is working, not record it.
+ */
+export function useCameraPreviewStream({ enabled, deviceId }: CameraPreviewStreamOptions) {
+ const [stream, setStream] = useState<MediaStream | null>(null);
+ const [error, setError] = useState<string | null>(null);
+ const streamRef = useRef<MediaStream | null>(null);
+
+ useEffect(() => {
+ if (!enabled) {
+ streamRef.current?.getTracks().forEach((track) => track.stop());
+ streamRef.current = null;
+ setStream(null);
+ setError(null);
+ return;
+ }
+
+ let cancelled = false;
+ navigator.mediaDevices
+ .getUserMedia({
+ video: deviceId ? { deviceId: { exact: deviceId } } : true,
+ audio: false,
+ })
+ .then((s) => {
+ if (cancelled) {
+ s.getTracks().forEach((track) => track.stop());
+ return;
+ }
+ streamRef.current = s;
+ setStream(s);
+ setError(null);
+ })
+ .catch((err) => {
+ if (cancelled) return;
+ setStream(null);
+ setError(err instanceof Error ? err.message : String(err));
+ });
+
+ return () => {
+ cancelled = true;
+ streamRef.current?.getTracks().forEach((track) => track.stop());
+ streamRef.current = null;
+ };
+ }, [enabled, deviceId]);
+
+ return { stream, error };
+}
diff --git a/src/hooks/useTheme.ts b/src/hooks/useTheme.ts
index 1b27a5c2b..8cbb5464e 100644
--- a/src/hooks/useTheme.ts
+++ b/src/hooks/useTheme.ts
@@ -19,6 +19,12 @@ function applyTheme(theme: Theme) {
} else {
document.documentElement.removeAttribute("data-theme");
}
+ // Keep the legacy shadcn/Tailwind `.dark` class (index.css's `--accent`/
+ // `--border`/`--muted` HSL-triplet tokens) in sync with the ai-edition
+ // `data-theme` attribute — these are two separate token systems that
+ // happen to share property names, so leaving `.dark` stuck on regardless
+ // of the real theme silently overrides design-tokens.css's light values.
+ document.documentElement.classList.toggle("dark", theme === "dark");
}
export function useTheme(): { theme: Theme; toggle: () => void; setTheme: (t: Theme) => void } {
diff --git a/src/i18n/locales/ar/dialogs.json b/src/i18n/locales/ar/dialogs.json
index 568c542cf..43caf5938 100644
--- a/src/i18n/locales/ar/dialogs.json
+++ b/src/i18n/locales/ar/dialogs.json
@@ -57,9 +57,23 @@
"detailLoadProject": "هل تريد حفظ مشروعك قبل تحميل مشروع آخر؟",
"saveAndLoadProject": "حفظ وتحميل مشروع",
"discardAndLoadProject": "تجاهل وتحميل مشروع",
+ "newProject": "مشروع جديد",
+ "importVideo": "استيراد ملف فيديو…",
"loadProject": "تحميل مشروع...",
"saveProject": "حفظ المشروع...",
- "saveProjectAs": "حفظ المشروع باسم..."
+ "saveProjectAs": "حفظ المشروع باسم...",
+ "modal": {
+ "closeTitle": "حفظ التغييرات قبل الإغلاق؟",
+ "closeBody": "يحتوي مشروعك على تغييرات غير محفوظة. احفظها الآن أو تجاهلها أو ابقَ في المحرر.",
+ "newTitle": "حفظ التغييرات قبل إنشاء مشروع جديد؟",
+ "openTitle": "حفظ التغييرات قبل فتح مشروع آخر؟",
+ "recordTitle": "حفظ التغييرات قبل بدء تسجيل جديد؟",
+ "sharedBody": "يحتوي المشروع الحالي على تغييرات غير محفوظة. احفظها أولاً أو تجاهلها أو ألغِ.",
+ "notSavedYet": "لم يتم حفظ المشروع الحالي على القرص بعد.",
+ "discard": "تجاهل",
+ "saveAndContinue": "حفظ ومتابعة",
+ "saving": "جارٍ الحفظ…"
+ }
},
"fileDialogs": {
"saveGif": "حفظ GIF المصدر",
diff --git a/src/i18n/locales/ar/editor.json b/src/i18n/locales/ar/editor.json
index 55ba4339c..c5a20f527 100644
--- a/src/i18n/locales/ar/editor.json
+++ b/src/i18n/locales/ar/editor.json
@@ -65,9 +65,12 @@
},
"emptyState": {
"title": "لا يوجد مشروع مفتوح",
- "description": "استورد مقطع فيديو للبدء في التحرير، أو حمّل مشروع OpenScreen موجود.",
- "importVideoButton": "استيراد ملف فيديو...",
- "loadProjectButton": "تحميل مشروع...",
+ "description": "أنشئ مشروعًا جديدًا أو افتح مشروعًا موجودًا.",
+ "titleHasAsset": "أضف فيديو للبدء",
+ "descriptionHasAsset": "استورد تسجيلاً لبدء التحرير.",
+ "newProjectButton": "مشروع جديد + استيراد فيديو",
+ "importVideoButton": "استيراد فيديو",
+ "loadProjectButton": "فتح مشروع",
"supportedFormats": "الصيغ المدعومة: MP4، MOV، WebM، MKV، AVI، M4V، WMV",
"dragDropHint": "أو اسحب وأفلت ملف مشروع .openscreen هنا",
"dropOverlay": "أفلت ملف المشروع لفتحه",
@@ -89,5 +92,263 @@
"annotation": "نص",
"blur": "تمويه"
}
+ },
+ "topbar": {
+ "toggleChatPanel": "تبديل لوحة الدردشة",
+ "openProject": "فتح مشروع",
+ "newProject": "مشروع جديد",
+ "saveProject": "حفظ المشروع",
+ "unsaved": "غير محفوظ",
+ "saved": "تم الحفظ",
+ "switchToLightTheme": "التبديل إلى المظهر الفاتح",
+ "switchToDarkTheme": "التبديل إلى المظهر الداكن",
+ "toggleTheme": "تبديل المظهر",
+ "settings": "الإعدادات",
+ "export": "تصدير",
+ "renameProject": "إعادة تسمية المشروع",
+ "noProject": "لا يوجد مشروع",
+ "changeLanguage": "تغيير اللغة",
+ "editorMode": "وضع المحرر",
+ "modes": {
+ "media": "الوسائط",
+ "edit": "تحرير",
+ "rec": "تسجيل"
+ }
+ },
+ "rec": {
+ "source": "المصدر",
+ "systemAudio": "صوت النظام",
+ "microphone": "الميكروفون",
+ "camera": "الكاميرا",
+ "cursorHighlight": "إبراز المؤشر",
+ "on": "تشغيل",
+ "off": "إيقاف",
+ "loading": "جارٍ التحميل...",
+ "noCameraFound": "لم يتم العثور على كاميرا",
+ "cameraAccessError": "تعذّر الوصول إلى هذه الكاميرا",
+ "startingCamera": "جارٍ تشغيل الكاميرا...",
+ "turnOnCameraHint": "شغّل الكاميرا للحصول على معاينة مباشرة",
+ "entireScreen": "الشاشة بأكملها",
+ "cancel": "إلغاء",
+ "startRecording": "بدء التسجيل",
+ "startRecordingHint": "يفتح أداة التسجيل ويغلق نافذة المحرر هذه.",
+ "sourceModal": {
+ "screens": "الشاشات ({{count}})",
+ "windows": "النوافذ ({{count}})",
+ "loadingSources": "جارٍ تحميل المصادر...",
+ "noScreensFound": "لم يتم العثور على شاشات",
+ "noWindowsFound": "لم يتم العثور على نوافذ",
+ "cancel": "إلغاء"
+ }
+ },
+ "mediaStage": {
+ "openProjectFirst": "افتح مشروعًا أولاً",
+ "couldNotAddAsset": "تعذّرت إضافة الملف",
+ "searchPlaceholder": "بحث في الوسائط...",
+ "dragHint": "اسحب مقطعًا إلى المخطط الزمني أدناه لإضافته",
+ "emptyHint": "لا توجد وسائط بعد — استورد تسجيلاً للبدء.",
+ "importMedia": "استيراد وسائط",
+ "added": "تمت إضافة {{label}}",
+ "sourceTranscript": "نص المصدر",
+ "close": "إغلاق",
+ "transcriptReady": "النص جاهز",
+ "notGeneratedYet": "لم يُنشأ بعد",
+ "regenerateAs": "إعادة الإنشاء بلغة",
+ "auto": "تلقائي",
+ "regenerate": "إعادة الإنشاء",
+ "transcriptEmpty": "النص فارغ.",
+ "notGeneratedHint": "لم يُنشأ بعد — اختر لغة وانقر على إعادة الإنشاء.",
+ "transcribing": "جارٍ النسخ",
+ "transcribingEllipsis": "جارٍ النسخ…",
+ "pendingTranscription": "بانتظار النسخ",
+ "transcriptionFailed": "فشل النسخ",
+ "noTranscript": "لا يوجد نص مكتوب",
+ "generating": "جارٍ الإنشاء",
+ "generationFailed": "فشل الإنشاء",
+ "generated": "تم الإنشاء",
+ "generationFailedHint": "فشل الإنشاء — اختر لغة وأعد الإنشاء.",
+ "noPreviewAvailable": "لا تتوفر معاينة",
+ "restart": "إعادة التشغيل",
+ "detectedLanguage": "اللغة المكتشفة: {{language}}"
+ },
+ "exportDialog": {
+ "title": "تصدير",
+ "subtitle": "عرض المخطط الزمني إلى ملف",
+ "addVideoBeforeExporting": "أضف فيديو قبل التصدير.",
+ "quality": "الجودة",
+ "qualitySmallerFile": "ملف أصغر",
+ "qualityRecommended": "موصى به",
+ "qualityMatchRecording": "مطابقة التسجيل",
+ "frameRate": "معدل الإطارات",
+ "codec": "الترميز",
+ "codecBestCompatibility": "أفضل توافق",
+ "codecMaySupportVary": "قد لا يكون مدعومًا من جميع مرمّزات النظام",
+ "size": "الحجم",
+ "loopGif": "تكرار GIF",
+ "loopOn": "التكرار مفعّل",
+ "loopOff": "التكرار معطّل",
+ "pickFormatAndExport": "اختر صيغة واضغط على تصدير للبدء.",
+ "savedTo": "تم الحفظ في",
+ "exportFailedGeneric": "فشل التصدير.",
+ "writingFile": "جارٍ كتابة الملف...",
+ "renderingFrames": "جارٍ عرض الإطارات",
+ "framesEta": "{{current}} / {{total}} إطار · الوقت المتبقي {{eta}} ثانية",
+ "preparingEncoder": "جارٍ تجهيز المرمّز...",
+ "close": "إغلاق",
+ "cancel": "إلغاء",
+ "rendering": "جارٍ العرض...",
+ "saving": "جارٍ الحفظ...",
+ "starting": "جارٍ البدء...",
+ "exportGif": "تصدير GIF",
+ "exportMp4": "تصدير MP4",
+ "exportedGif": "تم تصدير GIF",
+ "exportedVideo": "تم تصدير الفيديو",
+ "showInFolder": "إظهار في المجلد",
+ "exportFailed": "فشل التصدير",
+ "failedToWriteFile": "فشلت كتابة الملف"
+ },
+ "inspector": {
+ "resetFocusPoint": "إعادة تعيين نقطة التركيز",
+ "setColor": "تعيين اللون {{color}}",
+ "trimHiddenDuration": "تم إخفاء {{duration}} ثانية من الوسائط المصدر عن الجدول الزمني المحرر.",
+ "restoreDeleteTrim": "استعادة (حذف القص)",
+ "collapseInspector": "طي لوحة الفحص",
+ "captionsDescription": "إنشاء ترجمات مؤقتة بالكلمات من النص وإسقاطها على الجدول الزمني.",
+ "generateCaptions": "إنشاء ترجمات",
+ "cropDescription": "أعد تأطير التسجيل — اختر نسبة العرض إلى الارتفاع وقم بالتكبير على المنطقة التي تريد الاحتفاظ بها.",
+ "openCrop": "فتح القص…"
+ },
+ "leftPanel": {
+ "mediaTitle": "الوسائط",
+ "searchPlaceholder": "بحث…",
+ "clearSearch": "مسح البحث",
+ "emptyHint": "لا توجد وسائط في هذا المشروع بعد. استورد فيديو أدناه.",
+ "transcriptReadyBadge": "النص جاهز"
+ },
+ "leftRail": {
+ "chat": "المحادثة",
+ "media": "الوسائط",
+ "ariaLabel": "الأدوات اليسرى"
+ },
+ "chat": {
+ "changeProvider": "تغيير المزوّد",
+ "back": "رجوع",
+ "currentModel": "النموذج الحالي:",
+ "notSelected": "غير محدد",
+ "loadingModels": "جارٍ تحميل النماذج…",
+ "searchModels": "بحث في النماذج…",
+ "fetchModelsFailed": "تعذّر جلب النماذج المباشرة ({{error}})؛ افتح إعدادات المزوّد لكتابة معرّف النموذج يدويًا.",
+ "noModelsAvailable": "لا توجد نماذج متاحة من هذا المزوّد.",
+ "noModelsMatch": "لا توجد نماذج تطابق هذا البحث.",
+ "noProvidersConnected": "لا يوجد مزوّدون متصلون بعد.",
+ "selectModelFailed": "تعذّر اختيار النموذج",
+ "providerSettings": "إعدادات المزوّد…",
+ "applyEditsFailed": "تعذّر تطبيق تعديلات الوكيل",
+ "chatFailed": "فشلت المحادثة",
+ "rewindFailed": "فشلت إعادة الضبط",
+ "rewoundSuccess": "تمت إعادة الضبط إلى بداية تلك الرسالة",
+ "notEnoughHistory": "لا يوجد سجل كافٍ للضغط بعد.",
+ "compactedSuccess": "تم ضغط السياق السابق",
+ "compactFailed": "فشل الضغط",
+ "createSessionFailed": "تعذّر إنشاء محادثة",
+ "deleteSessionFailed": "تعذّر حذف المحادثة",
+ "renameSessionFailed": "تعذّر إعادة تسمية المحادثة",
+ "reasoningEffortUpdateFailed": "تعذّر تحديث جهد الاستدلال",
+ "addSkipRangePrompt": "إضافة نطاق تخطٍّ\nالتنسيق: startSec-endSec (مثال: 1.2-3.4)",
+ "addSkipRangeFormatError": "استخدم startSec-endSec، مثال: 1.2-3.4",
+ "addSkipRangeOrderError": "يجب أن يكون endSec أكبر من startSec.",
+ "addSkipRangeApplied": "تمت إضافة تخطٍّ {{startSec}}–{{endSec}} ثانية.",
+ "contextTooltip": "{{usedTokens}} / {{budgetTokens}} رمز مقدّر",
+ "contextPercent": "{{percent}}% من السياق",
+ "compactContext": "ضغط السياق",
+ "aiSettings": "إعدادات الذكاء الاصطناعي",
+ "history": "السجل",
+ "newConversation": "محادثة جديدة",
+ "untitledConversation": "محادثة",
+ "clickToRename": "انقر لإعادة التسمية",
+ "renameConversation": "إعادة تسمية المحادثة",
+ "deleteConversation": "حذف المحادثة",
+ "confirmDeleteConversation": "حذف \"{{title}}\"؟",
+ "addSkipRange": "إضافة نطاق تخطٍّ",
+ "skipButtonShort": "+ تخطٍّ",
+ "emptyState": "لا توجد رسائل بعد. اطلب من الوكيل قص الصمت أو تقليص الوقفات أو إضافة ترجمات.",
+ "authorUser": "أنت",
+ "authorAssistant": "OpenScreen",
+ "rewindToMessage": "إعادة الضبط إلى هذه الرسالة",
+ "copyMessage": "نسخ الرسالة",
+ "copiedToClipboard": "تم النسخ إلى الحافظة",
+ "copyFailed": "تعذّر النسخ",
+ "appliedPrefix": "تم التطبيق:",
+ "thinking": "جارٍ التفكير…",
+ "composerPlaceholder": "صف التعديل الذي تريده.",
+ "modelLabel": "النموذج",
+ "reasoningEffortLabel": "جهد الاستدلال",
+ "sendTitle": "إرسال (Enter)",
+ "send": "إرسال",
+ "rewindConfirmTitle": "إعادة الضبط هنا؟",
+ "rewindConfirmBody": "سيتم التراجع عن تعديلات الوكيل والأدوار اللاحقة بعد هذه النقطة. سيُستعاد المشروع والمحادثة وحالة الوكيل.",
+ "rewindConfirm": "إعادة الضبط",
+ "configureModel": "تهيئة نموذج الذكاء الاصطناعي",
+ "historyDialog": {
+ "title": "سجل المحادثات",
+ "subtitle": "التبديل بين الجلسات أو إنشاء جلسة جديدة",
+ "empty": "لا توجد محادثات بعد.",
+ "msgsCount": "{{count}} رسالة · {{date}}"
+ }
+ },
+ "newProjectDialog": {
+ "title": "مشروع جديد",
+ "subtitle": "اختر نقطة بداية وأعطها اسمًا",
+ "nameLabel": "اسم المشروع",
+ "startingPointLabel": "نقطة البداية",
+ "create": "إنشاء المشروع",
+ "defaultTitle": "مشروع بلا عنوان",
+ "templates": {
+ "blankTitle": "مشروع فارغ",
+ "blankDesc": "جدول زمني فارغ، جاهز للاستيراد",
+ "screenRecordingTitle": "تسجيل الشاشة",
+ "screenRecordingDesc": "بدء التقاط النظام",
+ "importMediaDesc": "فيديو، صوت، صور من القرص",
+ "fromTemplateTitle": "من قالب",
+ "fromTemplateDesc": "قصة مصورة محددة مسبقًا"
+ }
+ },
+ "openProjectDialog": {
+ "title": "فتح مشروع",
+ "subtitle": "تابع مشروعًا موجودًا أو تصفح ملفاتك",
+ "searchPlaceholder": "بحث في المشاريع…",
+ "noMatches": "لا توجد مشاريع تطابق \"{{query}}\".",
+ "navigateHint": "للتنقل ·",
+ "openHint": "للفتح",
+ "browseFiles": "تصفح الملفات…"
+ },
+ "editClipDialog": {
+ "title": "تعديل المقطع",
+ "adjustStart": "ضبط بداية المقطع",
+ "adjustEnd": "ضبط نهاية المقطع",
+ "start": "البداية",
+ "end": "النهاية",
+ "duration": "المدة",
+ "reset": "إعادة التعيين",
+ "apply": "تطبيق",
+ "pickClipTitle": "اختر مقطعًا لتعديله",
+ "clipLabel": "المقطع {{index}}"
+ },
+ "insertSourceDialog": {
+ "title": "إدراج المصدر",
+ "subtitle": "أين تريد وضع \"{{assetLabel}}\" على الجدول الزمني؟",
+ "addBefore": "إضافة قبل",
+ "addBeforeDesc": "إدراج المصدر بالكامل قبل المقطع المستهدف.",
+ "addAfter": "إضافة بعد",
+ "addAfterDesc": "إدراج المصدر بالكامل بعد المقطع المستهدف.",
+ "split": "تقسيم هنا وإدراج",
+ "splitDesc": "تقسيم المقطع المستهدف عند نقطة الإفلات وإدراج المصدر بينهما."
+ },
+ "cropDialog": {
+ "subtitle": "اسحب المنطقة أو مقابضها لضبط منطقة القص",
+ "fieldX": "X",
+ "fieldY": "Y",
+ "fieldW": "W",
+ "fieldH": "H"
}
}
diff --git a/src/i18n/locales/ar/launch.json b/src/i18n/locales/ar/launch.json
index 5dde6a8f9..64c0fa750 100644
--- a/src/i18n/locales/ar/launch.json
+++ b/src/i18n/locales/ar/launch.json
@@ -10,6 +10,7 @@
"openProject": "فتح مشروع",
"useVerticalTray": "استخدام الشريط العمودي",
"useHorizontalTray": "استخدام الشريط الأفقي",
+ "openStudio": "فتح الاستوديو",
"openNotes": "فتح الملاحظات",
"openNotesPlaceholder": "اكتب ملاحظاتك هنا...",
"notesToolbar": {
@@ -27,7 +28,12 @@
"disableSystemAudio": "تعطيل صوت النظام",
"enableMicrophone": "تفعيل الميكروفون",
"disableMicrophone": "تعطيل الميكروفون",
- "defaultMicrophone": "الميكروفون الافتراضي"
+ "defaultMicrophone": "الميكروفون الافتراضي",
+ "systemAudio": "صوت النظام",
+ "microphone": "الميكروفون",
+ "on": "قيد التشغيل",
+ "off": "متوقف",
+ "inputDevice": "جهاز الإدخال"
},
"webcam": {
"enableWebcam": "تفعيل كاميرا الويب",
@@ -35,12 +41,17 @@
"defaultCamera": "الكاميرا الافتراضية",
"searching": "جاري البحث...",
"noneFound": "لم يتم العثور على كاميرا",
- "unavailable": "الكاميرا غير متوفرة"
+ "unavailable": "الكاميرا غير متوفرة",
+ "camera": "الكاميرا",
+ "cameraDevice": "جهاز الكاميرا"
},
"sourceSelector": {
"loading": "جاري تحميل المصادر...",
"screens": "الشاشات ({{count}})",
"windows": "النوافذ ({{count}})",
+ "emptyTitle": "لم يتم العثور على شاشات أو نوافذ",
+ "emptyDescription": "إذا كنت قد منحت للتو إذن تسجيل الشاشة، أعد تحميل هذه النافذة. قد تحتاج على macOS إلى إعادة فتح OpenScreen.",
+ "loadFailedDescription": "تعذّر على OpenScreen تحميل مصادر الالتقاط. أعد تحميل هذه النافذة وحاول مرة أخرى.",
"defaultSourceName": "الشاشة"
},
"recording": {
diff --git a/src/i18n/locales/ar/settings.json b/src/i18n/locales/ar/settings.json
index 716d37965..6543c683d 100644
--- a/src/i18n/locales/ar/settings.json
+++ b/src/i18n/locales/ar/settings.json
@@ -8,7 +8,8 @@
"title": "وضع التركيز",
"manual": "يدوي",
"auto": "تلقائي",
- "autoDescription": "الكاميرا تتبع موضع المؤشر المسجل"
+ "autoDescription": "الكاميرا تتبع موضع المؤشر المسجل",
+ "lockedDisclaimer": "يتم التحكم به بواسطة مفتاح التركيز التلقائي العام في الخط الزمني. أوقف تشغيله لضبط وضع التركيز لكل تكبير على حدة."
},
"customScale": "تكبير مخصص",
"position": {
@@ -135,8 +136,6 @@
"textPlaceholder": "أدخل النص هنا...",
"fontStyle": "نمط الخط",
"selectStyle": "حدد النمط",
- "textAnimation": "تحريك النص",
- "selectAnimation": "حدد الحركة",
"size": "الحجم",
"customFonts": "خطوط مخصصة",
"textColor": "لون النص",
@@ -182,6 +181,17 @@
"modern": "حديث",
"clean": "نظيف"
},
+ "textAnimation": {
+ "title": "تحريك النص",
+ "selectAnimation": "حدد الحركة",
+ "none": "بدون",
+ "fade": "تلاشي",
+ "rise": "ارتفاع",
+ "pop": "ظهور",
+ "slideLeft": "انزلاق لليسار",
+ "typewriter": "آلة كاتبة",
+ "pulse": "نبض"
+ },
"customFont": {
"dialogTitle": "إضافة خط Google",
"urlLabel": "رابط استيراد خطوط Google",
@@ -202,6 +212,7 @@
"errorLoadFailed": "تعذر تحميل الخط. يرجى التحقق من صحة رابط خطوط Google."
},
"cursor": {
+ "title": "المؤشر",
"theme": "نمط المؤشر",
"themeDefault": "افتراضي",
"show": "إظهار المؤشر",
@@ -209,7 +220,8 @@
"smoothing": "التنعيم",
"motionBlur": "ضبابية الحركة",
"clickBounce": "ارتداد النقر",
- "clipToBounds": "القص ضمن اللوحة"
+ "clipToBounds": "القص ضمن اللوحة",
+ "clipToBoundsDescription": "يبقي المؤشر داخل إطار الفيديو. أوقف التشغيل للسماح للمؤشر بتجاوز الحواف - مفيد عند التكبير أو التحريك."
},
"language": {
"title": "اللغة"
@@ -217,5 +229,9 @@
"timeline": {
"title": "المخطط الزمني",
"waveform": "عرض الموجة الصوتية على مسار القطع"
+ },
+ "facets": {
+ "captions": "الترجمة",
+ "transcript": "النص"
}
}
diff --git a/src/i18n/locales/ar/timeline.json b/src/i18n/locales/ar/timeline.json
index bd57d650e..b054fa247 100644
--- a/src/i18n/locales/ar/timeline.json
+++ b/src/i18n/locales/ar/timeline.json
@@ -2,6 +2,10 @@
"buttons": {
"addZoom": "إضافة تكبير (Z)",
"suggestZooms": "اقتراح تكبير من المؤشر",
+ "autoZoomOn": "اقتراحات التكبير التلقائي مفعّلة — انقر لإزالة التكبيرات المقترحة",
+ "autoZoomOff": "اقتراحات التكبير التلقائي معطّلة — انقر لاقتراح تكبيرات من المؤشر",
+ "autoFocusAllOn": "التركيز التلقائي مفعّل لجميع التكبيرات — انقر للتبديل إلى يدوي للجميع",
+ "autoFocusAllOff": "تفعيل التركيز التلقائي لجميع التكبيرات (الكاميرا تتبع المؤشر)",
"addTrim": "إضافة قص (T)",
"addAnnotation": "إضافة شرح (A)",
"addBlur": "إضافة تمويه (B)",
@@ -57,5 +61,32 @@
"success": {
"addedZoomSuggestions": "تمت إضافة {{count}} اقتراح تكبير بناءً على المؤشر",
"addedZoomSuggestionsPlural": "تمت إضافة {{count}} اقتراحات تكبير بناءً على المؤشر"
+ },
+ "toolbar": {
+ "autoEnhance": "تحسين تلقائي",
+ "automaticZooms": "تكبيرات تلقائية",
+ "automaticZoomsHint": "من حركة المؤشر المسجلة",
+ "smartZoomsAndCuts": "تكبيرات وقصات ذكية",
+ "smartZoomsAndCutsHint": "باستخدام الذكاء الاصطناعي",
+ "comment": "تعليق",
+ "aspectRatio": "نسبة العرض إلى الارتفاع",
+ "timelineTools": "أدوات المخطط الزمني",
+ "arrangeClips": "ترتيب المقاطع",
+ "arrangeClipsHint": "اسحب المقاطع أدناه لإعادة ترتيبها أو إسقاط مقاطع جديدة",
+ "newAnnotation": "شرح جديد",
+ "noAnnotationsYet": "لا توجد شروح بعد",
+ "constantSpeed": "سرعة ثابتة",
+ "noTrims": "لا يوجد قص",
+ "dragToReorderHint": "اسحب لإعادة الترتيب · انقر نقرًا مزدوجًا لتعديل نقطتي البداية والنهاية",
+ "editInOutPoints": "تعديل نقطتي البداية والنهاية",
+ "deleteClip": "حذف المقطع",
+ "dropToAdd": "أفلت للإضافة إلى المخطط الزمني",
+ "importRecordingFirst": "استورد تسجيلاً أولاً",
+ "noAutoZoomMoments": "لم يتم العثور على لحظات تكبير تلقائي",
+ "noAutoZoomMomentsDescription": "لا يحتوي هذا التسجيل على بيانات حركة مؤشر، أو أن التكبيرات الحالية تغطي بالفعل اللحظات المزدحمة.",
+ "addedAutoZoom": "تمت إضافة {{count}} تكبير تلقائي",
+ "addedAutoZoomPlural": "تمت إضافة {{count}} تكبيرات تلقائية",
+ "autoZoomFailed": "فشل التكبير التلقائي",
+ "aiEnhanceRequested": "تم طلب تحسين هذا التسجيل من وكيل الذكاء الاصطناعي"
}
}
diff --git a/src/i18n/locales/en/dialogs.json b/src/i18n/locales/en/dialogs.json
index f4d8d4e59..90599af16 100644
--- a/src/i18n/locales/en/dialogs.json
+++ b/src/i18n/locales/en/dialogs.json
@@ -62,7 +62,19 @@
"importVideo": "Import Video File…",
"loadProject": "Load Project…",
"saveProject": "Save Project…",
- "saveProjectAs": "Save Project As…"
+ "saveProjectAs": "Save Project As…",
+ "modal": {
+ "closeTitle": "Save changes before closing?",
+ "closeBody": "Your project has unsaved changes. Save them now, discard them, or stay in the editor.",
+ "newTitle": "Save changes before creating a new project?",
+ "openTitle": "Save changes before opening another project?",
+ "recordTitle": "Save changes before starting a new recording?",
+ "sharedBody": "The current project has unsaved changes. Save them first, discard them, or cancel.",
+ "notSavedYet": "The current project has not been saved to disk yet.",
+ "discard": "Discard",
+ "saveAndContinue": "Save & continue",
+ "saving": "Saving…"
+ }
},
"fileDialogs": {
"saveGif": "Save Exported GIF",
diff --git a/src/i18n/locales/en/editor.json b/src/i18n/locales/en/editor.json
index 5810c45c6..64a1b7475 100644
--- a/src/i18n/locales/en/editor.json
+++ b/src/i18n/locales/en/editor.json
@@ -65,9 +65,12 @@
},
"emptyState": {
"title": "No project open",
- "description": "Import a video to start editing, or load an existing OpenScreen project.",
- "importVideoButton": "Import Video File…",
- "loadProjectButton": "Load Project…",
+ "description": "Create a new project or open an existing one.",
+ "titleHasAsset": "Add a video to get started",
+ "descriptionHasAsset": "Import a recording to begin editing.",
+ "newProjectButton": "New project + import video",
+ "importVideoButton": "Import video",
+ "loadProjectButton": "Open project",
"supportedFormats": "Supported formats: MP4, MOV, WebM, MKV, AVI, M4V, WMV",
"dragDropHint": "or drag & drop a .openscreen project file here",
"dropOverlay": "Drop project file to open",
@@ -89,5 +92,263 @@
"annotation": "Text",
"blur": "Blur"
}
+ },
+ "topbar": {
+ "toggleChatPanel": "Toggle chat panel",
+ "openProject": "Open project",
+ "newProject": "New project",
+ "saveProject": "Save project",
+ "unsaved": "Unsaved",
+ "saved": "Saved",
+ "switchToLightTheme": "Switch to light theme",
+ "switchToDarkTheme": "Switch to dark theme",
+ "toggleTheme": "Toggle theme",
+ "settings": "Settings",
+ "export": "Export",
+ "renameProject": "Rename project",
+ "noProject": "No project",
+ "changeLanguage": "Change language",
+ "editorMode": "Editor mode",
+ "modes": {
+ "media": "Media",
+ "edit": "Edit",
+ "rec": "Rec"
+ }
+ },
+ "rec": {
+ "source": "Source",
+ "systemAudio": "System audio",
+ "microphone": "Microphone",
+ "camera": "Camera",
+ "cursorHighlight": "Cursor highlight",
+ "on": "On",
+ "off": "Off",
+ "loading": "Loading…",
+ "noCameraFound": "No camera found",
+ "cameraAccessError": "Couldn't access this camera",
+ "startingCamera": "Starting camera…",
+ "turnOnCameraHint": "Turn on the camera for a live preview",
+ "entireScreen": "Entire Screen",
+ "cancel": "Cancel",
+ "startRecording": "Start recording",
+ "startRecordingHint": "Opens the recording widget and closes this editor window.",
+ "sourceModal": {
+ "screens": "Screens ({{count}})",
+ "windows": "Windows ({{count}})",
+ "loadingSources": "Loading sources…",
+ "noScreensFound": "No screens found",
+ "noWindowsFound": "No windows found",
+ "cancel": "Cancel"
+ }
+ },
+ "mediaStage": {
+ "openProjectFirst": "Open a project first",
+ "couldNotAddAsset": "Could not add asset",
+ "searchPlaceholder": "Search media…",
+ "dragHint": "Drag a clip onto the timeline below to add it",
+ "emptyHint": "No media yet — import a recording to get started.",
+ "importMedia": "Import media",
+ "added": "Added {{label}}",
+ "sourceTranscript": "Source Transcript",
+ "close": "Close",
+ "transcriptReady": "Transcript ready",
+ "transcribing": "Transcribing",
+ "transcribingEllipsis": "Transcribing…",
+ "pendingTranscription": "Pending transcription",
+ "transcriptionFailed": "Transcription failed",
+ "noTranscript": "No transcript",
+ "notGeneratedYet": "Not generated yet",
+ "regenerateAs": "Regenerate as",
+ "auto": "Auto",
+ "regenerate": "Regenerate",
+ "transcriptEmpty": "Transcript is empty.",
+ "notGeneratedHint": "Not generated yet — pick a language and click regenerate.",
+ "generating": "Generating",
+ "generationFailed": "Generation failed",
+ "generated": "Generated",
+ "generationFailedHint": "Generation failed — pick a language and regenerate.",
+ "noPreviewAvailable": "No preview available",
+ "restart": "Restart",
+ "detectedLanguage": "Detected language: {{language}}"
+ },
+ "exportDialog": {
+ "title": "Export",
+ "subtitle": "Render the timeline to a file",
+ "addVideoBeforeExporting": "Add a video before exporting.",
+ "quality": "Quality",
+ "qualitySmallerFile": "Smaller file",
+ "qualityRecommended": "Recommended",
+ "qualityMatchRecording": "Match recording",
+ "frameRate": "Frame rate",
+ "codec": "Codec",
+ "codecBestCompatibility": "Best compatibility",
+ "codecMaySupportVary": "May not be supported by every system encoder",
+ "size": "Size",
+ "loopGif": "Loop GIF",
+ "loopOn": "Loop on",
+ "loopOff": "Loop off",
+ "pickFormatAndExport": "Pick a format and press Export to start.",
+ "savedTo": "Saved to",
+ "exportFailedGeneric": "Export failed.",
+ "writingFile": "Writing file…",
+ "renderingFrames": "Rendering frames",
+ "framesEta": "{{current}} / {{total}} frames · ETA {{eta}}s",
+ "preparingEncoder": "Preparing encoder…",
+ "close": "Close",
+ "cancel": "Cancel",
+ "rendering": "Rendering…",
+ "saving": "Saving…",
+ "starting": "Starting…",
+ "exportGif": "Export GIF",
+ "exportMp4": "Export MP4",
+ "exportedGif": "GIF exported",
+ "exportedVideo": "Video exported",
+ "showInFolder": "Show in folder",
+ "exportFailed": "Export failed",
+ "failedToWriteFile": "Failed to write file"
+ },
+ "inspector": {
+ "resetFocusPoint": "Reset focus point",
+ "setColor": "Set color {{color}}",
+ "trimHiddenDuration": "{{duration}}s of source media hidden from the edited timeline.",
+ "restoreDeleteTrim": "Restore (delete trim)",
+ "collapseInspector": "Collapse inspector",
+ "captionsDescription": "Generate word-timed captions from the transcript and drop them onto the timeline.",
+ "generateCaptions": "Generate captions",
+ "cropDescription": "Reframe the recording — pick an aspect ratio and zoom into the region you want to keep.",
+ "openCrop": "Open crop…"
+ },
+ "leftPanel": {
+ "mediaTitle": "Media",
+ "searchPlaceholder": "Search…",
+ "clearSearch": "Clear search",
+ "emptyHint": "No media in this project yet. Import a video below.",
+ "transcriptReadyBadge": "TRANSCRIPT READY"
+ },
+ "leftRail": {
+ "chat": "Chat",
+ "media": "Media",
+ "ariaLabel": "Left tools"
+ },
+ "chat": {
+ "changeProvider": "Change provider",
+ "back": "Back",
+ "currentModel": "Current model:",
+ "notSelected": "Not selected",
+ "loadingModels": "Loading models…",
+ "searchModels": "Search models…",
+ "fetchModelsFailed": "Couldn't fetch live models ({{error}}); open provider settings to type a model id manually.",
+ "noModelsAvailable": "No models available from this provider.",
+ "noModelsMatch": "No models match this search.",
+ "noProvidersConnected": "No connected providers yet.",
+ "selectModelFailed": "Could not select model",
+ "providerSettings": "Provider settings…",
+ "applyEditsFailed": "Could not apply the agent's edits",
+ "chatFailed": "Chat failed",
+ "rewindFailed": "Rewind failed",
+ "rewoundSuccess": "Rewound to the start of that message",
+ "notEnoughHistory": "Not enough history to compact yet.",
+ "compactedSuccess": "Compacted earlier context",
+ "compactFailed": "Compact failed",
+ "createSessionFailed": "Could not create conversation",
+ "deleteSessionFailed": "Could not delete conversation",
+ "renameSessionFailed": "Could not rename conversation",
+ "reasoningEffortUpdateFailed": "Could not update reasoning effort",
+ "addSkipRangePrompt": "Add skip range\nFormat: startSec-endSec (e.g. 1.2-3.4)",
+ "addSkipRangeFormatError": "Use startSec-endSec, e.g. 1.2-3.4",
+ "addSkipRangeOrderError": "endSec must be greater than startSec.",
+ "addSkipRangeApplied": "Added skip {{startSec}}–{{endSec}}s.",
+ "contextTooltip": "{{usedTokens}} / {{budgetTokens}} estimated tokens",
+ "contextPercent": "{{percent}}% context",
+ "compactContext": "Compact context",
+ "aiSettings": "AI settings",
+ "history": "History",
+ "newConversation": "New conversation",
+ "untitledConversation": "Conversation",
+ "clickToRename": "Click to rename",
+ "renameConversation": "Rename conversation",
+ "deleteConversation": "Delete conversation",
+ "confirmDeleteConversation": "Delete \"{{title}}\"?",
+ "addSkipRange": "Add skip range",
+ "skipButtonShort": "+ skip",
+ "emptyState": "No messages yet. Ask the agent to cut silences, tighten pauses, or add captions.",
+ "authorUser": "You",
+ "authorAssistant": "OpenScreen",
+ "rewindToMessage": "Rewind to this message",
+ "copyMessage": "Copy message",
+ "copiedToClipboard": "Copied to clipboard",
+ "copyFailed": "Couldn't copy",
+ "appliedPrefix": "applied:",
+ "thinking": "Thinking…",
+ "composerPlaceholder": "Describe the edit you want.",
+ "modelLabel": "Model",
+ "reasoningEffortLabel": "Reasoning effort",
+ "sendTitle": "Send (Enter)",
+ "send": "Send",
+ "rewindConfirmTitle": "Rewind here?",
+ "rewindConfirmBody": "The agent's edits and follow-up turns after this point get rolled back. Project, conversation, and agent state will be restored.",
+ "rewindConfirm": "Rewind",
+ "configureModel": "Configure AI Model",
+ "historyDialog": {
+ "title": "Conversation history",
+ "subtitle": "Switch or create sessions",
+ "empty": "No conversations yet.",
+ "msgsCount": "{{count}} msgs · {{date}}"
+ }
+ },
+ "newProjectDialog": {
+ "title": "New project",
+ "subtitle": "Choose a starting point and give it a name",
+ "nameLabel": "Project name",
+ "startingPointLabel": "Starting point",
+ "create": "Create project",
+ "defaultTitle": "Untitled project",
+ "templates": {
+ "blankTitle": "Blank project",
+ "blankDesc": "Empty timeline, ready to import",
+ "screenRecordingTitle": "Screen recording",
+ "screenRecordingDesc": "Start system capture",
+ "importMediaDesc": "Video, audio, images from disk",
+ "fromTemplateTitle": "From template",
+ "fromTemplateDesc": "Predefined storyboard"
+ }
+ },
+ "openProjectDialog": {
+ "title": "Open project",
+ "subtitle": "Pick up an existing project or browse your files",
+ "searchPlaceholder": "Search projects…",
+ "noMatches": "No projects match \"{{query}}\".",
+ "navigateHint": "to navigate ·",
+ "openHint": "to open",
+ "browseFiles": "Browse files…"
+ },
+ "editClipDialog": {
+ "title": "Edit clip",
+ "adjustStart": "Adjust clip start",
+ "adjustEnd": "Adjust clip end",
+ "start": "Start",
+ "end": "End",
+ "duration": "Duration",
+ "reset": "Reset",
+ "apply": "Apply",
+ "pickClipTitle": "Choose a clip to edit",
+ "clipLabel": "Clip {{index}}"
+ },
+ "insertSourceDialog": {
+ "title": "Insert source",
+ "subtitle": "Where to place \"{{assetLabel}}\" on the timeline?",
+ "addBefore": "Add before",
+ "addBeforeDesc": "Insert the whole source before the target clip.",
+ "addAfter": "Add after",
+ "addAfterDesc": "Insert the whole source after the target clip.",
+ "split": "Split here and insert",
+ "splitDesc": "Split the target clip at the drop point and insert the source in between."
+ },
+ "cropDialog": {
+ "subtitle": "Drag the region or its handles to adjust the crop area",
+ "fieldX": "X",
+ "fieldY": "Y",
+ "fieldW": "W",
+ "fieldH": "H"
}
}
diff --git a/src/i18n/locales/en/launch.json b/src/i18n/locales/en/launch.json
index 87929ef90..8175470f1 100644
--- a/src/i18n/locales/en/launch.json
+++ b/src/i18n/locales/en/launch.json
@@ -28,7 +28,12 @@
"disableSystemAudio": "Disable system audio",
"enableMicrophone": "Enable microphone",
"disableMicrophone": "Disable microphone",
- "defaultMicrophone": "Default Microphone"
+ "defaultMicrophone": "Default Microphone",
+ "systemAudio": "System audio",
+ "microphone": "Microphone",
+ "on": "On",
+ "off": "Off",
+ "inputDevice": "Input device"
},
"webcam": {
"enableWebcam": "Enable webcam",
@@ -36,7 +41,9 @@
"defaultCamera": "Default Camera",
"searching": "Searching...",
"noneFound": "No camera found",
- "unavailable": "Camera unavailable"
+ "unavailable": "Camera unavailable",
+ "camera": "Camera",
+ "cameraDevice": "Camera device"
},
"cursor": {
"useEditableCursor": "Use editable cursor",
diff --git a/src/i18n/locales/en/settings.json b/src/i18n/locales/en/settings.json
index 2349b6caa..bc450ef1c 100644
--- a/src/i18n/locales/en/settings.json
+++ b/src/i18n/locales/en/settings.json
@@ -212,6 +212,7 @@
"errorLoadFailed": "The font could not be loaded. Please verify the Google Fonts URL is correct."
},
"cursor": {
+ "title": "Cursor",
"theme": "Cursor Style",
"themeDefault": "Default",
"show": "Show Cursor",
@@ -228,5 +229,9 @@
"timeline": {
"title": "Timeline",
"waveform": "Show Audio Waveform on Trim Track"
+ },
+ "facets": {
+ "captions": "Captions",
+ "transcript": "Transcript"
}
}
diff --git a/src/i18n/locales/en/timeline.json b/src/i18n/locales/en/timeline.json
index a906edcd8..18bf7c606 100644
--- a/src/i18n/locales/en/timeline.json
+++ b/src/i18n/locales/en/timeline.json
@@ -61,5 +61,32 @@
"success": {
"addedZoomSuggestions": "Added {{count}} cursor-based zoom suggestion",
"addedZoomSuggestionsPlural": "Added {{count}} cursor-based zoom suggestions"
+ },
+ "toolbar": {
+ "autoEnhance": "Auto-enhance",
+ "automaticZooms": "Automatic zooms",
+ "automaticZoomsHint": "From recorded cursor movement",
+ "smartZoomsAndCuts": "Smart zooms + cuts",
+ "smartZoomsAndCutsHint": "With AI",
+ "comment": "Comment",
+ "aspectRatio": "Aspect ratio",
+ "timelineTools": "Timeline tools",
+ "arrangeClips": "Arrange clips",
+ "arrangeClipsHint": "Drag clips below to reorder or drop new ones in",
+ "newAnnotation": "New annotation",
+ "noAnnotationsYet": "No annotations yet",
+ "constantSpeed": "Constant speed",
+ "noTrims": "No trims",
+ "dragToReorderHint": "Drag to reorder · double-click to edit in/out points",
+ "editInOutPoints": "Edit in/out points",
+ "deleteClip": "Delete clip",
+ "dropToAdd": "Drop to add to timeline",
+ "importRecordingFirst": "Import a recording first",
+ "noAutoZoomMoments": "No auto-zoom moments found",
+ "noAutoZoomMomentsDescription": "This recording has no cursor movement data, or existing zooms already cover the busy moments.",
+ "addedAutoZoom": "Added {{count}} automatic zoom",
+ "addedAutoZoomPlural": "Added {{count}} automatic zooms",
+ "autoZoomFailed": "Auto-zoom failed",
+ "aiEnhanceRequested": "Asked the AI agent to enhance this recording"
}
}
diff --git a/src/i18n/locales/es/dialogs.json b/src/i18n/locales/es/dialogs.json
index 0b9090f14..954121938 100644
--- a/src/i18n/locales/es/dialogs.json
+++ b/src/i18n/locales/es/dialogs.json
@@ -57,9 +57,23 @@
"detailLoadProject": "¿Deseas guardar tu proyecto antes de cargar otro?",
"saveAndLoadProject": "Guardar y cargar proyecto",
"discardAndLoadProject": "Descartar y cargar proyecto",
+ "newProject": "Nuevo proyecto",
+ "importVideo": "Importar archivo de vídeo…",
"loadProject": "Cargar proyecto…",
"saveProject": "Guardar proyecto…",
- "saveProjectAs": "Guardar proyecto como…"
+ "saveProjectAs": "Guardar proyecto como…",
+ "modal": {
+ "closeTitle": "¿Guardar los cambios antes de cerrar?",
+ "closeBody": "Tu proyecto tiene cambios sin guardar. Guárdalos ahora, descártalos o permanece en el editor.",
+ "newTitle": "¿Guardar los cambios antes de crear un nuevo proyecto?",
+ "openTitle": "¿Guardar los cambios antes de abrir otro proyecto?",
+ "recordTitle": "¿Guardar los cambios antes de iniciar una nueva grabación?",
+ "sharedBody": "El proyecto actual tiene cambios sin guardar. Guárdalos primero, descártalos o cancela.",
+ "notSavedYet": "El proyecto actual aún no se ha guardado en disco.",
+ "discard": "Descartar",
+ "saveAndContinue": "Guardar y continuar",
+ "saving": "Guardando…"
+ }
},
"fileDialogs": {
"saveGif": "Guardar GIF exportado",
diff --git a/src/i18n/locales/es/editor.json b/src/i18n/locales/es/editor.json
index c2c3a910e..e68cdada9 100644
--- a/src/i18n/locales/es/editor.json
+++ b/src/i18n/locales/es/editor.json
@@ -65,9 +65,12 @@
},
"emptyState": {
"title": "No hay proyecto abierto",
- "description": "Importa un video para empezar a editar o carga un proyecto de OpenScreen existente.",
- "importVideoButton": "Importar archivo de video…",
- "loadProjectButton": "Cargar proyecto…",
+ "description": "Crea un nuevo proyecto o abre uno existente.",
+ "titleHasAsset": "Añade un vídeo para empezar",
+ "descriptionHasAsset": "Importa una grabación para empezar a editar.",
+ "newProjectButton": "Nuevo proyecto + importar vídeo",
+ "importVideoButton": "Importar vídeo",
+ "loadProjectButton": "Abrir proyecto",
"supportedFormats": "Formatos compatibles: MP4, MOV, WebM, MKV, AVI, M4V, WMV",
"dragDropHint": "o arrastra y suelta un archivo .openscreen aquí",
"dropOverlay": "Suelta el archivo de proyecto para abrirlo",
@@ -89,5 +92,263 @@
"annotation": "Anotación",
"blur": "Desenfoque"
}
+ },
+ "topbar": {
+ "toggleChatPanel": "Alternar panel de chat",
+ "openProject": "Abrir proyecto",
+ "newProject": "Nuevo proyecto",
+ "saveProject": "Guardar proyecto",
+ "unsaved": "Sin guardar",
+ "saved": "Guardado",
+ "switchToLightTheme": "Cambiar a tema claro",
+ "switchToDarkTheme": "Cambiar a tema oscuro",
+ "toggleTheme": "Alternar tema",
+ "settings": "Ajustes",
+ "export": "Exportar",
+ "renameProject": "Renombrar proyecto",
+ "noProject": "Sin proyecto",
+ "changeLanguage": "Cambiar idioma",
+ "editorMode": "Modo del editor",
+ "modes": {
+ "media": "Multimedia",
+ "edit": "Editar",
+ "rec": "Grabar"
+ }
+ },
+ "rec": {
+ "source": "Fuente",
+ "systemAudio": "Audio del sistema",
+ "microphone": "Micrófono",
+ "camera": "Cámara",
+ "cursorHighlight": "Resaltar cursor",
+ "on": "Activado",
+ "off": "Desactivado",
+ "loading": "Cargando…",
+ "noCameraFound": "No se encontró cámara",
+ "cameraAccessError": "No se pudo acceder a esta cámara",
+ "startingCamera": "Iniciando cámara…",
+ "turnOnCameraHint": "Activa la cámara para ver una vista previa en directo",
+ "entireScreen": "Toda la pantalla",
+ "cancel": "Cancelar",
+ "startRecording": "Iniciar grabación",
+ "startRecordingHint": "Abre el widget de grabación y cierra esta ventana del editor.",
+ "sourceModal": {
+ "screens": "Pantallas ({{count}})",
+ "windows": "Ventanas ({{count}})",
+ "loadingSources": "Cargando fuentes…",
+ "noScreensFound": "No se encontraron pantallas",
+ "noWindowsFound": "No se encontraron ventanas",
+ "cancel": "Cancelar"
+ }
+ },
+ "mediaStage": {
+ "openProjectFirst": "Abre un proyecto primero",
+ "couldNotAddAsset": "No se pudo añadir el archivo",
+ "searchPlaceholder": "Buscar contenido…",
+ "dragHint": "Arrastra un clip a la línea de tiempo de abajo para añadirlo",
+ "emptyHint": "Aún no hay contenido — importa una grabación para empezar.",
+ "importMedia": "Importar contenido",
+ "added": "{{label}} añadido",
+ "sourceTranscript": "Transcripción de la fuente",
+ "close": "Cerrar",
+ "transcriptReady": "Transcripción lista",
+ "notGeneratedYet": "Aún no generada",
+ "regenerateAs": "Regenerar en",
+ "auto": "Auto",
+ "regenerate": "Regenerar",
+ "transcriptEmpty": "La transcripción está vacía.",
+ "notGeneratedHint": "Aún no generada — elige un idioma y haz clic en regenerar.",
+ "transcribing": "Transcribiendo",
+ "transcribingEllipsis": "Transcribiendo…",
+ "pendingTranscription": "Transcripción pendiente",
+ "transcriptionFailed": "Error de transcripción",
+ "noTranscript": "Sin transcripción",
+ "generating": "Generando",
+ "generationFailed": "Error de generación",
+ "generated": "Generado",
+ "generationFailedHint": "Error de generación — elige un idioma y vuelve a generar.",
+ "noPreviewAvailable": "Vista previa no disponible",
+ "restart": "Reiniciar",
+ "detectedLanguage": "Idioma detectado: {{language}}"
+ },
+ "exportDialog": {
+ "title": "Exportar",
+ "subtitle": "Renderizar la línea de tiempo a un archivo",
+ "addVideoBeforeExporting": "Añade un vídeo antes de exportar.",
+ "quality": "Calidad",
+ "qualitySmallerFile": "Archivo más pequeño",
+ "qualityRecommended": "Recomendado",
+ "qualityMatchRecording": "Igual que la grabación",
+ "frameRate": "Fotogramas por segundo",
+ "codec": "Códec",
+ "codecBestCompatibility": "Mejor compatibilidad",
+ "codecMaySupportVary": "Puede que no sea compatible con todos los codificadores del sistema",
+ "size": "Tamaño",
+ "loopGif": "Bucle de GIF",
+ "loopOn": "Bucle activado",
+ "loopOff": "Bucle desactivado",
+ "pickFormatAndExport": "Elige un formato y pulsa Exportar para empezar.",
+ "savedTo": "Guardado en",
+ "exportFailedGeneric": "Error al exportar.",
+ "writingFile": "Escribiendo archivo…",
+ "renderingFrames": "Renderizando fotogramas",
+ "framesEta": "{{current}} / {{total}} fotogramas · ETA {{eta}}s",
+ "preparingEncoder": "Preparando codificador…",
+ "close": "Cerrar",
+ "cancel": "Cancelar",
+ "rendering": "Renderizando…",
+ "saving": "Guardando…",
+ "starting": "Iniciando…",
+ "exportGif": "Exportar GIF",
+ "exportMp4": "Exportar MP4",
+ "exportedGif": "GIF exportado",
+ "exportedVideo": "Vídeo exportado",
+ "showInFolder": "Mostrar en la carpeta",
+ "exportFailed": "Error al exportar",
+ "failedToWriteFile": "No se pudo escribir el archivo"
+ },
+ "inspector": {
+ "resetFocusPoint": "Restablecer punto de enfoque",
+ "setColor": "Establecer color {{color}}",
+ "trimHiddenDuration": "{{duration}}s de contenido fuente ocultos de la línea de tiempo editada.",
+ "restoreDeleteTrim": "Restaurar (eliminar recorte)",
+ "collapseInspector": "Contraer inspector",
+ "captionsDescription": "Genera subtítulos sincronizados con las palabras a partir de la transcripción y colócalos en la línea de tiempo.",
+ "generateCaptions": "Generar subtítulos",
+ "cropDescription": "Reencuadra la grabación: elige una relación de aspecto y haz zoom en la región que deseas conservar.",
+ "openCrop": "Abrir recorte…"
+ },
+ "leftPanel": {
+ "mediaTitle": "Medios",
+ "searchPlaceholder": "Buscar…",
+ "clearSearch": "Borrar búsqueda",
+ "emptyHint": "Aún no hay medios en este proyecto. Importa un vídeo a continuación.",
+ "transcriptReadyBadge": "TRANSCRIPCIÓN LISTA"
+ },
+ "leftRail": {
+ "chat": "Chat",
+ "media": "Medios",
+ "ariaLabel": "Herramientas izquierdas"
+ },
+ "chat": {
+ "changeProvider": "Cambiar proveedor",
+ "back": "Atrás",
+ "currentModel": "Modelo actual:",
+ "notSelected": "No seleccionado",
+ "loadingModels": "Cargando modelos…",
+ "searchModels": "Buscar modelos…",
+ "fetchModelsFailed": "No se pudieron obtener los modelos en vivo ({{error}}); abre la configuración del proveedor para escribir un id de modelo manualmente.",
+ "noModelsAvailable": "No hay modelos disponibles de este proveedor.",
+ "noModelsMatch": "Ningún modelo coincide con esta búsqueda.",
+ "noProvidersConnected": "Aún no hay proveedores conectados.",
+ "selectModelFailed": "No se pudo seleccionar el modelo",
+ "providerSettings": "Configuración del proveedor…",
+ "applyEditsFailed": "No se pudieron aplicar las ediciones del agente",
+ "chatFailed": "Error en el chat",
+ "rewindFailed": "Error al rebobinar",
+ "rewoundSuccess": "Rebobinado al inicio de ese mensaje",
+ "notEnoughHistory": "Aún no hay suficiente historial para compactar.",
+ "compactedSuccess": "Contexto anterior compactado",
+ "compactFailed": "Error al compactar",
+ "createSessionFailed": "No se pudo crear la conversación",
+ "deleteSessionFailed": "No se pudo eliminar la conversación",
+ "renameSessionFailed": "No se pudo renombrar la conversación",
+ "reasoningEffortUpdateFailed": "No se pudo actualizar el esfuerzo de razonamiento",
+ "addSkipRangePrompt": "Añadir rango de salto\nFormato: startSec-endSec (p. ej. 1.2-3.4)",
+ "addSkipRangeFormatError": "Usa startSec-endSec, p. ej. 1.2-3.4",
+ "addSkipRangeOrderError": "endSec debe ser mayor que startSec.",
+ "addSkipRangeApplied": "Se añadió un salto de {{startSec}}–{{endSec}}s.",
+ "contextTooltip": "{{usedTokens}} / {{budgetTokens}} tokens estimados",
+ "contextPercent": "{{percent}}% de contexto",
+ "compactContext": "Compactar contexto",
+ "aiSettings": "Configuración de IA",
+ "history": "Historial",
+ "newConversation": "Nueva conversación",
+ "untitledConversation": "Conversación",
+ "clickToRename": "Haz clic para renombrar",
+ "renameConversation": "Renombrar conversación",
+ "deleteConversation": "Eliminar conversación",
+ "confirmDeleteConversation": "¿Eliminar \"{{title}}\"?",
+ "addSkipRange": "Añadir rango de salto",
+ "skipButtonShort": "+ salto",
+ "emptyState": "Aún no hay mensajes. Pide al agente que corte silencios, ajuste pausas o añada subtítulos.",
+ "authorUser": "Tú",
+ "authorAssistant": "OpenScreen",
+ "rewindToMessage": "Rebobinar a este mensaje",
+ "copyMessage": "Copiar mensaje",
+ "copiedToClipboard": "Copiado al portapapeles",
+ "copyFailed": "No se pudo copiar",
+ "appliedPrefix": "aplicado:",
+ "thinking": "Pensando…",
+ "composerPlaceholder": "Describe la edición que quieres.",
+ "modelLabel": "Modelo",
+ "reasoningEffortLabel": "Esfuerzo de razonamiento",
+ "sendTitle": "Enviar (Intro)",
+ "send": "Enviar",
+ "rewindConfirmTitle": "¿Rebobinar aquí?",
+ "rewindConfirmBody": "Las ediciones del agente y los turnos posteriores a este punto se revertirán. Se restaurará el proyecto, la conversación y el estado del agente.",
+ "rewindConfirm": "Rebobinar",
+ "configureModel": "Configurar modelo de IA",
+ "historyDialog": {
+ "title": "Historial de conversaciones",
+ "subtitle": "Cambia o crea sesiones",
+ "empty": "Aún no hay conversaciones.",
+ "msgsCount": "{{count}} mensajes · {{date}}"
+ }
+ },
+ "newProjectDialog": {
+ "title": "Nuevo proyecto",
+ "subtitle": "Elige un punto de partida y ponle un nombre",
+ "nameLabel": "Nombre del proyecto",
+ "startingPointLabel": "Punto de partida",
+ "create": "Crear proyecto",
+ "defaultTitle": "Proyecto sin título",
+ "templates": {
+ "blankTitle": "Proyecto en blanco",
+ "blankDesc": "Línea de tiempo vacía, lista para importar",
+ "screenRecordingTitle": "Grabación de pantalla",
+ "screenRecordingDesc": "Iniciar captura del sistema",
+ "importMediaDesc": "Vídeo, audio, imágenes desde el disco",
+ "fromTemplateTitle": "Desde plantilla",
+ "fromTemplateDesc": "Storyboard predefinido"
+ }
+ },
+ "openProjectDialog": {
+ "title": "Abrir proyecto",
+ "subtitle": "Retoma un proyecto existente o explora tus archivos",
+ "searchPlaceholder": "Buscar proyectos…",
+ "noMatches": "Ningún proyecto coincide con \"{{query}}\".",
+ "navigateHint": "para navegar ·",
+ "openHint": "para abrir",
+ "browseFiles": "Explorar archivos…"
+ },
+ "editClipDialog": {
+ "title": "Editar clip",
+ "adjustStart": "Ajustar inicio del clip",
+ "adjustEnd": "Ajustar fin del clip",
+ "start": "Inicio",
+ "end": "Fin",
+ "duration": "Duración",
+ "reset": "Restablecer",
+ "apply": "Aplicar",
+ "pickClipTitle": "Elige un clip para editar",
+ "clipLabel": "Clip {{index}}"
+ },
+ "insertSourceDialog": {
+ "title": "Insertar fuente",
+ "subtitle": "¿Dónde colocar \"{{assetLabel}}\" en la línea de tiempo?",
+ "addBefore": "Añadir antes",
+ "addBeforeDesc": "Inserta toda la fuente antes del clip de destino.",
+ "addAfter": "Añadir después",
+ "addAfterDesc": "Inserta toda la fuente después del clip de destino.",
+ "split": "Dividir aquí e insertar",
+ "splitDesc": "Divide el clip de destino en el punto de soltar e inserta la fuente entre medias."
+ },
+ "cropDialog": {
+ "subtitle": "Arrastra la región o sus controles para ajustar el área de recorte",
+ "fieldX": "X",
+ "fieldY": "Y",
+ "fieldW": "A",
+ "fieldH": "Al"
}
}
diff --git a/src/i18n/locales/es/launch.json b/src/i18n/locales/es/launch.json
index 6b903087c..d1a48e262 100644
--- a/src/i18n/locales/es/launch.json
+++ b/src/i18n/locales/es/launch.json
@@ -10,6 +10,7 @@
"openProject": "Abrir proyecto",
"useVerticalTray": "Usar bandeja vertical",
"useHorizontalTray": "Usar bandeja horizontal",
+ "openStudio": "Abrir Studio",
"openNotes": "Abrir notas",
"openNotesPlaceholder": "Escribe tus notas aquí...",
"notesToolbar": {
@@ -27,7 +28,12 @@
"disableSystemAudio": "Desactivar audio del sistema",
"enableMicrophone": "Activar micrófono",
"disableMicrophone": "Desactivar micrófono",
- "defaultMicrophone": "Micrófono predeterminado"
+ "defaultMicrophone": "Micrófono predeterminado",
+ "systemAudio": "Audio del sistema",
+ "microphone": "Micrófono",
+ "on": "Activado",
+ "off": "Desactivado",
+ "inputDevice": "Dispositivo de entrada"
},
"webcam": {
"enableWebcam": "Activar cámara web",
@@ -35,7 +41,9 @@
"defaultCamera": "Cámara predeterminada",
"searching": "Buscando...",
"noneFound": "No se encontró cámara",
- "unavailable": "Cámara no disponible"
+ "unavailable": "Cámara no disponible",
+ "camera": "Cámara",
+ "cameraDevice": "Dispositivo de cámara"
},
"cursor": {
"useEditableCursor": "Usar cursor editable",
@@ -45,6 +53,9 @@
"loading": "Cargando fuentes...",
"screens": "Pantallas ({{count}})",
"windows": "Ventanas ({{count}})",
+ "emptyTitle": "No se encontraron pantallas ni ventanas",
+ "emptyDescription": "Si acabas de conceder permiso de grabación de pantalla, recarga este selector. En macOS puede que debas volver a abrir OpenScreen.",
+ "loadFailedDescription": "OpenScreen no pudo cargar las fuentes de captura. Recarga este selector e inténtalo de nuevo.",
"defaultSourceName": "Pantalla"
},
"recording": {
diff --git a/src/i18n/locales/es/settings.json b/src/i18n/locales/es/settings.json
index 28cc42576..6c6eda5de 100644
--- a/src/i18n/locales/es/settings.json
+++ b/src/i18n/locales/es/settings.json
@@ -8,7 +8,8 @@
"title": "Modo de enfoque",
"manual": "Manual",
"auto": "Auto",
- "autoDescription": "La cámara sigue la posición del cursor grabado"
+ "autoDescription": "La cámara sigue la posición del cursor grabado",
+ "lockedDisclaimer": "Controlado por el interruptor global de enfoque automático en la línea de tiempo. Desactívalo para configurar el modo de enfoque por cada zoom."
},
"threeD": {
"title": "Rotación 3D",
@@ -211,6 +212,7 @@
"errorLoadFailed": "No se pudo cargar la fuente. Por favor verifica que la URL de Google Fonts sea correcta."
},
"cursor": {
+ "title": "Cursor",
"theme": "Estilo del cursor",
"themeDefault": "Predeterminado",
"show": "Mostrar cursor",
@@ -218,7 +220,8 @@
"smoothing": "Suavizado",
"motionBlur": "Desenfoque de movimiento",
"clickBounce": "Rebote al clic",
- "clipToBounds": "Recortar al lienzo"
+ "clipToBounds": "Recortar al lienzo",
+ "clipToBoundsDescription": "Mantiene el cursor dentro del cuadro del vídeo. Desactívalo para dejar que el cursor sobrepase los bordes; útil al hacer zoom o desplazar la imagen."
},
"language": {
"title": "Idioma"
@@ -226,5 +229,9 @@
"timeline": {
"title": "Línea de tiempo",
"waveform": "Mostrar forma de onda en pista de recorte"
+ },
+ "facets": {
+ "captions": "Subtítulos",
+ "transcript": "Transcripción"
}
}
diff --git a/src/i18n/locales/es/timeline.json b/src/i18n/locales/es/timeline.json
index 95d6d27b6..1bc2fc503 100644
--- a/src/i18n/locales/es/timeline.json
+++ b/src/i18n/locales/es/timeline.json
@@ -2,6 +2,10 @@
"buttons": {
"addZoom": "Agregar zoom (Z)",
"suggestZooms": "Sugerir zooms desde el cursor",
+ "autoZoomOn": "Sugerencias de zoom automático activadas — haz clic para quitar los zooms sugeridos",
+ "autoZoomOff": "Sugerencias de zoom automático desactivadas — haz clic para sugerir zooms desde el cursor",
+ "autoFocusAllOn": "Enfoque automático activado para todos los zooms — haz clic para pasar todos a manual",
+ "autoFocusAllOff": "Activar enfoque automático para todos los zooms (la cámara sigue el cursor)",
"addTrim": "Agregar recorte (T)",
"addAnnotation": "Agregar anotación (A)",
"addSpeed": "Agregar velocidad (S)",
@@ -57,5 +61,32 @@
"success": {
"addedZoomSuggestions": "Se agregó {{count}} sugerencia de zoom basada en el cursor",
"addedZoomSuggestionsPlural": "Se agregaron {{count}} sugerencias de zoom basadas en el cursor"
+ },
+ "toolbar": {
+ "autoEnhance": "Mejora automática",
+ "automaticZooms": "Zooms automáticos",
+ "automaticZoomsHint": "Del movimiento del cursor grabado",
+ "smartZoomsAndCuts": "Zooms y cortes inteligentes",
+ "smartZoomsAndCutsHint": "Con IA",
+ "comment": "Comentario",
+ "aspectRatio": "Relación de aspecto",
+ "timelineTools": "Herramientas de la línea de tiempo",
+ "arrangeClips": "Organizar clips",
+ "arrangeClipsHint": "Arrastra los clips de abajo para reordenarlos o suelta otros nuevos",
+ "newAnnotation": "Nueva anotación",
+ "noAnnotationsYet": "Aún no hay anotaciones",
+ "constantSpeed": "Velocidad constante",
+ "noTrims": "Sin recortes",
+ "dragToReorderHint": "Arrastra para reordenar · doble clic para editar los puntos de entrada/salida",
+ "editInOutPoints": "Editar puntos de entrada/salida",
+ "deleteClip": "Eliminar clip",
+ "dropToAdd": "Suelta para añadir a la línea de tiempo",
+ "importRecordingFirst": "Importa una grabación primero",
+ "noAutoZoomMoments": "No se encontraron momentos para zoom automático",
+ "noAutoZoomMomentsDescription": "Esta grabación no tiene datos de movimiento del cursor, o los zooms existentes ya cubren los momentos con actividad.",
+ "addedAutoZoom": "Se añadió {{count}} zoom automático",
+ "addedAutoZoomPlural": "Se añadieron {{count}} zooms automáticos",
+ "autoZoomFailed": "Error en el zoom automático",
+ "aiEnhanceRequested": "Se pidió al agente de IA que mejore esta grabación"
}
}
diff --git a/src/i18n/locales/fr/dialogs.json b/src/i18n/locales/fr/dialogs.json
index e67e18637..82fc95dcb 100644
--- a/src/i18n/locales/fr/dialogs.json
+++ b/src/i18n/locales/fr/dialogs.json
@@ -57,9 +57,23 @@
"detailLoadProject": "Voulez-vous enregistrer votre projet avant d'en charger un autre ?",
"saveAndLoadProject": "Enregistrer et charger un projet",
"discardAndLoadProject": "Ignorer et charger un projet",
+ "newProject": "Nouveau projet",
+ "importVideo": "Importer un fichier vidéo…",
"loadProject": "Charger un projet…",
"saveProject": "Enregistrer le projet…",
- "saveProjectAs": "Enregistrer le projet sous…"
+ "saveProjectAs": "Enregistrer le projet sous…",
+ "modal": {
+ "closeTitle": "Enregistrer les modifications avant de fermer ?",
+ "closeBody": "Votre projet contient des modifications non enregistrées. Enregistrez-les maintenant, ignorez-les ou restez dans l'éditeur.",
+ "newTitle": "Enregistrer les modifications avant de créer un nouveau projet ?",
+ "openTitle": "Enregistrer les modifications avant d'ouvrir un autre projet ?",
+ "recordTitle": "Enregistrer les modifications avant de démarrer un nouvel enregistrement ?",
+ "sharedBody": "Le projet actuel contient des modifications non enregistrées. Enregistrez-les d'abord, ignorez-les ou annulez.",
+ "notSavedYet": "Le projet actuel n'a pas encore été enregistré sur le disque.",
+ "discard": "Ignorer",
+ "saveAndContinue": "Enregistrer et continuer",
+ "saving": "Enregistrement…"
+ }
},
"fileDialogs": {
"saveGif": "Enregistrer le GIF exporté",
diff --git a/src/i18n/locales/fr/editor.json b/src/i18n/locales/fr/editor.json
index 60d35285f..15aab5f9e 100644
--- a/src/i18n/locales/fr/editor.json
+++ b/src/i18n/locales/fr/editor.json
@@ -65,9 +65,12 @@
},
"emptyState": {
"title": "Aucun projet ouvert",
- "description": "Importez une vidéo pour commencer à éditer, ou chargez un projet OpenScreen existant.",
- "importVideoButton": "Importer un fichier vidéo…",
- "loadProjectButton": "Charger un projet…",
+ "description": "Créez un nouveau projet ou ouvrez-en un existant.",
+ "titleHasAsset": "Ajoutez une vidéo pour commencer",
+ "descriptionHasAsset": "Importez un enregistrement pour commencer à éditer.",
+ "newProjectButton": "Nouveau projet + importer une vidéo",
+ "importVideoButton": "Importer une vidéo",
+ "loadProjectButton": "Ouvrir un projet",
"supportedFormats": "Formats pris en charge : MP4, MOV, WebM, MKV, AVI, M4V, WMV",
"dragDropHint": "ou glissez-déposez un fichier .openscreen ici",
"dropOverlay": "Déposez le fichier de projet pour l'ouvrir",
@@ -89,5 +92,263 @@
"annotation": "Annotation",
"blur": "Flou"
}
+ },
+ "topbar": {
+ "toggleChatPanel": "Afficher/masquer le panneau de discussion",
+ "openProject": "Ouvrir un projet",
+ "newProject": "Nouveau projet",
+ "saveProject": "Enregistrer le projet",
+ "unsaved": "Non enregistré",
+ "saved": "Enregistré",
+ "switchToLightTheme": "Passer au thème clair",
+ "switchToDarkTheme": "Passer au thème sombre",
+ "toggleTheme": "Changer de thème",
+ "settings": "Réglages",
+ "export": "Exporter",
+ "renameProject": "Renommer le projet",
+ "noProject": "Aucun projet",
+ "changeLanguage": "Changer de langue",
+ "editorMode": "Mode de l'éditeur",
+ "modes": {
+ "media": "Médias",
+ "edit": "Édition",
+ "rec": "Enregistrement"
+ }
+ },
+ "rec": {
+ "source": "Source",
+ "systemAudio": "Audio système",
+ "microphone": "Microphone",
+ "camera": "Caméra",
+ "cursorHighlight": "Curseur en surbrillance",
+ "on": "Activé",
+ "off": "Désactivé",
+ "loading": "Chargement…",
+ "noCameraFound": "Aucune caméra trouvée",
+ "cameraAccessError": "Impossible d'accéder à cette caméra",
+ "startingCamera": "Démarrage de la caméra…",
+ "turnOnCameraHint": "Activez la caméra pour voir un aperçu en direct",
+ "entireScreen": "Écran entier",
+ "cancel": "Annuler",
+ "startRecording": "Démarrer l'enregistrement",
+ "startRecordingHint": "Ouvre le widget d'enregistrement et ferme cette fenêtre de l'éditeur.",
+ "sourceModal": {
+ "screens": "Écrans ({{count}})",
+ "windows": "Fenêtres ({{count}})",
+ "loadingSources": "Chargement des sources…",
+ "noScreensFound": "Aucun écran trouvé",
+ "noWindowsFound": "Aucune fenêtre trouvée",
+ "cancel": "Annuler"
+ }
+ },
+ "mediaStage": {
+ "openProjectFirst": "Ouvrez d'abord un projet",
+ "couldNotAddAsset": "Impossible d'ajouter le fichier",
+ "searchPlaceholder": "Rechercher des médias…",
+ "dragHint": "Glissez un clip sur la timeline ci-dessous pour l'ajouter",
+ "emptyHint": "Aucun média pour l'instant — importez un enregistrement pour commencer.",
+ "importMedia": "Importer un média",
+ "added": "{{label}} ajouté",
+ "sourceTranscript": "Transcription de la source",
+ "close": "Fermer",
+ "transcriptReady": "Transcription prête",
+ "notGeneratedYet": "Pas encore générée",
+ "regenerateAs": "Régénérer en",
+ "auto": "Auto",
+ "regenerate": "Régénérer",
+ "transcriptEmpty": "La transcription est vide.",
+ "notGeneratedHint": "Pas encore générée — choisissez une langue et cliquez sur régénérer.",
+ "transcribing": "Transcription en cours",
+ "transcribingEllipsis": "Transcription en cours…",
+ "pendingTranscription": "Transcription en attente",
+ "transcriptionFailed": "Échec de la transcription",
+ "noTranscript": "Aucune transcription",
+ "generating": "Génération en cours",
+ "generationFailed": "Échec de la génération",
+ "generated": "Généré",
+ "generationFailedHint": "Échec de la génération — choisissez une langue et régénérez.",
+ "noPreviewAvailable": "Aucun aperçu disponible",
+ "restart": "Redémarrer",
+ "detectedLanguage": "Langue détectée : {{language}}"
+ },
+ "exportDialog": {
+ "title": "Exporter",
+ "subtitle": "Rendre la timeline dans un fichier",
+ "addVideoBeforeExporting": "Ajoutez une vidéo avant d'exporter.",
+ "quality": "Qualité",
+ "qualitySmallerFile": "Fichier plus petit",
+ "qualityRecommended": "Recommandé",
+ "qualityMatchRecording": "Comme l'enregistrement",
+ "frameRate": "Fréquence d'images",
+ "codec": "Codec",
+ "codecBestCompatibility": "Meilleure compatibilité",
+ "codecMaySupportVary": "Peut ne pas être pris en charge par tous les encodeurs système",
+ "size": "Taille",
+ "loopGif": "Boucle GIF",
+ "loopOn": "Boucle activée",
+ "loopOff": "Boucle désactivée",
+ "pickFormatAndExport": "Choisissez un format et cliquez sur Exporter pour commencer.",
+ "savedTo": "Enregistré dans",
+ "exportFailedGeneric": "Échec de l'export.",
+ "writingFile": "Écriture du fichier…",
+ "renderingFrames": "Rendu des images",
+ "framesEta": "{{current}} / {{total}} images · ETA {{eta}}s",
+ "preparingEncoder": "Préparation de l'encodeur…",
+ "close": "Fermer",
+ "cancel": "Annuler",
+ "rendering": "Rendu en cours…",
+ "saving": "Enregistrement…",
+ "starting": "Démarrage…",
+ "exportGif": "Exporter en GIF",
+ "exportMp4": "Exporter en MP4",
+ "exportedGif": "GIF exporté",
+ "exportedVideo": "Vidéo exportée",
+ "showInFolder": "Afficher dans le dossier",
+ "exportFailed": "Échec de l'export",
+ "failedToWriteFile": "Échec de l'écriture du fichier"
+ },
+ "inspector": {
+ "resetFocusPoint": "Réinitialiser le point de focus",
+ "setColor": "Définir la couleur {{color}}",
+ "trimHiddenDuration": "{{duration}} s de média source masqués de la timeline éditée.",
+ "restoreDeleteTrim": "Restaurer (supprimer le découpage)",
+ "collapseInspector": "Réduire l'inspecteur",
+ "captionsDescription": "Générer des sous-titres synchronisés aux mots à partir de la transcription et les déposer sur la timeline.",
+ "generateCaptions": "Générer les sous-titres",
+ "cropDescription": "Recadrer l'enregistrement — choisissez un format et zoomez sur la région à conserver.",
+ "openCrop": "Ouvrir le recadrage…"
+ },
+ "leftPanel": {
+ "mediaTitle": "Médias",
+ "searchPlaceholder": "Rechercher…",
+ "clearSearch": "Effacer la recherche",
+ "emptyHint": "Aucun média dans ce projet pour l'instant. Importez une vidéo ci-dessous.",
+ "transcriptReadyBadge": "TRANSCRIPTION PRÊTE"
+ },
+ "leftRail": {
+ "chat": "Chat",
+ "media": "Médias",
+ "ariaLabel": "Outils de gauche"
+ },
+ "chat": {
+ "changeProvider": "Changer de fournisseur",
+ "back": "Retour",
+ "currentModel": "Modèle actuel :",
+ "notSelected": "Non sélectionné",
+ "loadingModels": "Chargement des modèles…",
+ "searchModels": "Rechercher des modèles…",
+ "fetchModelsFailed": "Impossible de récupérer les modèles en direct ({{error}}) ; ouvrez les réglages du fournisseur pour saisir un identifiant de modèle manuellement.",
+ "noModelsAvailable": "Aucun modèle disponible pour ce fournisseur.",
+ "noModelsMatch": "Aucun modèle ne correspond à cette recherche.",
+ "noProvidersConnected": "Aucun fournisseur connecté pour l'instant.",
+ "selectModelFailed": "Impossible de sélectionner le modèle",
+ "providerSettings": "Réglages du fournisseur…",
+ "applyEditsFailed": "Impossible d'appliquer les modifications de l'agent",
+ "chatFailed": "Échec du chat",
+ "rewindFailed": "Échec du retour en arrière",
+ "rewoundSuccess": "Retour au début de ce message effectué",
+ "notEnoughHistory": "Historique insuffisant pour compacter pour l'instant.",
+ "compactedSuccess": "Contexte antérieur compacté",
+ "compactFailed": "Échec de la compaction",
+ "createSessionFailed": "Impossible de créer la conversation",
+ "deleteSessionFailed": "Impossible de supprimer la conversation",
+ "renameSessionFailed": "Impossible de renommer la conversation",
+ "reasoningEffortUpdateFailed": "Impossible de mettre à jour l'effort de raisonnement",
+ "addSkipRangePrompt": "Ajouter une plage à ignorer\nFormat : startSec-endSec (ex. 1.2-3.4)",
+ "addSkipRangeFormatError": "Utilisez startSec-endSec, ex. 1.2-3.4",
+ "addSkipRangeOrderError": "endSec doit être supérieur à startSec.",
+ "addSkipRangeApplied": "Plage ignorée ajoutée {{startSec}}–{{endSec}}s.",
+ "contextTooltip": "{{usedTokens}} / {{budgetTokens}} jetons estimés",
+ "contextPercent": "{{percent}}% du contexte",
+ "compactContext": "Compacter le contexte",
+ "aiSettings": "Réglages IA",
+ "history": "Historique",
+ "newConversation": "Nouvelle conversation",
+ "untitledConversation": "Conversation",
+ "clickToRename": "Cliquer pour renommer",
+ "renameConversation": "Renommer la conversation",
+ "deleteConversation": "Supprimer la conversation",
+ "confirmDeleteConversation": "Supprimer « {{title}} » ?",
+ "addSkipRange": "Ajouter une plage à ignorer",
+ "skipButtonShort": "+ saut",
+ "emptyState": "Aucun message pour l'instant. Demandez à l'agent de couper les silences, resserrer les pauses ou ajouter des sous-titres.",
+ "authorUser": "Vous",
+ "authorAssistant": "OpenScreen",
+ "rewindToMessage": "Revenir à ce message",
+ "copyMessage": "Copier le message",
+ "copiedToClipboard": "Copié dans le presse-papiers",
+ "copyFailed": "Impossible de copier",
+ "appliedPrefix": "appliqué :",
+ "thinking": "Réflexion en cours…",
+ "composerPlaceholder": "Décrivez la modification souhaitée.",
+ "modelLabel": "Modèle",
+ "reasoningEffortLabel": "Effort de raisonnement",
+ "sendTitle": "Envoyer (Entrée)",
+ "send": "Envoyer",
+ "rewindConfirmTitle": "Revenir ici ?",
+ "rewindConfirmBody": "Les modifications de l'agent et les échanges suivants après ce point seront annulés. Le projet, la conversation et l'état de l'agent seront restaurés.",
+ "rewindConfirm": "Revenir en arrière",
+ "configureModel": "Configurer le modèle d'IA",
+ "historyDialog": {
+ "title": "Historique des conversations",
+ "subtitle": "Changer ou créer des sessions",
+ "empty": "Aucune conversation pour l'instant.",
+ "msgsCount": "{{count}} messages · {{date}}"
+ }
+ },
+ "newProjectDialog": {
+ "title": "Nouveau projet",
+ "subtitle": "Choisissez un point de départ et donnez-lui un nom",
+ "nameLabel": "Nom du projet",
+ "startingPointLabel": "Point de départ",
+ "create": "Créer le projet",
+ "defaultTitle": "Projet sans titre",
+ "templates": {
+ "blankTitle": "Projet vierge",
+ "blankDesc": "Timeline vide, prête à importer",
+ "screenRecordingTitle": "Enregistrement d'écran",
+ "screenRecordingDesc": "Démarrer la capture système",
+ "importMediaDesc": "Vidéo, audio, images depuis le disque",
+ "fromTemplateTitle": "Depuis un modèle",
+ "fromTemplateDesc": "Storyboard prédéfini"
+ }
+ },
+ "openProjectDialog": {
+ "title": "Ouvrir un projet",
+ "subtitle": "Reprenez un projet existant ou parcourez vos fichiers",
+ "searchPlaceholder": "Rechercher des projets…",
+ "noMatches": "Aucun projet ne correspond à « {{query}} ».",
+ "navigateHint": "pour naviguer ·",
+ "openHint": "pour ouvrir",
+ "browseFiles": "Parcourir les fichiers…"
+ },
+ "editClipDialog": {
+ "title": "Modifier le clip",
+ "adjustStart": "Ajuster le début du clip",
+ "adjustEnd": "Ajuster la fin du clip",
+ "start": "Début",
+ "end": "Fin",
+ "duration": "Durée",
+ "reset": "Réinitialiser",
+ "apply": "Appliquer",
+ "pickClipTitle": "Choisissez un clip à modifier",
+ "clipLabel": "Clip {{index}}"
+ },
+ "insertSourceDialog": {
+ "title": "Insérer la source",
+ "subtitle": "Où placer « {{assetLabel}} » sur la timeline ?",
+ "addBefore": "Ajouter avant",
+ "addBeforeDesc": "Insère toute la source avant le clip cible.",
+ "addAfter": "Ajouter après",
+ "addAfterDesc": "Insère toute la source après le clip cible.",
+ "split": "Diviser ici et insérer",
+ "splitDesc": "Divise le clip cible au point de dépose et insère la source entre les deux."
+ },
+ "cropDialog": {
+ "subtitle": "Faites glisser la zone ou ses poignées pour ajuster la zone de recadrage",
+ "fieldX": "X",
+ "fieldY": "Y",
+ "fieldW": "L",
+ "fieldH": "H"
}
}
diff --git a/src/i18n/locales/fr/launch.json b/src/i18n/locales/fr/launch.json
index 0d6a820b3..76204a319 100644
--- a/src/i18n/locales/fr/launch.json
+++ b/src/i18n/locales/fr/launch.json
@@ -10,6 +10,7 @@
"openProject": "Ouvrir un projet",
"useVerticalTray": "Utiliser la barre verticale",
"useHorizontalTray": "Utiliser la barre horizontale",
+ "openStudio": "Ouvrir le Studio",
"openNotes": "Ouvrir les notes",
"openNotesPlaceholder": "Prenez des notes ici...",
"notesToolbar": {
@@ -27,7 +28,12 @@
"disableSystemAudio": "Désactiver l'audio système",
"enableMicrophone": "Activer le microphone",
"disableMicrophone": "Désactiver le microphone",
- "defaultMicrophone": "Microphone par défaut"
+ "defaultMicrophone": "Microphone par défaut",
+ "systemAudio": "Audio système",
+ "microphone": "Microphone",
+ "on": "Activé",
+ "off": "Désactivé",
+ "inputDevice": "Périphérique d'entrée"
},
"webcam": {
"enableWebcam": "Activer la webcam",
@@ -35,7 +41,9 @@
"defaultCamera": "Caméra par défaut",
"searching": "Recherche en cours...",
"noneFound": "Aucune caméra trouvée",
- "unavailable": "Caméra non disponible"
+ "unavailable": "Caméra non disponible",
+ "camera": "Caméra",
+ "cameraDevice": "Périphérique caméra"
},
"cursor": {
"useEditableCursor": "Utiliser le curseur éditable",
@@ -45,6 +53,9 @@
"loading": "Chargement des sources...",
"screens": "Écrans ({{count}})",
"windows": "Fenêtres ({{count}})",
+ "emptyTitle": "Aucun écran ni fenêtre trouvé",
+ "emptyDescription": "Si vous venez d'accorder l'autorisation d'enregistrement d'écran, rechargez ce sélecteur. Sur macOS, il peut être nécessaire de rouvrir OpenScreen.",
+ "loadFailedDescription": "OpenScreen n'a pas pu charger les sources de capture. Rechargez ce sélecteur et réessayez.",
"defaultSourceName": "Écran"
},
"recording": {
diff --git a/src/i18n/locales/fr/settings.json b/src/i18n/locales/fr/settings.json
index e9af6adc4..eb5e1630d 100644
--- a/src/i18n/locales/fr/settings.json
+++ b/src/i18n/locales/fr/settings.json
@@ -8,7 +8,8 @@
"title": "Mode focus",
"manual": "Manuel",
"auto": "Auto",
- "autoDescription": "La caméra suit la position du curseur enregistré"
+ "autoDescription": "La caméra suit la position du curseur enregistré",
+ "lockedDisclaimer": "Contrôlé par le bouton global de mise au point automatique dans la timeline. Désactivez-le pour régler le mode de mise au point par zoom."
},
"threeD": {
"title": "Rotation 3D",
@@ -211,6 +212,7 @@
"errorLoadFailed": "La police n'a pas pu être chargée. Vérifiez que l'URL Google Fonts est correcte."
},
"cursor": {
+ "title": "Curseur",
"theme": "Style du curseur",
"themeDefault": "Par défaut",
"show": "Afficher le curseur",
@@ -218,7 +220,8 @@
"smoothing": "Lissage",
"motionBlur": "Flou de mouvement",
"clickBounce": "Rebond au clic",
- "clipToBounds": "Rogner au canevas"
+ "clipToBounds": "Rogner au canevas",
+ "clipToBoundsDescription": "Garde le curseur à l'intérieur du cadre vidéo. Désactivez pour laisser le curseur dépasser les bords — utile en cas de zoom ou de panoramique."
},
"language": {
"title": "Langue"
@@ -226,5 +229,9 @@
"timeline": {
"title": "Montage",
"waveform": "Afficher la forme d'onde sur la piste de découpe"
+ },
+ "facets": {
+ "captions": "Sous-titres",
+ "transcript": "Transcription"
}
}
diff --git a/src/i18n/locales/fr/timeline.json b/src/i18n/locales/fr/timeline.json
index 7b0384679..fe30d2c72 100644
--- a/src/i18n/locales/fr/timeline.json
+++ b/src/i18n/locales/fr/timeline.json
@@ -2,6 +2,10 @@
"buttons": {
"addZoom": "Ajouter un zoom (Z)",
"suggestZooms": "Suggérer des zooms depuis le curseur",
+ "autoZoomOn": "Suggestions de zoom automatique activées — cliquez pour retirer les zooms suggérés",
+ "autoZoomOff": "Suggestions de zoom automatique désactivées — cliquez pour suggérer des zooms depuis le curseur",
+ "autoFocusAllOn": "Mise au point automatique activée pour tous les zooms — cliquez pour tout passer en manuel",
+ "autoFocusAllOff": "Activer la mise au point automatique pour tous les zooms (la caméra suit le curseur)",
"addTrim": "Ajouter une coupe (T)",
"addAnnotation": "Ajouter une annotation (A)",
"addSpeed": "Ajouter une vitesse (S)",
@@ -57,5 +61,32 @@
"success": {
"addedZoomSuggestions": "{{count}} suggestion de zoom basée sur le curseur ajoutée",
"addedZoomSuggestionsPlural": "{{count}} suggestions de zoom basées sur le curseur ajoutées"
+ },
+ "toolbar": {
+ "autoEnhance": "Amélioration auto",
+ "automaticZooms": "Zooms automatiques",
+ "automaticZoomsHint": "Basé sur le mouvement du curseur enregistré",
+ "smartZoomsAndCuts": "Zooms et coupes intelligents",
+ "smartZoomsAndCutsHint": "Avec l'IA",
+ "comment": "Commentaire",
+ "aspectRatio": "Format",
+ "timelineTools": "Outils de la timeline",
+ "arrangeClips": "Organiser les clips",
+ "arrangeClipsHint": "Glissez les clips ci-dessous pour les réorganiser ou en déposer de nouveaux",
+ "newAnnotation": "Nouvelle annotation",
+ "noAnnotationsYet": "Aucune annotation pour l'instant",
+ "constantSpeed": "Vitesse constante",
+ "noTrims": "Aucune coupe",
+ "dragToReorderHint": "Glissez pour réorganiser · double-cliquez pour modifier les points d'entrée/sortie",
+ "editInOutPoints": "Modifier les points d'entrée/sortie",
+ "deleteClip": "Supprimer le clip",
+ "dropToAdd": "Déposez pour ajouter à la timeline",
+ "importRecordingFirst": "Importez d'abord un enregistrement",
+ "noAutoZoomMoments": "Aucun moment de zoom automatique trouvé",
+ "noAutoZoomMomentsDescription": "Cet enregistrement n'a pas de données de mouvement du curseur, ou les zooms existants couvrent déjà les moments importants.",
+ "addedAutoZoom": "{{count}} zoom automatique ajouté",
+ "addedAutoZoomPlural": "{{count}} zooms automatiques ajoutés",
+ "autoZoomFailed": "Échec du zoom automatique",
+ "aiEnhanceRequested": "L'agent IA a été sollicité pour améliorer cet enregistrement"
}
}
diff --git a/src/i18n/locales/it/dialogs.json b/src/i18n/locales/it/dialogs.json
index 5593b3085..0fad7d36e 100644
--- a/src/i18n/locales/it/dialogs.json
+++ b/src/i18n/locales/it/dialogs.json
@@ -51,9 +51,29 @@
"detail": "Vuoi salvare il progetto prima di chiudere?",
"saveAndClose": "Salva e chiudi",
"discardAndClose": "Scarta e chiudi",
+ "detailNewProject": "Vuoi salvare il progetto prima di crearne uno nuovo?",
+ "saveAndNewProject": "Salva e nuovo progetto",
+ "discardAndNewProject": "Scarta e nuovo progetto",
+ "detailLoadProject": "Vuoi salvare il progetto prima di caricarne un altro?",
+ "saveAndLoadProject": "Salva e carica progetto",
+ "discardAndLoadProject": "Scarta e carica progetto",
+ "newProject": "Nuovo progetto",
+ "importVideo": "Importa file video…",
"loadProject": "Carica progetto…",
"saveProject": "Salva progetto…",
- "saveProjectAs": "Salva progetto come…"
+ "saveProjectAs": "Salva progetto come…",
+ "modal": {
+ "closeTitle": "Salvare le modifiche prima di chiudere?",
+ "closeBody": "Il tuo progetto ha modifiche non salvate. Salvale ora, scartale o resta nell'editor.",
+ "newTitle": "Salvare le modifiche prima di creare un nuovo progetto?",
+ "openTitle": "Salvare le modifiche prima di aprire un altro progetto?",
+ "recordTitle": "Salvare le modifiche prima di avviare una nuova registrazione?",
+ "sharedBody": "Il progetto attuale ha modifiche non salvate. Salvale prima, scartale o annulla.",
+ "notSavedYet": "Il progetto attuale non è ancora stato salvato su disco.",
+ "discard": "Scarta",
+ "saveAndContinue": "Salva e continua",
+ "saving": "Salvataggio…"
+ }
},
"fileDialogs": {
"saveGif": "Salva GIF esportata",
diff --git a/src/i18n/locales/it/editor.json b/src/i18n/locales/it/editor.json
index 41e6244ea..1fa3e2c76 100644
--- a/src/i18n/locales/it/editor.json
+++ b/src/i18n/locales/it/editor.json
@@ -6,6 +6,7 @@
"confirm": "Conferma"
},
"loadingVideo": "Caricamento video...",
+ "loadingEditor": "Caricamento editor...",
"errors": {
"noVideoLoaded": "Nessun video caricato",
"videoNotReady": "Video non pronto",
@@ -43,6 +44,24 @@
"permissionDenied": "Autorizzazione di registrazione negata. Consenti la registrazione dello schermo.",
"accessibilityAllowAndRetry": "Consenti l'accesso all'accessibilità per OpenScreen, poi premi di nuovo registra per avviare il conto alla rovescia."
},
+ "emptyState": {
+ "title": "Nessun progetto aperto",
+ "description": "Crea un nuovo progetto o aprine uno esistente.",
+ "titleHasAsset": "Aggiungi un video per iniziare",
+ "descriptionHasAsset": "Importa una registrazione per iniziare a modificare.",
+ "newProjectButton": "Nuovo progetto + importa video",
+ "importVideoButton": "Importa video",
+ "loadProjectButton": "Apri progetto",
+ "supportedFormats": "Formati supportati: MP4, MOV, WebM, MKV, AVI, M4V, WMV",
+ "dragDropHint": "oppure trascina qui un file di progetto .openscreen",
+ "dropOverlay": "Rilascia il file di progetto per aprirlo",
+ "dropErrors": {
+ "unsupportedFormatTitle": "Formato non supportato",
+ "unsupportedFormatMessage": "Qui è possibile rilasciare solo file di progetto .openscreen. Per importare un video, usa il pulsante \"Importa file video…\" in questa schermata.",
+ "couldNotOpenTitle": "Impossibile aprire il file",
+ "couldNotOpenMessage": "Il file di progetto non può essere aperto. Il video a cui fa riferimento potrebbe essere stato spostato o eliminato."
+ }
+ },
"autoCaptions": {
"button": "Sottotitoli automatici",
"dialogTitle": "Sottotitoli automatici",
@@ -73,5 +92,263 @@
"annotation": "Annotazione",
"blur": "Sfocatura"
}
+ },
+ "topbar": {
+ "toggleChatPanel": "Attiva/disattiva pannello chat",
+ "openProject": "Apri progetto",
+ "newProject": "Nuovo progetto",
+ "saveProject": "Salva progetto",
+ "unsaved": "Non salvato",
+ "saved": "Salvato",
+ "switchToLightTheme": "Passa al tema chiaro",
+ "switchToDarkTheme": "Passa al tema scuro",
+ "toggleTheme": "Cambia tema",
+ "settings": "Impostazioni",
+ "export": "Esporta",
+ "renameProject": "Rinomina progetto",
+ "noProject": "Nessun progetto",
+ "changeLanguage": "Cambia lingua",
+ "editorMode": "Modalità editor",
+ "modes": {
+ "media": "Media",
+ "edit": "Modifica",
+ "rec": "Registra"
+ }
+ },
+ "rec": {
+ "source": "Sorgente",
+ "systemAudio": "Audio di sistema",
+ "microphone": "Microfono",
+ "camera": "Fotocamera",
+ "cursorHighlight": "Evidenzia cursore",
+ "on": "Attivo",
+ "off": "Disattivo",
+ "loading": "Caricamento…",
+ "noCameraFound": "Nessuna fotocamera trovata",
+ "cameraAccessError": "Impossibile accedere a questa fotocamera",
+ "startingCamera": "Avvio fotocamera…",
+ "turnOnCameraHint": "Attiva la fotocamera per un'anteprima dal vivo",
+ "entireScreen": "Schermo intero",
+ "cancel": "Annulla",
+ "startRecording": "Avvia registrazione",
+ "startRecordingHint": "Apre il widget di registrazione e chiude questa finestra dell'editor.",
+ "sourceModal": {
+ "screens": "Schermi ({{count}})",
+ "windows": "Finestre ({{count}})",
+ "loadingSources": "Caricamento sorgenti…",
+ "noScreensFound": "Nessuno schermo trovato",
+ "noWindowsFound": "Nessuna finestra trovata",
+ "cancel": "Annulla"
+ }
+ },
+ "mediaStage": {
+ "openProjectFirst": "Apri prima un progetto",
+ "couldNotAddAsset": "Impossibile aggiungere il file",
+ "searchPlaceholder": "Cerca media…",
+ "dragHint": "Trascina una clip sulla timeline qui sotto per aggiungerla",
+ "emptyHint": "Nessun media ancora — importa una registrazione per iniziare.",
+ "importMedia": "Importa media",
+ "added": "{{label}} aggiunto",
+ "sourceTranscript": "Trascrizione sorgente",
+ "close": "Chiudi",
+ "transcriptReady": "Trascrizione pronta",
+ "notGeneratedYet": "Non ancora generata",
+ "regenerateAs": "Rigenera in",
+ "auto": "Auto",
+ "regenerate": "Rigenera",
+ "transcriptEmpty": "La trascrizione è vuota.",
+ "notGeneratedHint": "Non ancora generata — scegli una lingua e clicca su rigenera.",
+ "transcribing": "Trascrizione in corso",
+ "transcribingEllipsis": "Trascrizione in corso…",
+ "pendingTranscription": "Trascrizione in attesa",
+ "transcriptionFailed": "Trascrizione non riuscita",
+ "noTranscript": "Nessuna trascrizione",
+ "generating": "Generazione in corso",
+ "generationFailed": "Generazione non riuscita",
+ "generated": "Generato",
+ "generationFailedHint": "Generazione non riuscita — scegli una lingua e rigenera.",
+ "noPreviewAvailable": "Anteprima non disponibile",
+ "restart": "Riavvia",
+ "detectedLanguage": "Lingua rilevata: {{language}}"
+ },
+ "exportDialog": {
+ "title": "Esporta",
+ "subtitle": "Esegui il rendering della timeline in un file",
+ "addVideoBeforeExporting": "Aggiungi un video prima di esportare.",
+ "quality": "Qualità",
+ "qualitySmallerFile": "File più piccolo",
+ "qualityRecommended": "Consigliato",
+ "qualityMatchRecording": "Come la registrazione",
+ "frameRate": "Frame rate",
+ "codec": "Codec",
+ "codecBestCompatibility": "Compatibilità migliore",
+ "codecMaySupportVary": "Potrebbe non essere supportato da tutti gli encoder di sistema",
+ "size": "Dimensione",
+ "loopGif": "Loop GIF",
+ "loopOn": "Loop attivo",
+ "loopOff": "Loop disattivo",
+ "pickFormatAndExport": "Scegli un formato e premi Esporta per iniziare.",
+ "savedTo": "Salvato in",
+ "exportFailedGeneric": "Esportazione non riuscita.",
+ "writingFile": "Scrittura del file…",
+ "renderingFrames": "Rendering dei frame",
+ "framesEta": "{{current}} / {{total}} frame · ETA {{eta}}s",
+ "preparingEncoder": "Preparazione dell'encoder…",
+ "close": "Chiudi",
+ "cancel": "Annulla",
+ "rendering": "Rendering in corso…",
+ "saving": "Salvataggio…",
+ "starting": "Avvio…",
+ "exportGif": "Esporta GIF",
+ "exportMp4": "Esporta MP4",
+ "exportedGif": "GIF esportata",
+ "exportedVideo": "Video esportato",
+ "showInFolder": "Mostra nella cartella",
+ "exportFailed": "Esportazione non riuscita",
+ "failedToWriteFile": "Impossibile scrivere il file"
+ },
+ "inspector": {
+ "resetFocusPoint": "Reimposta punto di messa a fuoco",
+ "setColor": "Imposta colore {{color}}",
+ "trimHiddenDuration": "{{duration}}s di media sorgente nascosti dalla timeline modificata.",
+ "restoreDeleteTrim": "Ripristina (elimina taglio)",
+ "collapseInspector": "Comprimi ispettore",
+ "captionsDescription": "Genera sottotitoli sincronizzati con le parole dalla trascrizione e trascinali sulla timeline.",
+ "generateCaptions": "Genera sottotitoli",
+ "cropDescription": "Reinquadra la registrazione — scegli un rapporto d'aspetto e ingrandisci l'area da mantenere.",
+ "openCrop": "Apri ritaglio…"
+ },
+ "leftPanel": {
+ "mediaTitle": "Contenuti multimediali",
+ "searchPlaceholder": "Cerca…",
+ "clearSearch": "Cancella ricerca",
+ "emptyHint": "Nessun contenuto multimediale in questo progetto. Importa un video qui sotto.",
+ "transcriptReadyBadge": "TRASCRIZIONE PRONTA"
+ },
+ "leftRail": {
+ "chat": "Chat",
+ "media": "Contenuti multimediali",
+ "ariaLabel": "Strumenti a sinistra"
+ },
+ "chat": {
+ "changeProvider": "Cambia provider",
+ "back": "Indietro",
+ "currentModel": "Modello attuale:",
+ "notSelected": "Non selezionato",
+ "loadingModels": "Caricamento modelli…",
+ "searchModels": "Cerca modelli…",
+ "fetchModelsFailed": "Impossibile recuperare i modelli live ({{error}}); apri le impostazioni del provider per digitare manualmente un id modello.",
+ "noModelsAvailable": "Nessun modello disponibile da questo provider.",
+ "noModelsMatch": "Nessun modello corrisponde a questa ricerca.",
+ "noProvidersConnected": "Nessun provider connesso ancora.",
+ "selectModelFailed": "Impossibile selezionare il modello",
+ "providerSettings": "Impostazioni provider…",
+ "applyEditsFailed": "Impossibile applicare le modifiche dell'agente",
+ "chatFailed": "Chat non riuscita",
+ "rewindFailed": "Riavvolgimento non riuscito",
+ "rewoundSuccess": "Riavvolto all'inizio di quel messaggio",
+ "notEnoughHistory": "Cronologia insufficiente per comprimere ancora.",
+ "compactedSuccess": "Contesto precedente compresso",
+ "compactFailed": "Compressione non riuscita",
+ "createSessionFailed": "Impossibile creare la conversazione",
+ "deleteSessionFailed": "Impossibile eliminare la conversazione",
+ "renameSessionFailed": "Impossibile rinominare la conversazione",
+ "reasoningEffortUpdateFailed": "Impossibile aggiornare lo sforzo di ragionamento",
+ "addSkipRangePrompt": "Aggiungi intervallo da saltare\nFormato: startSec-endSec (es. 1.2-3.4)",
+ "addSkipRangeFormatError": "Usa startSec-endSec, es. 1.2-3.4",
+ "addSkipRangeOrderError": "endSec deve essere maggiore di startSec.",
+ "addSkipRangeApplied": "Aggiunto salto {{startSec}}–{{endSec}}s.",
+ "contextTooltip": "{{usedTokens}} / {{budgetTokens}} token stimati",
+ "contextPercent": "{{percent}}% di contesto",
+ "compactContext": "Comprimi contesto",
+ "aiSettings": "Impostazioni IA",
+ "history": "Cronologia",
+ "newConversation": "Nuova conversazione",
+ "untitledConversation": "Conversazione",
+ "clickToRename": "Clicca per rinominare",
+ "renameConversation": "Rinomina conversazione",
+ "deleteConversation": "Elimina conversazione",
+ "confirmDeleteConversation": "Eliminare \"{{title}}\"?",
+ "addSkipRange": "Aggiungi intervallo da saltare",
+ "skipButtonShort": "+ salto",
+ "emptyState": "Nessun messaggio ancora. Chiedi all'agente di tagliare i silenzi, stringere le pause o aggiungere sottotitoli.",
+ "authorUser": "Tu",
+ "authorAssistant": "OpenScreen",
+ "rewindToMessage": "Riavvolgi a questo messaggio",
+ "copyMessage": "Copia messaggio",
+ "copiedToClipboard": "Copiato negli appunti",
+ "copyFailed": "Impossibile copiare",
+ "appliedPrefix": "applicato:",
+ "thinking": "Sto pensando…",
+ "composerPlaceholder": "Descrivi la modifica che desideri.",
+ "modelLabel": "Modello",
+ "reasoningEffortLabel": "Sforzo di ragionamento",
+ "sendTitle": "Invia (Invio)",
+ "send": "Invia",
+ "rewindConfirmTitle": "Riavvolgere qui?",
+ "rewindConfirmBody": "Le modifiche dell'agente e i turni successivi a questo punto verranno annullati. Il progetto, la conversazione e lo stato dell'agente verranno ripristinati.",
+ "rewindConfirm": "Riavvolgi",
+ "configureModel": "Configura modello IA",
+ "historyDialog": {
+ "title": "Cronologia conversazioni",
+ "subtitle": "Cambia o crea sessioni",
+ "empty": "Nessuna conversazione ancora.",
+ "msgsCount": "{{count}} messaggi · {{date}}"
+ }
+ },
+ "newProjectDialog": {
+ "title": "Nuovo progetto",
+ "subtitle": "Scegli un punto di partenza e assegnagli un nome",
+ "nameLabel": "Nome del progetto",
+ "startingPointLabel": "Punto di partenza",
+ "create": "Crea progetto",
+ "defaultTitle": "Progetto senza titolo",
+ "templates": {
+ "blankTitle": "Progetto vuoto",
+ "blankDesc": "Timeline vuota, pronta per l'importazione",
+ "screenRecordingTitle": "Registrazione schermo",
+ "screenRecordingDesc": "Avvia acquisizione di sistema",
+ "importMediaDesc": "Video, audio, immagini dal disco",
+ "fromTemplateTitle": "Da modello",
+ "fromTemplateDesc": "Storyboard predefinito"
+ }
+ },
+ "openProjectDialog": {
+ "title": "Apri progetto",
+ "subtitle": "Riprendi un progetto esistente o sfoglia i tuoi file",
+ "searchPlaceholder": "Cerca progetti…",
+ "noMatches": "Nessun progetto corrisponde a \"{{query}}\".",
+ "navigateHint": "per navigare ·",
+ "openHint": "per aprire",
+ "browseFiles": "Sfoglia file…"
+ },
+ "editClipDialog": {
+ "title": "Modifica clip",
+ "adjustStart": "Regola l'inizio della clip",
+ "adjustEnd": "Regola la fine della clip",
+ "start": "Inizio",
+ "end": "Fine",
+ "duration": "Durata",
+ "reset": "Reimposta",
+ "apply": "Applica",
+ "pickClipTitle": "Scegli una clip da modificare",
+ "clipLabel": "Clip {{index}}"
+ },
+ "insertSourceDialog": {
+ "title": "Inserisci sorgente",
+ "subtitle": "Dove posizionare \"{{assetLabel}}\" sulla timeline?",
+ "addBefore": "Aggiungi prima",
+ "addBeforeDesc": "Inserisce l'intera sorgente prima della clip di destinazione.",
+ "addAfter": "Aggiungi dopo",
+ "addAfterDesc": "Inserisce l'intera sorgente dopo la clip di destinazione.",
+ "split": "Dividi qui e inserisci",
+ "splitDesc": "Divide la clip di destinazione nel punto di rilascio e inserisce la sorgente in mezzo."
+ },
+ "cropDialog": {
+ "subtitle": "Trascina l'area o le sue maniglie per regolare l'area di ritaglio",
+ "fieldX": "X",
+ "fieldY": "Y",
+ "fieldW": "L",
+ "fieldH": "A"
}
}
diff --git a/src/i18n/locales/it/launch.json b/src/i18n/locales/it/launch.json
index 8e7f013bf..e6b190cf1 100644
--- a/src/i18n/locales/it/launch.json
+++ b/src/i18n/locales/it/launch.json
@@ -10,6 +10,7 @@
"openProject": "Apri progetto",
"useVerticalTray": "Usa barra verticale",
"useHorizontalTray": "Usa barra orizzontale",
+ "openStudio": "Apri Studio",
"openNotes": "Apri note",
"openNotesPlaceholder": "Scrivi le tue note qui...",
"notesToolbar": {
@@ -27,7 +28,12 @@
"disableSystemAudio": "Disabilita audio di sistema",
"enableMicrophone": "Abilita microfono",
"disableMicrophone": "Disabilita microfono",
- "defaultMicrophone": "Microfono predefinito"
+ "defaultMicrophone": "Microfono predefinito",
+ "systemAudio": "Audio di sistema",
+ "microphone": "Microfono",
+ "on": "Attivo",
+ "off": "Disattivo",
+ "inputDevice": "Dispositivo di input"
},
"webcam": {
"enableWebcam": "Abilita webcam",
@@ -35,7 +41,9 @@
"defaultCamera": "Fotocamera predefinita",
"searching": "Ricerca in corso...",
"noneFound": "Nessuna fotocamera trovata",
- "unavailable": "Fotocamera non disponibile"
+ "unavailable": "Fotocamera non disponibile",
+ "camera": "Fotocamera",
+ "cameraDevice": "Dispositivo fotocamera"
},
"cursor": {
"useEditableCursor": "Usa cursore modificabile",
@@ -45,6 +53,9 @@
"loading": "Caricamento sorgenti...",
"screens": "Schermi ({{count}})",
"windows": "Finestre ({{count}})",
+ "emptyTitle": "Nessuno schermo o finestra trovati",
+ "emptyDescription": "Se hai appena concesso il permesso di registrazione dello schermo, ricarica questo selettore. Su macOS potrebbe essere necessario riaprire OpenScreen.",
+ "loadFailedDescription": "OpenScreen non è riuscito a caricare le sorgenti di cattura. Ricarica questo selettore e riprova.",
"defaultSourceName": "Schermo"
},
"recording": {
diff --git a/src/i18n/locales/it/settings.json b/src/i18n/locales/it/settings.json
index 40703bcb9..33519a6f6 100644
--- a/src/i18n/locales/it/settings.json
+++ b/src/i18n/locales/it/settings.json
@@ -9,7 +9,8 @@
"title": "Modalità messa a fuoco",
"manual": "Manuale",
"auto": "Automatico",
- "autoDescription": "La fotocamera segue la posizione del cursore registrato"
+ "autoDescription": "La fotocamera segue la posizione del cursore registrato",
+ "lockedDisclaimer": "Controllato dall'interruttore globale di messa a fuoco automatica nella timeline. Disattivalo per impostare la modalità di messa a fuoco per ogni zoom."
},
"threeD": {
"title": "Rotazione 3D",
@@ -104,7 +105,8 @@
},
"project": {
"save": "Salva progetto",
- "load": "Carica progetto"
+ "load": "Carica progetto",
+ "new": "Nuovo progetto"
},
"export": {
"videoButton": "Esporta video",
@@ -210,6 +212,7 @@
"errorLoadFailed": "Impossibile caricare il font. Verifica che l'URL di Google Fonts sia corretto."
},
"cursor": {
+ "title": "Cursore",
"theme": "Stile del cursore",
"themeDefault": "Predefinito",
"show": "Mostra cursore",
@@ -217,7 +220,8 @@
"smoothing": "Smussatura",
"motionBlur": "Sfocatura movimento",
"clickBounce": "Rimbalzo clic",
- "clipToBounds": "Ritaglia al canvas"
+ "clipToBounds": "Ritaglia al canvas",
+ "clipToBoundsDescription": "Mantiene il cursore all'interno del fotogramma video. Disattiva per lasciare che il cursore superi i bordi — utile quando si esegue zoom o panoramica."
},
"language": {
"title": "Lingua"
@@ -225,5 +229,9 @@
"timeline": {
"title": "Timeline",
"waveform": "Mostra la forma d'onda sulla traccia di ritaglio"
+ },
+ "facets": {
+ "captions": "Sottotitoli",
+ "transcript": "Trascrizione"
}
}
diff --git a/src/i18n/locales/it/timeline.json b/src/i18n/locales/it/timeline.json
index ffc076756..f583d5030 100644
--- a/src/i18n/locales/it/timeline.json
+++ b/src/i18n/locales/it/timeline.json
@@ -2,6 +2,10 @@
"buttons": {
"addZoom": "Aggiungi zoom (Z)",
"suggestZooms": "Suggerisci zoom dal cursore",
+ "autoZoomOn": "Suggerimenti di zoom automatico attivi — clicca per rimuovere gli zoom suggeriti",
+ "autoZoomOff": "Suggerimenti di zoom automatico disattivi — clicca per suggerire zoom dal cursore",
+ "autoFocusAllOn": "Messa a fuoco automatica attiva per tutti gli zoom — clicca per passare tutti a manuale",
+ "autoFocusAllOff": "Attiva la messa a fuoco automatica per tutti gli zoom (la fotocamera segue il cursore)",
"addTrim": "Aggiungi taglio (T)",
"addAnnotation": "Aggiungi annotazione (A)",
"addBlur": "Aggiungi sfocatura (B)",
@@ -57,5 +61,32 @@
"success": {
"addedZoomSuggestions": "Aggiunto {{count}} suggerimento zoom basato sul cursore",
"addedZoomSuggestionsPlural": "Aggiunti {{count}} suggerimenti zoom basati sul cursore"
+ },
+ "toolbar": {
+ "autoEnhance": "Miglioramento automatico",
+ "automaticZooms": "Zoom automatici",
+ "automaticZoomsHint": "Dal movimento del cursore registrato",
+ "smartZoomsAndCuts": "Zoom e tagli intelligenti",
+ "smartZoomsAndCutsHint": "Con l'IA",
+ "comment": "Commento",
+ "aspectRatio": "Proporzioni",
+ "timelineTools": "Strumenti della timeline",
+ "arrangeClips": "Organizza clip",
+ "arrangeClipsHint": "Trascina le clip qui sotto per riordinarle o rilasciane di nuove",
+ "newAnnotation": "Nuova annotazione",
+ "noAnnotationsYet": "Nessuna annotazione ancora",
+ "constantSpeed": "Velocità costante",
+ "noTrims": "Nessun taglio",
+ "dragToReorderHint": "Trascina per riordinare · doppio clic per modificare i punti di entrata/uscita",
+ "editInOutPoints": "Modifica punti di entrata/uscita",
+ "deleteClip": "Elimina clip",
+ "dropToAdd": "Rilascia per aggiungere alla timeline",
+ "importRecordingFirst": "Importa prima una registrazione",
+ "noAutoZoomMoments": "Nessun momento per lo zoom automatico trovato",
+ "noAutoZoomMomentsDescription": "Questa registrazione non ha dati sul movimento del cursore, oppure gli zoom esistenti coprono già i momenti principali.",
+ "addedAutoZoom": "Aggiunto {{count}} zoom automatico",
+ "addedAutoZoomPlural": "Aggiunti {{count}} zoom automatici",
+ "autoZoomFailed": "Zoom automatico non riuscito",
+ "aiEnhanceRequested": "È stato chiesto all'agente IA di migliorare questa registrazione"
}
}
diff --git a/src/i18n/locales/ja-JP/dialogs.json b/src/i18n/locales/ja-JP/dialogs.json
index e523ce4d9..7ee976a77 100644
--- a/src/i18n/locales/ja-JP/dialogs.json
+++ b/src/i18n/locales/ja-JP/dialogs.json
@@ -42,7 +42,6 @@
"step1Title": "1. 削除範囲を追加",
"step1DescriptionBefore": "キーボードの",
"step1DescriptionAfter": "、またはハサミのアイコンをクリックして、削除したい範囲を指定します。",
-
"step2Title": "2. 範囲を調整",
"step2Description": "赤い領域の両端をドラッグして、削除したい範囲を正確に調整します。"
},
@@ -58,9 +57,23 @@
"detailLoadProject": "別のプロジェクトを読み込む前にプロジェクトを保存しますか?",
"saveAndLoadProject": "保存してプロジェクトを読み込む",
"discardAndLoadProject": "破棄してプロジェクトを読み込む",
+ "newProject": "新規プロジェクト",
+ "importVideo": "動画ファイルをインポート…",
"loadProject": "プロジェクトを読み込む…",
"saveProject": "プロジェクトを保存…",
- "saveProjectAs": "プロジェクトを名前を付けて保存…"
+ "saveProjectAs": "プロジェクトを名前を付けて保存…",
+ "modal": {
+ "closeTitle": "閉じる前に変更を保存しますか?",
+ "closeBody": "プロジェクトに未保存の変更があります。今すぐ保存するか、破棄するか、エディターにとどまってください。",
+ "newTitle": "新しいプロジェクトを作成する前に変更を保存しますか?",
+ "openTitle": "別のプロジェクトを開く前に変更を保存しますか?",
+ "recordTitle": "新しい録画を開始する前に変更を保存しますか?",
+ "sharedBody": "現在のプロジェクトに未保存の変更があります。先に保存するか、破棄するか、キャンセルしてください。",
+ "notSavedYet": "現在のプロジェクトはまだディスクに保存されていません。",
+ "discard": "破棄",
+ "saveAndContinue": "保存して続行",
+ "saving": "保存中…"
+ }
},
"fileDialogs": {
"saveGif": "エクスポートしたGIFを保存",
diff --git a/src/i18n/locales/ja-JP/editor.json b/src/i18n/locales/ja-JP/editor.json
index 9713c1a62..c8a3c3be8 100644
--- a/src/i18n/locales/ja-JP/editor.json
+++ b/src/i18n/locales/ja-JP/editor.json
@@ -65,9 +65,12 @@
},
"emptyState": {
"title": "プロジェクトが開かれていません",
- "description": "動画をインポートして編集を開始するか、既存の OpenScreen プロジェクトを読み込んでください。",
- "importVideoButton": "動画ファイルをインポート…",
- "loadProjectButton": "プロジェクトを読み込む…",
+ "description": "新しいプロジェクトを作成するか、既存のプロジェクトを開いてください。",
+ "titleHasAsset": "動画を追加して開始",
+ "descriptionHasAsset": "録画をインポートして編集を開始します。",
+ "newProjectButton": "新規プロジェクト+動画をインポート",
+ "importVideoButton": "動画をインポート",
+ "loadProjectButton": "プロジェクトを開く",
"supportedFormats": "対応フォーマット:MP4、MOV、WebM、MKV、AVI、M4V、WMV",
"dragDropHint": ".openscreen プロジェクトファイルをここにドラッグ&ドロップ",
"dropOverlay": "プロジェクトファイルをドロップして開く",
@@ -89,5 +92,263 @@
"annotation": "注釈",
"blur": "ぼかし"
}
+ },
+ "topbar": {
+ "toggleChatPanel": "チャットパネルの表示切り替え",
+ "openProject": "プロジェクトを開く",
+ "newProject": "新規プロジェクト",
+ "saveProject": "プロジェクトを保存",
+ "unsaved": "未保存",
+ "saved": "保存済み",
+ "switchToLightTheme": "ライトテーマに切り替え",
+ "switchToDarkTheme": "ダークテーマに切り替え",
+ "toggleTheme": "テーマを切り替え",
+ "settings": "設定",
+ "export": "エクスポート",
+ "renameProject": "プロジェクト名を変更",
+ "noProject": "プロジェクトなし",
+ "changeLanguage": "言語を変更",
+ "editorMode": "エディターモード",
+ "modes": {
+ "media": "メディア",
+ "edit": "編集",
+ "rec": "録画"
+ }
+ },
+ "rec": {
+ "source": "ソース",
+ "systemAudio": "システム音声",
+ "microphone": "マイク",
+ "camera": "カメラ",
+ "cursorHighlight": "カーソルの強調表示",
+ "on": "オン",
+ "off": "オフ",
+ "loading": "読み込み中…",
+ "noCameraFound": "カメラが見つかりません",
+ "cameraAccessError": "このカメラにアクセスできませんでした",
+ "startingCamera": "カメラを起動中…",
+ "turnOnCameraHint": "カメラをオンにするとライブプレビューが表示されます",
+ "entireScreen": "画面全体",
+ "cancel": "キャンセル",
+ "startRecording": "録画を開始",
+ "startRecordingHint": "録画ウィジェットを開き、このエディターウィンドウを閉じます。",
+ "sourceModal": {
+ "screens": "画面 ({{count}})",
+ "windows": "ウィンドウ ({{count}})",
+ "loadingSources": "ソースを読み込み中…",
+ "noScreensFound": "画面が見つかりません",
+ "noWindowsFound": "ウィンドウが見つかりません",
+ "cancel": "キャンセル"
+ }
+ },
+ "mediaStage": {
+ "openProjectFirst": "先にプロジェクトを開いてください",
+ "couldNotAddAsset": "アセットを追加できませんでした",
+ "searchPlaceholder": "メディアを検索…",
+ "dragHint": "クリップを下のタイムラインにドラッグして追加します",
+ "emptyHint": "まだメディアがありません — 録画をインポートして開始してください。",
+ "importMedia": "メディアをインポート",
+ "added": "{{label}} を追加しました",
+ "sourceTranscript": "ソースの文字起こし",
+ "close": "閉じる",
+ "transcriptReady": "文字起こし完了",
+ "notGeneratedYet": "まだ生成されていません",
+ "regenerateAs": "この言語で再生成",
+ "auto": "自動",
+ "regenerate": "再生成",
+ "transcriptEmpty": "文字起こしは空です。",
+ "notGeneratedHint": "まだ生成されていません — 言語を選んで再生成をクリックしてください。",
+ "transcribing": "文字起こし中",
+ "transcribingEllipsis": "文字起こし中…",
+ "pendingTranscription": "文字起こし待機中",
+ "transcriptionFailed": "文字起こしに失敗しました",
+ "noTranscript": "文字起こしなし",
+ "generating": "生成中",
+ "generationFailed": "生成に失敗しました",
+ "generated": "生成済み",
+ "generationFailedHint": "生成に失敗しました — 言語を選んで再生成してください。",
+ "noPreviewAvailable": "プレビューがありません",
+ "restart": "再生位置を先頭に戻す",
+ "detectedLanguage": "検出された言語: {{language}}"
+ },
+ "exportDialog": {
+ "title": "エクスポート",
+ "subtitle": "タイムラインをファイルに書き出します",
+ "addVideoBeforeExporting": "エクスポートする前に動画を追加してください。",
+ "quality": "画質",
+ "qualitySmallerFile": "ファイルサイズを小さく",
+ "qualityRecommended": "推奨",
+ "qualityMatchRecording": "録画と同じ",
+ "frameRate": "フレームレート",
+ "codec": "コーデック",
+ "codecBestCompatibility": "互換性が最も高い",
+ "codecMaySupportVary": "システムのエンコーダーによってはサポートされない場合があります",
+ "size": "サイズ",
+ "loopGif": "GIFをループ",
+ "loopOn": "ループ オン",
+ "loopOff": "ループ オフ",
+ "pickFormatAndExport": "形式を選択し、エクスポートを押して開始してください。",
+ "savedTo": "保存先",
+ "exportFailedGeneric": "エクスポートに失敗しました。",
+ "writingFile": "ファイルを書き込み中…",
+ "renderingFrames": "フレームをレンダリング中",
+ "framesEta": "{{current}} / {{total}} フレーム · 残り時間 {{eta}}秒",
+ "preparingEncoder": "エンコーダーを準備中…",
+ "close": "閉じる",
+ "cancel": "キャンセル",
+ "rendering": "レンダリング中…",
+ "saving": "保存中…",
+ "starting": "開始中…",
+ "exportGif": "GIFをエクスポート",
+ "exportMp4": "MP4をエクスポート",
+ "exportedGif": "GIFをエクスポートしました",
+ "exportedVideo": "動画をエクスポートしました",
+ "showInFolder": "フォルダーで表示",
+ "exportFailed": "エクスポートに失敗しました",
+ "failedToWriteFile": "ファイルの書き込みに失敗しました"
+ },
+ "inspector": {
+ "resetFocusPoint": "フォーカスポイントをリセット",
+ "setColor": "色を設定 {{color}}",
+ "trimHiddenDuration": "編集済みタイムラインから{{duration}}秒のソースメディアが非表示になっています。",
+ "restoreDeleteTrim": "復元(トリムを削除)",
+ "collapseInspector": "インスペクターを折りたたむ",
+ "captionsDescription": "文字起こしから単語ごとにタイミングを合わせたキャプションを生成し、タイムラインに配置します。",
+ "generateCaptions": "キャプションを生成",
+ "cropDescription": "録画をリフレーム — アスペクト比を選び、保持したい範囲にズームします。",
+ "openCrop": "切り抜きを開く…"
+ },
+ "leftPanel": {
+ "mediaTitle": "メディア",
+ "searchPlaceholder": "検索…",
+ "clearSearch": "検索をクリア",
+ "emptyHint": "このプロジェクトにはまだメディアがありません。下から動画をインポートしてください。",
+ "transcriptReadyBadge": "文字起こし準備完了"
+ },
+ "leftRail": {
+ "chat": "チャット",
+ "media": "メディア",
+ "ariaLabel": "左側のツール"
+ },
+ "chat": {
+ "changeProvider": "プロバイダーを変更",
+ "back": "戻る",
+ "currentModel": "現在のモデル:",
+ "notSelected": "未選択",
+ "loadingModels": "モデルを読み込み中…",
+ "searchModels": "モデルを検索…",
+ "fetchModelsFailed": "ライブモデルを取得できませんでした({{error}})。プロバイダー設定を開いてモデルIDを手動で入力してください。",
+ "noModelsAvailable": "このプロバイダーから利用できるモデルがありません。",
+ "noModelsMatch": "この検索に一致するモデルがありません。",
+ "noProvidersConnected": "接続済みのプロバイダーはまだありません。",
+ "selectModelFailed": "モデルを選択できませんでした",
+ "providerSettings": "プロバイダー設定…",
+ "applyEditsFailed": "エージェントの編集を適用できませんでした",
+ "chatFailed": "チャットに失敗しました",
+ "rewindFailed": "巻き戻しに失敗しました",
+ "rewoundSuccess": "そのメッセージの先頭まで巻き戻しました",
+ "notEnoughHistory": "圧縮するには履歴が足りません。",
+ "compactedSuccess": "以前のコンテキストを圧縮しました",
+ "compactFailed": "圧縮に失敗しました",
+ "createSessionFailed": "会話を作成できませんでした",
+ "deleteSessionFailed": "会話を削除できませんでした",
+ "renameSessionFailed": "会話の名前を変更できませんでした",
+ "reasoningEffortUpdateFailed": "推論の労力を更新できませんでした",
+ "addSkipRangePrompt": "スキップ範囲を追加\n形式:startSec-endSec(例:1.2-3.4)",
+ "addSkipRangeFormatError": "startSec-endSec の形式を使用してください(例:1.2-3.4)",
+ "addSkipRangeOrderError": "endSec は startSec より大きくする必要があります。",
+ "addSkipRangeApplied": "{{startSec}}–{{endSec}}秒のスキップを追加しました。",
+ "contextTooltip": "推定トークン数 {{usedTokens}} / {{budgetTokens}}",
+ "contextPercent": "コンテキスト {{percent}}%",
+ "compactContext": "コンテキストを圧縮",
+ "aiSettings": "AI設定",
+ "history": "履歴",
+ "newConversation": "新しい会話",
+ "untitledConversation": "会話",
+ "clickToRename": "クリックして名前を変更",
+ "renameConversation": "会話の名前を変更",
+ "deleteConversation": "会話を削除",
+ "confirmDeleteConversation": "「{{title}}」を削除しますか?",
+ "addSkipRange": "スキップ範囲を追加",
+ "skipButtonShort": "+ スキップ",
+ "emptyState": "まだメッセージはありません。エージェントに無音のカット、間の調整、字幕の追加を依頼してみましょう。",
+ "authorUser": "あなた",
+ "authorAssistant": "OpenScreen",
+ "rewindToMessage": "このメッセージまで巻き戻す",
+ "copyMessage": "メッセージをコピー",
+ "copiedToClipboard": "クリップボードにコピーしました",
+ "copyFailed": "コピーできませんでした",
+ "appliedPrefix": "適用済み:",
+ "thinking": "考え中…",
+ "composerPlaceholder": "希望する編集内容を記述してください。",
+ "modelLabel": "モデル",
+ "reasoningEffortLabel": "推論の労力",
+ "sendTitle": "送信(Enter)",
+ "send": "送信",
+ "rewindConfirmTitle": "ここまで巻き戻しますか?",
+ "rewindConfirmBody": "この時点以降のエージェントの編集とやり取りは元に戻されます。プロジェクト、会話、エージェントの状態が復元されます。",
+ "rewindConfirm": "巻き戻す",
+ "configureModel": "AIモデルを設定",
+ "historyDialog": {
+ "title": "会話履歴",
+ "subtitle": "セッションを切り替えるか新規作成",
+ "empty": "まだ会話はありません。",
+ "msgsCount": "{{count}} 件のメッセージ · {{date}}"
+ }
+ },
+ "newProjectDialog": {
+ "title": "新規プロジェクト",
+ "subtitle": "開始地点を選んで名前を付けてください",
+ "nameLabel": "プロジェクト名",
+ "startingPointLabel": "開始地点",
+ "create": "プロジェクトを作成",
+ "defaultTitle": "無題のプロジェクト",
+ "templates": {
+ "blankTitle": "空のプロジェクト",
+ "blankDesc": "空のタイムライン、インポート準備完了",
+ "screenRecordingTitle": "画面録画",
+ "screenRecordingDesc": "システムキャプチャを開始",
+ "importMediaDesc": "ディスクから動画・音声・画像",
+ "fromTemplateTitle": "テンプレートから",
+ "fromTemplateDesc": "定義済みのストーリーボード"
+ }
+ },
+ "openProjectDialog": {
+ "title": "プロジェクトを開く",
+ "subtitle": "既存のプロジェクトを開くか、ファイルを参照してください",
+ "searchPlaceholder": "プロジェクトを検索…",
+ "noMatches": "「{{query}}」に一致するプロジェクトがありません。",
+ "navigateHint": "で移動 ·",
+ "openHint": "で開く",
+ "browseFiles": "ファイルを参照…"
+ },
+ "editClipDialog": {
+ "title": "クリップを編集",
+ "adjustStart": "クリップの開始位置を調整",
+ "adjustEnd": "クリップの終了位置を調整",
+ "start": "開始",
+ "end": "終了",
+ "duration": "長さ",
+ "reset": "リセット",
+ "apply": "適用",
+ "pickClipTitle": "編集するクリップを選択",
+ "clipLabel": "クリップ {{index}}"
+ },
+ "insertSourceDialog": {
+ "title": "ソースを挿入",
+ "subtitle": "「{{assetLabel}}」をタイムラインのどこに配置しますか?",
+ "addBefore": "前に追加",
+ "addBeforeDesc": "対象クリップの前にソース全体を挿入します。",
+ "addAfter": "後に追加",
+ "addAfterDesc": "対象クリップの後にソース全体を挿入します。",
+ "split": "ここで分割して挿入",
+ "splitDesc": "ドロップ位置で対象クリップを分割し、その間にソースを挿入します。"
+ },
+ "cropDialog": {
+ "subtitle": "領域またはハンドルをドラッグして切り抜き範囲を調整します",
+ "fieldX": "X",
+ "fieldY": "Y",
+ "fieldW": "幅",
+ "fieldH": "高さ"
}
}
diff --git a/src/i18n/locales/ja-JP/launch.json b/src/i18n/locales/ja-JP/launch.json
index 676cd272c..313af1e66 100644
--- a/src/i18n/locales/ja-JP/launch.json
+++ b/src/i18n/locales/ja-JP/launch.json
@@ -10,6 +10,7 @@
"openProject": "プロジェクトを開く",
"useVerticalTray": "縦型トレイを使用",
"useHorizontalTray": "横型トレイを使用",
+ "openStudio": "スタジオを開く",
"openNotes": "ノートを開く",
"openNotesPlaceholder": "ここにメモを入力...",
"notesToolbar": {
@@ -27,7 +28,12 @@
"disableSystemAudio": "システム音声を無効にする",
"enableMicrophone": "マイクを有効にする",
"disableMicrophone": "マイクを無効にする",
- "defaultMicrophone": "デフォルトのマイク"
+ "defaultMicrophone": "デフォルトのマイク",
+ "systemAudio": "システム音声",
+ "microphone": "マイク",
+ "on": "オン",
+ "off": "オフ",
+ "inputDevice": "入力デバイス"
},
"webcam": {
"enableWebcam": "ウェブカメラを有効にする",
@@ -35,7 +41,9 @@
"defaultCamera": "デフォルトのカメラ",
"searching": "検索中...",
"noneFound": "カメラが見つかりません",
- "unavailable": "カメラが利用できません"
+ "unavailable": "カメラが利用できません",
+ "camera": "カメラ",
+ "cameraDevice": "カメラデバイス"
},
"cursor": {
"useEditableCursor": "編集可能なカーソルを使う",
@@ -45,6 +53,9 @@
"loading": "ソースを読み込み中...",
"screens": "画面 ({{count}})",
"windows": "ウィンドウ ({{count}})",
+ "emptyTitle": "画面またはウィンドウが見つかりません",
+ "emptyDescription": "画面収録の権限を許可したばかりの場合は、このピッカーを再読み込みしてください。macOSではOpenScreenの再起動が必要な場合があります。",
+ "loadFailedDescription": "OpenScreenはキャプチャソースを読み込めませんでした。このピッカーを再読み込みしてもう一度お試しください。",
"defaultSourceName": "画面"
},
"recording": {
diff --git a/src/i18n/locales/ja-JP/settings.json b/src/i18n/locales/ja-JP/settings.json
index 790d409e1..6782950bc 100644
--- a/src/i18n/locales/ja-JP/settings.json
+++ b/src/i18n/locales/ja-JP/settings.json
@@ -8,7 +8,8 @@
"title": "フォーカスモード",
"manual": "手動",
"auto": "自動",
- "autoDescription": "表示範囲が録画中のカーソル位置に追従します"
+ "autoDescription": "表示範囲が録画中のカーソル位置に追従します",
+ "lockedDisclaimer": "タイムラインの全体オートフォーカス切り替えによって制御されます。オフにすると、ズームごとにフォーカスモードを設定できます。"
},
"threeD": {
"title": "3D回転",
@@ -211,6 +212,7 @@
"errorLoadFailed": "フォントを読み込めませんでした。GoogleフォントのURLが正しいことを確認してください。"
},
"cursor": {
+ "title": "カーソル",
"theme": "カーソルのスタイル",
"themeDefault": "デフォルト",
"show": "カーソルを表示",
@@ -218,7 +220,8 @@
"smoothing": "スムージング",
"motionBlur": "モーションブラー",
"clickBounce": "クリックバウンス",
- "clipToBounds": "キャンバスにクリップ"
+ "clipToBounds": "キャンバスにクリップ",
+ "clipToBoundsDescription": "カーソルを映像フレーム内に保ちます。オフにするとカーソルが端からはみ出せるようになります。ズームやパン時に便利です。"
},
"language": {
"title": "言語"
@@ -226,5 +229,9 @@
"timeline": {
"title": "タイムライン",
"waveform": "トリムトラックにオーディオ波形を表示"
+ },
+ "facets": {
+ "captions": "字幕",
+ "transcript": "文字起こし"
}
}
diff --git a/src/i18n/locales/ja-JP/timeline.json b/src/i18n/locales/ja-JP/timeline.json
index 44ea109f7..d750c64c4 100644
--- a/src/i18n/locales/ja-JP/timeline.json
+++ b/src/i18n/locales/ja-JP/timeline.json
@@ -2,6 +2,10 @@
"buttons": {
"addZoom": "ズームを追加 (Z)",
"suggestZooms": "カーソル位置からズームを提案",
+ "autoZoomOn": "自動ズーム提案がオン — クリックすると提案されたズームを削除します",
+ "autoZoomOff": "自動ズーム提案がオフ — クリックするとカーソル位置からズームを提案します",
+ "autoFocusAllOn": "すべてのズームでオートフォーカスがオン — クリックするとすべて手動に切り替わります",
+ "autoFocusAllOff": "すべてのズームでオートフォーカスをオンにする(カメラがカーソルに追従)",
"addTrim": "トリムを追加 (T)",
"addAnnotation": "注釈を追加 (A)",
"addBlur": "ぼかしを追加 (B)",
@@ -57,5 +61,32 @@
"success": {
"addedZoomSuggestions": "カーソルに基づくズーム提案を {{count}} 件追加しました",
"addedZoomSuggestionsPlural": "カーソルに基づくズーム提案を {{count}} 件追加しました"
+ },
+ "toolbar": {
+ "autoEnhance": "自動強化",
+ "automaticZooms": "自動ズーム",
+ "automaticZoomsHint": "記録されたカーソルの動きから",
+ "smartZoomsAndCuts": "スマートズーム+カット",
+ "smartZoomsAndCutsHint": "AIを使用",
+ "comment": "コメント",
+ "aspectRatio": "アスペクト比",
+ "timelineTools": "タイムラインツール",
+ "arrangeClips": "クリップを配置",
+ "arrangeClipsHint": "下のクリップをドラッグして並べ替えるか、新しいクリップをドロップします",
+ "newAnnotation": "新しい注釈",
+ "noAnnotationsYet": "まだ注釈がありません",
+ "constantSpeed": "一定速度",
+ "noTrims": "トリムなし",
+ "dragToReorderHint": "ドラッグして並べ替え・ダブルクリックでイン/アウトポイントを編集",
+ "editInOutPoints": "イン/アウトポイントを編集",
+ "deleteClip": "クリップを削除",
+ "dropToAdd": "ドロップしてタイムラインに追加",
+ "importRecordingFirst": "先に録画をインポートしてください",
+ "noAutoZoomMoments": "自動ズームの瞬間が見つかりません",
+ "noAutoZoomMomentsDescription": "この録画にはカーソルの動きのデータがないか、既存のズームがすでに重要な瞬間をカバーしています。",
+ "addedAutoZoom": "自動ズームを {{count}} 件追加しました",
+ "addedAutoZoomPlural": "自動ズームを {{count}} 件追加しました",
+ "autoZoomFailed": "自動ズームに失敗しました",
+ "aiEnhanceRequested": "AIエージェントにこの録画の強化を依頼しました"
}
}
diff --git a/src/i18n/locales/ko-KR/dialogs.json b/src/i18n/locales/ko-KR/dialogs.json
index 6bff11dc9..5891f44c1 100644
--- a/src/i18n/locales/ko-KR/dialogs.json
+++ b/src/i18n/locales/ko-KR/dialogs.json
@@ -57,9 +57,23 @@
"detailLoadProject": "다른 프로젝트를 불러오기 전에 저장하시겠습니까?",
"saveAndLoadProject": "저장 후 프로젝트 불러오기",
"discardAndLoadProject": "저장하지 않고 프로젝트 불러오기",
+ "newProject": "새 프로젝트",
+ "importVideo": "동영상 파일 가져오기…",
"loadProject": "프로젝트 불러오기...",
"saveProject": "프로젝트 저장...",
- "saveProjectAs": "다른 이름으로 프로젝트 저장..."
+ "saveProjectAs": "다른 이름으로 프로젝트 저장...",
+ "modal": {
+ "closeTitle": "닫기 전에 변경 사항을 저장할까요?",
+ "closeBody": "프로젝트에 저장되지 않은 변경 사항이 있습니다. 지금 저장하거나, 취소하거나, 편집기에 머무르세요.",
+ "newTitle": "새 프로젝트를 만들기 전에 변경 사항을 저장할까요?",
+ "openTitle": "다른 프로젝트를 열기 전에 변경 사항을 저장할까요?",
+ "recordTitle": "새 녹화를 시작하기 전에 변경 사항을 저장할까요?",
+ "sharedBody": "현재 프로젝트에 저장되지 않은 변경 사항이 있습니다. 먼저 저장하거나, 취소하거나, 중단하세요.",
+ "notSavedYet": "현재 프로젝트가 아직 디스크에 저장되지 않았습니다.",
+ "discard": "취소",
+ "saveAndContinue": "저장 후 계속",
+ "saving": "저장 중…"
+ }
},
"fileDialogs": {
"saveGif": "내보낸 GIF 저장",
diff --git a/src/i18n/locales/ko-KR/editor.json b/src/i18n/locales/ko-KR/editor.json
index f3e995895..0e6b64c25 100644
--- a/src/i18n/locales/ko-KR/editor.json
+++ b/src/i18n/locales/ko-KR/editor.json
@@ -65,9 +65,12 @@
},
"emptyState": {
"title": "열린 프로젝트 없음",
- "description": "동영상을 가져와 편집을 시작하거나 기존 OpenScreen 프로젝트를 불러오세요.",
- "importVideoButton": "동영상 파일 가져오기…",
- "loadProjectButton": "프로젝트 불러오기…",
+ "description": "새 프로젝트를 만들거나 기존 프로젝트를 여세요.",
+ "titleHasAsset": "시작하려면 동영상을 추가하세요",
+ "descriptionHasAsset": "녹화 파일을 가져와서 편집을 시작하세요.",
+ "newProjectButton": "새 프로젝트 + 동영상 가져오기",
+ "importVideoButton": "동영상 가져오기",
+ "loadProjectButton": "프로젝트 열기",
"supportedFormats": "지원 형식: MP4, MOV, WebM, MKV, AVI, M4V, WMV",
"dragDropHint": ".openscreen 프로젝트 파일을 여기에 드래그 앤 드롭",
"dropOverlay": "프로젝트 파일을 드롭하여 열기",
@@ -89,5 +92,263 @@
"annotation": "주석",
"blur": "블러"
}
+ },
+ "topbar": {
+ "toggleChatPanel": "채팅 패널 전환",
+ "openProject": "프로젝트 열기",
+ "newProject": "새 프로젝트",
+ "saveProject": "프로젝트 저장",
+ "unsaved": "저장 안 됨",
+ "saved": "저장됨",
+ "switchToLightTheme": "라이트 테마로 전환",
+ "switchToDarkTheme": "다크 테마로 전환",
+ "toggleTheme": "테마 전환",
+ "settings": "설정",
+ "export": "내보내기",
+ "renameProject": "프로젝트 이름 변경",
+ "noProject": "프로젝트 없음",
+ "changeLanguage": "언어 변경",
+ "editorMode": "편집기 모드",
+ "modes": {
+ "media": "미디어",
+ "edit": "편집",
+ "rec": "녹화"
+ }
+ },
+ "rec": {
+ "source": "소스",
+ "systemAudio": "시스템 오디오",
+ "microphone": "마이크",
+ "camera": "카메라",
+ "cursorHighlight": "커서 강조",
+ "on": "켜짐",
+ "off": "꺼짐",
+ "loading": "로딩 중…",
+ "noCameraFound": "카메라를 찾을 수 없음",
+ "cameraAccessError": "이 카메라에 액세스할 수 없습니다",
+ "startingCamera": "카메라 시작 중…",
+ "turnOnCameraHint": "카메라를 켜면 실시간 미리보기가 표시됩니다",
+ "entireScreen": "전체 화면",
+ "cancel": "취소",
+ "startRecording": "녹화 시작",
+ "startRecordingHint": "녹화 위젯을 열고 이 편집기 창을 닫습니다.",
+ "sourceModal": {
+ "screens": "화면 ({{count}}개)",
+ "windows": "창 ({{count}}개)",
+ "loadingSources": "소스 불러오는 중…",
+ "noScreensFound": "화면을 찾을 수 없음",
+ "noWindowsFound": "창을 찾을 수 없음",
+ "cancel": "취소"
+ }
+ },
+ "mediaStage": {
+ "openProjectFirst": "먼저 프로젝트를 여세요",
+ "couldNotAddAsset": "자산을 추가할 수 없습니다",
+ "searchPlaceholder": "미디어 검색…",
+ "dragHint": "클립을 아래 타임라인으로 드래그하여 추가하세요",
+ "emptyHint": "아직 미디어가 없습니다 — 녹화 파일을 가져와서 시작하세요.",
+ "importMedia": "미디어 가져오기",
+ "added": "{{label}} 추가됨",
+ "sourceTranscript": "소스 대본",
+ "close": "닫기",
+ "transcriptReady": "대본 준비 완료",
+ "notGeneratedYet": "아직 생성되지 않음",
+ "regenerateAs": "다음 언어로 재생성",
+ "auto": "자동",
+ "regenerate": "재생성",
+ "transcriptEmpty": "대본이 비어 있습니다.",
+ "notGeneratedHint": "아직 생성되지 않음 — 언어를 선택하고 재생성을 클릭하세요.",
+ "transcribing": "받아쓰는 중",
+ "transcribingEllipsis": "받아쓰는 중…",
+ "pendingTranscription": "받아쓰기 대기 중",
+ "transcriptionFailed": "받아쓰기 실패",
+ "noTranscript": "대본 없음",
+ "generating": "생성 중",
+ "generationFailed": "생성 실패",
+ "generated": "생성됨",
+ "generationFailedHint": "생성 실패 — 언어를 선택하고 다시 생성하세요.",
+ "noPreviewAvailable": "미리보기를 사용할 수 없습니다",
+ "restart": "다시 시작",
+ "detectedLanguage": "감지된 언어: {{language}}"
+ },
+ "exportDialog": {
+ "title": "내보내기",
+ "subtitle": "타임라인을 파일로 렌더링합니다",
+ "addVideoBeforeExporting": "내보내기 전에 동영상을 추가하세요.",
+ "quality": "화질",
+ "qualitySmallerFile": "파일 크기 작게",
+ "qualityRecommended": "권장",
+ "qualityMatchRecording": "녹화와 동일",
+ "frameRate": "프레임 속도",
+ "codec": "코덱",
+ "codecBestCompatibility": "호환성이 가장 좋음",
+ "codecMaySupportVary": "시스템 인코더에 따라 지원되지 않을 수 있습니다",
+ "size": "크기",
+ "loopGif": "GIF 반복",
+ "loopOn": "반복 켜짐",
+ "loopOff": "반복 꺼짐",
+ "pickFormatAndExport": "형식을 선택하고 내보내기를 눌러 시작하세요.",
+ "savedTo": "저장 위치",
+ "exportFailedGeneric": "내보내기에 실패했습니다.",
+ "writingFile": "파일 쓰는 중…",
+ "renderingFrames": "프레임 렌더링 중",
+ "framesEta": "{{current}} / {{total}} 프레임 · 예상 남은 시간 {{eta}}초",
+ "preparingEncoder": "인코더 준비 중…",
+ "close": "닫기",
+ "cancel": "취소",
+ "rendering": "렌더링 중…",
+ "saving": "저장 중…",
+ "starting": "시작 중…",
+ "exportGif": "GIF 내보내기",
+ "exportMp4": "MP4 내보내기",
+ "exportedGif": "GIF 내보내기 완료",
+ "exportedVideo": "동영상 내보내기 완료",
+ "showInFolder": "폴더에서 보기",
+ "exportFailed": "내보내기 실패",
+ "failedToWriteFile": "파일 쓰기에 실패했습니다"
+ },
+ "inspector": {
+ "resetFocusPoint": "포커스 지점 재설정",
+ "setColor": "색상 설정 {{color}}",
+ "trimHiddenDuration": "편집된 타임라인에서 {{duration}}초의 원본 미디어가 숨겨졌습니다.",
+ "restoreDeleteTrim": "복원(트림 삭제)",
+ "collapseInspector": "인스펙터 접기",
+ "captionsDescription": "대본에서 단어 단위 타이밍의 자막을 생성하여 타임라인에 배치합니다.",
+ "generateCaptions": "자막 생성",
+ "cropDescription": "녹화 화면을 다시 프레이밍 — 화면 비율을 선택하고 유지할 영역으로 확대합니다.",
+ "openCrop": "자르기 열기…"
+ },
+ "leftPanel": {
+ "mediaTitle": "미디어",
+ "searchPlaceholder": "검색…",
+ "clearSearch": "검색 지우기",
+ "emptyHint": "이 프로젝트에는 아직 미디어가 없습니다. 아래에서 동영상을 가져오세요.",
+ "transcriptReadyBadge": "대본 준비 완료"
+ },
+ "leftRail": {
+ "chat": "채팅",
+ "media": "미디어",
+ "ariaLabel": "왼쪽 도구"
+ },
+ "chat": {
+ "changeProvider": "제공업체 변경",
+ "back": "뒤로",
+ "currentModel": "현재 모델:",
+ "notSelected": "선택 안 됨",
+ "loadingModels": "모델 불러오는 중…",
+ "searchModels": "모델 검색…",
+ "fetchModelsFailed": "실시간 모델을 가져올 수 없습니다 ({{error}}). 제공업체 설정을 열어 모델 ID를 직접 입력하세요.",
+ "noModelsAvailable": "이 제공업체에서 사용 가능한 모델이 없습니다.",
+ "noModelsMatch": "이 검색과 일치하는 모델이 없습니다.",
+ "noProvidersConnected": "연결된 제공업체가 아직 없습니다.",
+ "selectModelFailed": "모델을 선택할 수 없습니다",
+ "providerSettings": "제공업체 설정…",
+ "applyEditsFailed": "에이전트의 편집을 적용할 수 없습니다",
+ "chatFailed": "채팅 실패",
+ "rewindFailed": "되감기 실패",
+ "rewoundSuccess": "해당 메시지 시작 지점으로 되감았습니다",
+ "notEnoughHistory": "아직 압축할 만큼 기록이 충분하지 않습니다.",
+ "compactedSuccess": "이전 컨텍스트를 압축했습니다",
+ "compactFailed": "압축 실패",
+ "createSessionFailed": "대화를 생성할 수 없습니다",
+ "deleteSessionFailed": "대화를 삭제할 수 없습니다",
+ "renameSessionFailed": "대화 이름을 변경할 수 없습니다",
+ "reasoningEffortUpdateFailed": "추론 노력 수준을 업데이트할 수 없습니다",
+ "addSkipRangePrompt": "건너뛸 구간 추가\n형식: startSec-endSec (예: 1.2-3.4)",
+ "addSkipRangeFormatError": "startSec-endSec 형식을 사용하세요 (예: 1.2-3.4)",
+ "addSkipRangeOrderError": "endSec은 startSec보다 커야 합니다.",
+ "addSkipRangeApplied": "{{startSec}}–{{endSec}}초 구간 건너뛰기를 추가했습니다.",
+ "contextTooltip": "예상 토큰 {{usedTokens}} / {{budgetTokens}}",
+ "contextPercent": "컨텍스트 {{percent}}%",
+ "compactContext": "컨텍스트 압축",
+ "aiSettings": "AI 설정",
+ "history": "기록",
+ "newConversation": "새 대화",
+ "untitledConversation": "대화",
+ "clickToRename": "클릭하여 이름 변경",
+ "renameConversation": "대화 이름 변경",
+ "deleteConversation": "대화 삭제",
+ "confirmDeleteConversation": "\"{{title}}\"을(를) 삭제할까요?",
+ "addSkipRange": "건너뛸 구간 추가",
+ "skipButtonShort": "+ 건너뛰기",
+ "emptyState": "아직 메시지가 없습니다. 에이전트에게 무음 구간 자르기, 일시정지 조이기, 자막 추가를 요청해 보세요.",
+ "authorUser": "나",
+ "authorAssistant": "OpenScreen",
+ "rewindToMessage": "이 메시지로 되감기",
+ "copyMessage": "메시지 복사",
+ "copiedToClipboard": "클립보드에 복사됨",
+ "copyFailed": "복사할 수 없습니다",
+ "appliedPrefix": "적용됨:",
+ "thinking": "생각 중…",
+ "composerPlaceholder": "원하는 편집 내용을 설명하세요.",
+ "modelLabel": "모델",
+ "reasoningEffortLabel": "추론 노력 수준",
+ "sendTitle": "보내기 (Enter)",
+ "send": "보내기",
+ "rewindConfirmTitle": "여기로 되감을까요?",
+ "rewindConfirmBody": "이 시점 이후의 에이전트 편집과 이후 대화 턴이 롤백됩니다. 프로젝트, 대화, 에이전트 상태가 복원됩니다.",
+ "rewindConfirm": "되감기",
+ "configureModel": "AI 모델 구성",
+ "historyDialog": {
+ "title": "대화 기록",
+ "subtitle": "세션 전환 또는 새로 만들기",
+ "empty": "아직 대화가 없습니다.",
+ "msgsCount": "메시지 {{count}}개 · {{date}}"
+ }
+ },
+ "newProjectDialog": {
+ "title": "새 프로젝트",
+ "subtitle": "시작점을 선택하고 이름을 지정하세요",
+ "nameLabel": "프로젝트 이름",
+ "startingPointLabel": "시작점",
+ "create": "프로젝트 만들기",
+ "defaultTitle": "제목 없는 프로젝트",
+ "templates": {
+ "blankTitle": "빈 프로젝트",
+ "blankDesc": "빈 타임라인, 가져올 준비 완료",
+ "screenRecordingTitle": "화면 녹화",
+ "screenRecordingDesc": "시스템 캡처 시작",
+ "importMediaDesc": "디스크에서 동영상, 오디오, 이미지",
+ "fromTemplateTitle": "템플릿에서",
+ "fromTemplateDesc": "미리 정의된 스토리보드"
+ }
+ },
+ "openProjectDialog": {
+ "title": "프로젝트 열기",
+ "subtitle": "기존 프로젝트를 이어서 진행하거나 파일을 찾아보세요",
+ "searchPlaceholder": "프로젝트 검색…",
+ "noMatches": "\"{{query}}\"와(과) 일치하는 프로젝트가 없습니다.",
+ "navigateHint": "탐색 ·",
+ "openHint": "열기",
+ "browseFiles": "파일 찾아보기…"
+ },
+ "editClipDialog": {
+ "title": "클립 편집",
+ "adjustStart": "클립 시작 지점 조정",
+ "adjustEnd": "클립 종료 지점 조정",
+ "start": "시작",
+ "end": "종료",
+ "duration": "길이",
+ "reset": "재설정",
+ "apply": "적용",
+ "pickClipTitle": "편집할 클립 선택",
+ "clipLabel": "클립 {{index}}"
+ },
+ "insertSourceDialog": {
+ "title": "소스 삽입",
+ "subtitle": "\"{{assetLabel}}\"을(를) 타임라인 어디에 배치할까요?",
+ "addBefore": "앞에 추가",
+ "addBeforeDesc": "대상 클립 앞에 전체 소스를 삽입합니다.",
+ "addAfter": "뒤에 추가",
+ "addAfterDesc": "대상 클립 뒤에 전체 소스를 삽입합니다.",
+ "split": "여기서 분할하여 삽입",
+ "splitDesc": "드롭 지점에서 대상 클립을 분할하고 그 사이에 소스를 삽입합니다."
+ },
+ "cropDialog": {
+ "subtitle": "영역이나 핸들을 드래그하여 자르기 영역을 조정하세요",
+ "fieldX": "X",
+ "fieldY": "Y",
+ "fieldW": "너비",
+ "fieldH": "높이"
}
}
diff --git a/src/i18n/locales/ko-KR/launch.json b/src/i18n/locales/ko-KR/launch.json
index 645a1a10f..de214c4d0 100644
--- a/src/i18n/locales/ko-KR/launch.json
+++ b/src/i18n/locales/ko-KR/launch.json
@@ -10,6 +10,7 @@
"openProject": "프로젝트 열기",
"useVerticalTray": "세로 트레이 사용",
"useHorizontalTray": "가로 트레이 사용",
+ "openStudio": "스튜디오 열기",
"openNotes": "노트 열기",
"openNotesPlaceholder": "여기에 메모를 입력하세요...",
"notesToolbar": {
@@ -27,7 +28,12 @@
"disableSystemAudio": "시스템 오디오 비활성화",
"enableMicrophone": "마이크 활성화",
"disableMicrophone": "마이크 비활성화",
- "defaultMicrophone": "기본 마이크"
+ "defaultMicrophone": "기본 마이크",
+ "systemAudio": "시스템 오디오",
+ "microphone": "마이크",
+ "on": "켜짐",
+ "off": "꺼짐",
+ "inputDevice": "입력 장치"
},
"webcam": {
"enableWebcam": "웹캠 활성화",
@@ -35,7 +41,9 @@
"defaultCamera": "기본 카메라",
"searching": "검색 중...",
"noneFound": "카메라를 찾을 수 없음",
- "unavailable": "카메라를 사용할 수 없음"
+ "unavailable": "카메라를 사용할 수 없음",
+ "camera": "카메라",
+ "cameraDevice": "카메라 장치"
},
"cursor": {
"useEditableCursor": "편집 가능한 커서 사용",
@@ -45,6 +53,9 @@
"loading": "소스 불러오는 중...",
"screens": "화면 ({{count}}개)",
"windows": "창 ({{count}}개)",
+ "emptyTitle": "화면이나 창을 찾을 수 없음",
+ "emptyDescription": "화면 녹화 권한을 방금 허용했다면 이 선택기를 새로고침하세요. macOS에서는 OpenScreen을 다시 열어야 할 수도 있습니다.",
+ "loadFailedDescription": "OpenScreen이 캡처 소스를 불러오지 못했습니다. 이 선택기를 새로고침한 후 다시 시도하세요.",
"defaultSourceName": "화면"
},
"recording": {
diff --git a/src/i18n/locales/ko-KR/settings.json b/src/i18n/locales/ko-KR/settings.json
index b1072291e..3c966c5bc 100644
--- a/src/i18n/locales/ko-KR/settings.json
+++ b/src/i18n/locales/ko-KR/settings.json
@@ -9,7 +9,8 @@
"title": "포커스 모드",
"manual": "수동",
"auto": "자동",
- "autoDescription": "녹화된 커서 위치를 따라 카메라가 이동합니다"
+ "autoDescription": "녹화된 커서 위치를 따라 카메라가 이동합니다",
+ "lockedDisclaimer": "타임라인의 전역 자동 포커스 스위치로 제어됩니다. 줌마다 포커스 모드를 설정하려면 이 옵션을 꺼주세요."
},
"threeD": {
"title": "3D 회전",
@@ -211,6 +212,7 @@
"errorLoadFailed": "폰트를 불러올 수 없습니다. Google Fonts URL이 올바른지 확인해 주세요."
},
"cursor": {
+ "title": "커서",
"theme": "커서 스타일",
"themeDefault": "기본",
"show": "커서 표시",
@@ -218,7 +220,8 @@
"smoothing": "부드러움",
"motionBlur": "모션 블러",
"clickBounce": "클릭 바운스",
- "clipToBounds": "캔버스에 맞춰 자르기"
+ "clipToBounds": "캔버스에 맞춰 자르기",
+ "clipToBoundsDescription": "커서를 비디오 프레임 안에 유지합니다. 꺼두면 확대하거나 이동할 때 커서가 가장자리를 벗어날 수 있습니다."
},
"language": {
"title": "언어"
@@ -226,5 +229,9 @@
"timeline": {
"title": "타임라인",
"waveform": "트림 트랙에 오디오 파형 표시"
+ },
+ "facets": {
+ "captions": "자막",
+ "transcript": "대본"
}
}
diff --git a/src/i18n/locales/ko-KR/timeline.json b/src/i18n/locales/ko-KR/timeline.json
index ca2ac1526..1a2cb5f06 100644
--- a/src/i18n/locales/ko-KR/timeline.json
+++ b/src/i18n/locales/ko-KR/timeline.json
@@ -2,6 +2,10 @@
"buttons": {
"addZoom": "줌 추가 (Z)",
"suggestZooms": "커서 기반 줌 제안",
+ "autoZoomOn": "자동 줌 제안 켜짐 — 클릭하면 제안된 줌을 제거합니다",
+ "autoZoomOff": "자동 줌 제안 꺼짐 — 클릭하면 커서 기반으로 줌을 제안합니다",
+ "autoFocusAllOn": "모든 줌에 자동 초점 켜짐 — 클릭하면 모두 수동으로 전환합니다",
+ "autoFocusAllOff": "모든 줌에 자동 초점 켜기 (카메라가 커서를 따라갑니다)",
"addTrim": "트림 추가 (T)",
"addAnnotation": "주석 추가 (A)",
"addSpeed": "속도 추가 (S)",
@@ -57,5 +61,32 @@
"success": {
"addedZoomSuggestions": "커서 기반 줌 제안 {{count}}개가 추가되었습니다",
"addedZoomSuggestionsPlural": "커서 기반 줌 제안 {{count}}개가 추가되었습니다"
+ },
+ "toolbar": {
+ "autoEnhance": "자동 향상",
+ "automaticZooms": "자동 줌",
+ "automaticZoomsHint": "녹화된 커서 움직임 기반",
+ "smartZoomsAndCuts": "스마트 줌 + 컷",
+ "smartZoomsAndCutsHint": "AI 사용",
+ "comment": "코멘트",
+ "aspectRatio": "화면 비율",
+ "timelineTools": "타임라인 도구",
+ "arrangeClips": "클립 정리",
+ "arrangeClipsHint": "아래 클립을 드래그하여 순서를 바꾸거나 새 클립을 놓으세요",
+ "newAnnotation": "새 주석",
+ "noAnnotationsYet": "아직 주석이 없습니다",
+ "constantSpeed": "일정한 속도",
+ "noTrims": "트림 없음",
+ "dragToReorderHint": "드래그하여 순서 변경 · 더블클릭하여 시작/종료 지점 편집",
+ "editInOutPoints": "시작/종료 지점 편집",
+ "deleteClip": "클립 삭제",
+ "dropToAdd": "타임라인에 추가하려면 놓으세요",
+ "importRecordingFirst": "먼저 녹화 파일을 가져오세요",
+ "noAutoZoomMoments": "자동 줌 순간을 찾을 수 없음",
+ "noAutoZoomMomentsDescription": "이 녹화에는 커서 이동 데이터가 없거나 기존 줌이 이미 주요 순간을 다루고 있습니다.",
+ "addedAutoZoom": "자동 줌 {{count}}개가 추가되었습니다",
+ "addedAutoZoomPlural": "자동 줌 {{count}}개가 추가되었습니다",
+ "autoZoomFailed": "자동 줌 실패",
+ "aiEnhanceRequested": "AI 에이전트에게 이 녹화 개선을 요청했습니다"
}
}
diff --git a/src/i18n/locales/pt-BR/dialogs.json b/src/i18n/locales/pt-BR/dialogs.json
index c2b201161..ba77d90a9 100644
--- a/src/i18n/locales/pt-BR/dialogs.json
+++ b/src/i18n/locales/pt-BR/dialogs.json
@@ -42,7 +42,6 @@
"step1Title": "1. Adicionar Recorte",
"step1DescriptionBefore": "Pressione ",
"step1DescriptionAfter": " ou clique no ícone da tesoura para marcar uma seção para remoção.",
-
"step2Title": "2. Ajustar",
"step2Description": "Arraste as bordas da região vermelha para cobrir exatamente o que você deseja cortar."
},
@@ -52,9 +51,29 @@
"detail": "Deseja salvar seu projeto antes de fechar?",
"saveAndClose": "Salvar e Fechar",
"discardAndClose": "Descartar e Fechar",
+ "detailNewProject": "Deseja salvar seu projeto antes de criar um novo?",
+ "saveAndNewProject": "Salvar e Novo Projeto",
+ "discardAndNewProject": "Descartar e Novo Projeto",
+ "detailLoadProject": "Deseja salvar seu projeto antes de carregar outro?",
+ "saveAndLoadProject": "Salvar e Carregar Projeto",
+ "discardAndLoadProject": "Descartar e Carregar Projeto",
+ "newProject": "Novo Projeto",
+ "importVideo": "Importar Arquivo de Vídeo…",
"loadProject": "Carregar Projeto…",
"saveProject": "Salvar Projeto…",
- "saveProjectAs": "Salvar Projeto Como…"
+ "saveProjectAs": "Salvar Projeto Como…",
+ "modal": {
+ "closeTitle": "Salvar alterações antes de fechar?",
+ "closeBody": "Seu projeto tem alterações não salvas. Salve agora, descarte ou permaneça no editor.",
+ "newTitle": "Salvar alterações antes de criar um novo projeto?",
+ "openTitle": "Salvar alterações antes de abrir outro projeto?",
+ "recordTitle": "Salvar alterações antes de iniciar uma nova gravação?",
+ "sharedBody": "O projeto atual tem alterações não salvas. Salve primeiro, descarte ou cancele.",
+ "notSavedYet": "O projeto atual ainda não foi salvo no disco.",
+ "discard": "Descartar",
+ "saveAndContinue": "Salvar e continuar",
+ "saving": "Salvando…"
+ }
},
"fileDialogs": {
"saveGif": "Salvar GIF Exportado",
diff --git a/src/i18n/locales/pt-BR/editor.json b/src/i18n/locales/pt-BR/editor.json
index 2188ec15a..2026d7e57 100644
--- a/src/i18n/locales/pt-BR/editor.json
+++ b/src/i18n/locales/pt-BR/editor.json
@@ -6,6 +6,7 @@
"confirm": "Confirmar"
},
"loadingVideo": "Carregando vídeo...",
+ "loadingEditor": "Carregando editor...",
"errors": {
"noVideoLoaded": "Nenhum vídeo carregado",
"videoNotReady": "Vídeo não está pronto",
@@ -40,7 +41,26 @@
"cameraDenied": "Acesso à câmera negado. A gravação continuará sem webcam.",
"cameraDisconnected": "Webcam desconectada.",
"cameraNotFound": "Câmera não encontrada.",
- "permissionDenied": "Permissão de gravação negada. Por favor, permita a gravação de tela."
+ "permissionDenied": "Permissão de gravação negada. Por favor, permita a gravação de tela.",
+ "accessibilityAllowAndRetry": "Permita o acesso de Acessibilidade para o OpenScreen e pressione gravar novamente para iniciar a contagem regressiva."
+ },
+ "emptyState": {
+ "title": "Nenhum projeto aberto",
+ "description": "Crie um novo projeto ou abra um existente.",
+ "titleHasAsset": "Adicione um vídeo para começar",
+ "descriptionHasAsset": "Importe uma gravação para começar a editar.",
+ "newProjectButton": "Novo projeto + importar vídeo",
+ "importVideoButton": "Importar vídeo",
+ "loadProjectButton": "Abrir projeto",
+ "supportedFormats": "Formatos suportados: MP4, MOV, WebM, MKV, AVI, M4V, WMV",
+ "dragDropHint": "ou arraste e solte um arquivo de projeto .openscreen aqui",
+ "dropOverlay": "Solte o arquivo de projeto para abrir",
+ "dropErrors": {
+ "unsupportedFormatTitle": "Formato Não Suportado",
+ "unsupportedFormatMessage": "Somente arquivos de projeto .openscreen podem ser soltos aqui. Para importar um vídeo, use o botão \"Importar Arquivo de Vídeo…\" nesta tela.",
+ "couldNotOpenTitle": "Não Foi Possível Abrir o Arquivo",
+ "couldNotOpenMessage": "O arquivo de projeto não pôde ser aberto. O vídeo referenciado pode ter sido movido ou excluído."
+ }
},
"autoCaptions": {
"button": "Legendas automáticas",
@@ -72,5 +92,263 @@
"annotation": "Anotação",
"blur": "Desfoque"
}
+ },
+ "topbar": {
+ "toggleChatPanel": "Alternar painel de chat",
+ "openProject": "Abrir projeto",
+ "newProject": "Novo projeto",
+ "saveProject": "Salvar projeto",
+ "unsaved": "Não salvo",
+ "saved": "Salvo",
+ "switchToLightTheme": "Mudar para tema claro",
+ "switchToDarkTheme": "Mudar para tema escuro",
+ "toggleTheme": "Alternar tema",
+ "settings": "Configurações",
+ "export": "Exportar",
+ "renameProject": "Renomear projeto",
+ "noProject": "Nenhum projeto",
+ "changeLanguage": "Mudar idioma",
+ "editorMode": "Modo do editor",
+ "modes": {
+ "media": "Mídia",
+ "edit": "Editar",
+ "rec": "Gravar"
+ }
+ },
+ "rec": {
+ "source": "Fonte",
+ "systemAudio": "Áudio do sistema",
+ "microphone": "Microfone",
+ "camera": "Câmera",
+ "cursorHighlight": "Destaque do cursor",
+ "on": "Ativado",
+ "off": "Desativado",
+ "loading": "Carregando…",
+ "noCameraFound": "Nenhuma câmera encontrada",
+ "cameraAccessError": "Não foi possível acessar esta câmera",
+ "startingCamera": "Iniciando câmera…",
+ "turnOnCameraHint": "Ative a câmera para ver uma pré-visualização ao vivo",
+ "entireScreen": "Tela inteira",
+ "cancel": "Cancelar",
+ "startRecording": "Iniciar gravação",
+ "startRecordingHint": "Abre o widget de gravação e fecha esta janela do editor.",
+ "sourceModal": {
+ "screens": "Telas ({{count}})",
+ "windows": "Janelas ({{count}})",
+ "loadingSources": "Carregando fontes…",
+ "noScreensFound": "Nenhuma tela encontrada",
+ "noWindowsFound": "Nenhuma janela encontrada",
+ "cancel": "Cancelar"
+ }
+ },
+ "mediaStage": {
+ "openProjectFirst": "Abra um projeto primeiro",
+ "couldNotAddAsset": "Não foi possível adicionar o arquivo",
+ "searchPlaceholder": "Pesquisar mídia…",
+ "dragHint": "Arraste um clipe para a linha do tempo abaixo para adicioná-lo",
+ "emptyHint": "Ainda não há mídia — importe uma gravação para começar.",
+ "importMedia": "Importar mídia",
+ "added": "{{label}} adicionado",
+ "sourceTranscript": "Transcrição da Fonte",
+ "close": "Fechar",
+ "transcriptReady": "Transcrição pronta",
+ "notGeneratedYet": "Ainda não gerada",
+ "regenerateAs": "Regenerar em",
+ "auto": "Automático",
+ "regenerate": "Regenerar",
+ "transcriptEmpty": "A transcrição está vazia.",
+ "notGeneratedHint": "Ainda não gerada — escolha um idioma e clique em regenerar.",
+ "transcribing": "Transcrevendo",
+ "transcribingEllipsis": "Transcrevendo…",
+ "pendingTranscription": "Transcrição pendente",
+ "transcriptionFailed": "Falha na transcrição",
+ "noTranscript": "Sem transcrição",
+ "generating": "Gerando",
+ "generationFailed": "Falha na geração",
+ "generated": "Gerado",
+ "generationFailedHint": "Falha na geração — escolha um idioma e gere novamente.",
+ "noPreviewAvailable": "Pré-visualização indisponível",
+ "restart": "Reiniciar",
+ "detectedLanguage": "Idioma detectado: {{language}}"
+ },
+ "exportDialog": {
+ "title": "Exportar",
+ "subtitle": "Renderizar a linha do tempo para um arquivo",
+ "addVideoBeforeExporting": "Adicione um vídeo antes de exportar.",
+ "quality": "Qualidade",
+ "qualitySmallerFile": "Arquivo menor",
+ "qualityRecommended": "Recomendado",
+ "qualityMatchRecording": "Igual à gravação",
+ "frameRate": "Taxa de quadros",
+ "codec": "Codec",
+ "codecBestCompatibility": "Melhor compatibilidade",
+ "codecMaySupportVary": "Pode não ser suportado por todos os codificadores do sistema",
+ "size": "Tamanho",
+ "loopGif": "Repetir GIF",
+ "loopOn": "Repetição ativada",
+ "loopOff": "Repetição desativada",
+ "pickFormatAndExport": "Escolha um formato e clique em Exportar para começar.",
+ "savedTo": "Salvo em",
+ "exportFailedGeneric": "Falha na exportação.",
+ "writingFile": "Gravando arquivo…",
+ "renderingFrames": "Renderizando quadros",
+ "framesEta": "{{current}} / {{total}} quadros · ETA {{eta}}s",
+ "preparingEncoder": "Preparando codificador…",
+ "close": "Fechar",
+ "cancel": "Cancelar",
+ "rendering": "Renderizando…",
+ "saving": "Salvando…",
+ "starting": "Iniciando…",
+ "exportGif": "Exportar GIF",
+ "exportMp4": "Exportar MP4",
+ "exportedGif": "GIF exportado",
+ "exportedVideo": "Vídeo exportado",
+ "showInFolder": "Mostrar na pasta",
+ "exportFailed": "Falha na exportação",
+ "failedToWriteFile": "Falha ao gravar o arquivo"
+ },
+ "inspector": {
+ "resetFocusPoint": "Redefinir ponto de foco",
+ "setColor": "Definir cor {{color}}",
+ "trimHiddenDuration": "{{duration}}s de mídia de origem ocultos da linha do tempo editada.",
+ "restoreDeleteTrim": "Restaurar (excluir corte)",
+ "collapseInspector": "Recolher inspetor",
+ "captionsDescription": "Gere legendas sincronizadas por palavra a partir da transcrição e solte-as na linha do tempo.",
+ "generateCaptions": "Gerar legendas",
+ "cropDescription": "Reenquadre a gravação — escolha uma proporção e dê zoom na região que deseja manter.",
+ "openCrop": "Abrir corte…"
+ },
+ "leftPanel": {
+ "mediaTitle": "Mídia",
+ "searchPlaceholder": "Pesquisar…",
+ "clearSearch": "Limpar pesquisa",
+ "emptyHint": "Ainda não há mídia neste projeto. Importe um vídeo abaixo.",
+ "transcriptReadyBadge": "TRANSCRIÇÃO PRONTA"
+ },
+ "leftRail": {
+ "chat": "Chat",
+ "media": "Mídia",
+ "ariaLabel": "Ferramentas à esquerda"
+ },
+ "chat": {
+ "changeProvider": "Trocar provedor",
+ "back": "Voltar",
+ "currentModel": "Modelo atual:",
+ "notSelected": "Não selecionado",
+ "loadingModels": "Carregando modelos…",
+ "searchModels": "Pesquisar modelos…",
+ "fetchModelsFailed": "Não foi possível buscar os modelos ao vivo ({{error}}); abra as configurações do provedor para digitar um id de modelo manualmente.",
+ "noModelsAvailable": "Nenhum modelo disponível deste provedor.",
+ "noModelsMatch": "Nenhum modelo corresponde a esta pesquisa.",
+ "noProvidersConnected": "Nenhum provedor conectado ainda.",
+ "selectModelFailed": "Não foi possível selecionar o modelo",
+ "providerSettings": "Configurações do provedor…",
+ "applyEditsFailed": "Não foi possível aplicar as edições do agente",
+ "chatFailed": "Falha no chat",
+ "rewindFailed": "Falha ao rebobinar",
+ "rewoundSuccess": "Rebobinado até o início dessa mensagem",
+ "notEnoughHistory": "Ainda não há histórico suficiente para compactar.",
+ "compactedSuccess": "Contexto anterior compactado",
+ "compactFailed": "Falha ao compactar",
+ "createSessionFailed": "Não foi possível criar a conversa",
+ "deleteSessionFailed": "Não foi possível excluir a conversa",
+ "renameSessionFailed": "Não foi possível renomear a conversa",
+ "reasoningEffortUpdateFailed": "Não foi possível atualizar o esforço de raciocínio",
+ "addSkipRangePrompt": "Adicionar intervalo a pular\nFormato: startSec-endSec (ex.: 1.2-3.4)",
+ "addSkipRangeFormatError": "Use startSec-endSec, ex.: 1.2-3.4",
+ "addSkipRangeOrderError": "endSec deve ser maior que startSec.",
+ "addSkipRangeApplied": "Salto de {{startSec}}–{{endSec}}s adicionado.",
+ "contextTooltip": "{{usedTokens}} / {{budgetTokens}} tokens estimados",
+ "contextPercent": "{{percent}}% de contexto",
+ "compactContext": "Compactar contexto",
+ "aiSettings": "Configurações de IA",
+ "history": "Histórico",
+ "newConversation": "Nova conversa",
+ "untitledConversation": "Conversa",
+ "clickToRename": "Clique para renomear",
+ "renameConversation": "Renomear conversa",
+ "deleteConversation": "Excluir conversa",
+ "confirmDeleteConversation": "Excluir \"{{title}}\"?",
+ "addSkipRange": "Adicionar intervalo a pular",
+ "skipButtonShort": "+ pular",
+ "emptyState": "Ainda não há mensagens. Peça ao agente para cortar silêncios, apertar pausas ou adicionar legendas.",
+ "authorUser": "Você",
+ "authorAssistant": "OpenScreen",
+ "rewindToMessage": "Rebobinar até esta mensagem",
+ "copyMessage": "Copiar mensagem",
+ "copiedToClipboard": "Copiado para a área de transferência",
+ "copyFailed": "Não foi possível copiar",
+ "appliedPrefix": "aplicado:",
+ "thinking": "Pensando…",
+ "composerPlaceholder": "Descreva a edição que você quer.",
+ "modelLabel": "Modelo",
+ "reasoningEffortLabel": "Esforço de raciocínio",
+ "sendTitle": "Enviar (Enter)",
+ "send": "Enviar",
+ "rewindConfirmTitle": "Rebobinar até aqui?",
+ "rewindConfirmBody": "As edições do agente e as interações seguintes a partir deste ponto serão desfeitas. O projeto, a conversa e o estado do agente serão restaurados.",
+ "rewindConfirm": "Rebobinar",
+ "configureModel": "Configurar modelo de IA",
+ "historyDialog": {
+ "title": "Histórico de conversas",
+ "subtitle": "Alternar ou criar sessões",
+ "empty": "Ainda não há conversas.",
+ "msgsCount": "{{count}} mensagens · {{date}}"
+ }
+ },
+ "newProjectDialog": {
+ "title": "Novo projeto",
+ "subtitle": "Escolha um ponto de partida e dê um nome",
+ "nameLabel": "Nome do projeto",
+ "startingPointLabel": "Ponto de partida",
+ "create": "Criar projeto",
+ "defaultTitle": "Projeto sem título",
+ "templates": {
+ "blankTitle": "Projeto em branco",
+ "blankDesc": "Linha do tempo vazia, pronta para importar",
+ "screenRecordingTitle": "Gravação de tela",
+ "screenRecordingDesc": "Iniciar captura do sistema",
+ "importMediaDesc": "Vídeo, áudio, imagens do disco",
+ "fromTemplateTitle": "A partir de modelo",
+ "fromTemplateDesc": "Storyboard predefinido"
+ }
+ },
+ "openProjectDialog": {
+ "title": "Abrir projeto",
+ "subtitle": "Retome um projeto existente ou procure seus arquivos",
+ "searchPlaceholder": "Pesquisar projetos…",
+ "noMatches": "Nenhum projeto corresponde a \"{{query}}\".",
+ "navigateHint": "para navegar ·",
+ "openHint": "para abrir",
+ "browseFiles": "Procurar arquivos…"
+ },
+ "editClipDialog": {
+ "title": "Editar clipe",
+ "adjustStart": "Ajustar início do clipe",
+ "adjustEnd": "Ajustar fim do clipe",
+ "start": "Início",
+ "end": "Fim",
+ "duration": "Duração",
+ "reset": "Redefinir",
+ "apply": "Aplicar",
+ "pickClipTitle": "Escolha um clipe para editar",
+ "clipLabel": "Clipe {{index}}"
+ },
+ "insertSourceDialog": {
+ "title": "Inserir fonte",
+ "subtitle": "Onde colocar \"{{assetLabel}}\" na linha do tempo?",
+ "addBefore": "Adicionar antes",
+ "addBeforeDesc": "Insere toda a fonte antes do clipe de destino.",
+ "addAfter": "Adicionar depois",
+ "addAfterDesc": "Insere toda a fonte depois do clipe de destino.",
+ "split": "Dividir aqui e inserir",
+ "splitDesc": "Divide o clipe de destino no ponto de soltura e insere a fonte no meio."
+ },
+ "cropDialog": {
+ "subtitle": "Arraste a região ou suas alças para ajustar a área de corte",
+ "fieldX": "X",
+ "fieldY": "Y",
+ "fieldW": "L",
+ "fieldH": "A"
}
}
diff --git a/src/i18n/locales/pt-BR/launch.json b/src/i18n/locales/pt-BR/launch.json
index 1df01ff79..59bb77265 100644
--- a/src/i18n/locales/pt-BR/launch.json
+++ b/src/i18n/locales/pt-BR/launch.json
@@ -8,6 +8,9 @@
"resumeRecording": "Retomar gravação",
"openVideoFile": "Abrir arquivo de vídeo",
"openProject": "Abrir projeto",
+ "useVerticalTray": "Usar bandeja vertical",
+ "useHorizontalTray": "Usar bandeja horizontal",
+ "openStudio": "Abrir Studio",
"openNotes": "Abrir notas",
"openNotesPlaceholder": "Escreva suas notas aqui...",
"notesToolbar": {
@@ -25,7 +28,12 @@
"disableSystemAudio": "Desativar áudio do sistema",
"enableMicrophone": "Ativar microfone",
"disableMicrophone": "Desativar microfone",
- "defaultMicrophone": "Microfone Padrão"
+ "defaultMicrophone": "Microfone Padrão",
+ "systemAudio": "Áudio do sistema",
+ "microphone": "Microfone",
+ "on": "Ativado",
+ "off": "Desativado",
+ "inputDevice": "Dispositivo de entrada"
},
"webcam": {
"enableWebcam": "Ativar webcam",
@@ -33,7 +41,9 @@
"defaultCamera": "Câmera Padrão",
"searching": "Procurando...",
"noneFound": "Nenhuma câmera encontrada",
- "unavailable": "Câmera indisponível"
+ "unavailable": "Câmera indisponível",
+ "camera": "Câmera",
+ "cameraDevice": "Dispositivo de câmera"
},
"cursor": {
"useEditableCursor": "Usar cursor editável",
@@ -43,6 +53,9 @@
"loading": "Carregando fontes...",
"screens": "Telas ({{count}})",
"windows": "Janelas ({{count}})",
+ "emptyTitle": "Nenhuma tela ou janela encontrada",
+ "emptyDescription": "Se você acabou de conceder a permissão de gravação de tela, recarregue este seletor. No macOS, pode ser necessário reabrir o OpenScreen.",
+ "loadFailedDescription": "O OpenScreen não conseguiu carregar as fontes de captura. Recarregue este seletor e tente novamente.",
"defaultSourceName": "Tela"
},
"recording": {
diff --git a/src/i18n/locales/pt-BR/settings.json b/src/i18n/locales/pt-BR/settings.json
index e137b3fd3..25b7be890 100644
--- a/src/i18n/locales/pt-BR/settings.json
+++ b/src/i18n/locales/pt-BR/settings.json
@@ -1,5 +1,6 @@
{
"zoom": {
+ "previewHold": "Mantenha pressionado para pré-visualizar o efeito de zoom",
"level": "Nível de Zoom",
"customScale": "Zoom Personalizado",
"selectRegion": "Selecione uma região de zoom para ajustar",
@@ -8,7 +9,8 @@
"title": "Modo de Foco",
"manual": "Manual",
"auto": "Automático",
- "autoDescription": "A câmera segue a posição do cursor gravado"
+ "autoDescription": "A câmera segue a posição do cursor gravado",
+ "lockedDisclaimer": "Controlado pelo interruptor global de Foco Automático na linha do tempo. Desative-o para definir o modo de foco por zoom."
},
"threeD": {
"title": "Rotação 3D",
@@ -46,6 +48,7 @@
"noWebcam": "Sem Webcam",
"webcamShape": "Formato da Câmera",
"webcamSize": "Tamanho da Webcam",
+ "mirrorWebcam": "Espelhar Webcam",
"reactiveWebcam": "Encolher ao ampliar",
"reactiveWebcamDescription": "A câmera diminui suavemente enquanto o vídeo está ampliado, para não atrapalhar."
},
@@ -102,15 +105,17 @@
},
"project": {
"save": "Salvar Projeto",
- "load": "Carregar Projeto"
+ "load": "Carregar Projeto",
+ "new": "Novo Projeto"
},
"export": {
"videoButton": "Exportar Vídeo",
"gifButton": "Exportar GIF",
"chooseSaveLocation": "Escolher Local para Salvar"
},
- "links": {
+ "support": {
"reportBug": "Relatar Bug",
+ "saveDiagnostics": "Salvar Diagnósticos",
"starOnGithub": "Dar Estrela no GitHub"
},
"imageUpload": {
@@ -176,6 +181,17 @@
"modern": "Moderno",
"clean": "Clean"
},
+ "textAnimation": {
+ "title": "Animação de Texto",
+ "selectAnimation": "Selecionar animação",
+ "none": "Nenhuma",
+ "fade": "Esmaecer",
+ "rise": "Subir",
+ "pop": "Aparecer",
+ "slideLeft": "Deslizar à Esquerda",
+ "typewriter": "Máquina de Escrever",
+ "pulse": "Pulsar"
+ },
"customFont": {
"dialogTitle": "Adicionar Google Font",
"urlLabel": "URL de Importação do Google Fonts",
@@ -196,6 +212,7 @@
"errorLoadFailed": "A fonte não pôde ser carregada. Por favor, verifique se a URL do Google Fonts está correta."
},
"cursor": {
+ "title": "Cursor",
"theme": "Estilo do cursor",
"themeDefault": "Padrão",
"show": "Mostrar cursor",
@@ -208,5 +225,13 @@
},
"language": {
"title": "Idioma"
+ },
+ "timeline": {
+ "title": "Linha do Tempo",
+ "waveform": "Mostrar Forma de Onda de Áudio na Faixa de Corte"
+ },
+ "facets": {
+ "captions": "Legendas",
+ "transcript": "Transcrição"
}
}
diff --git a/src/i18n/locales/pt-BR/shortcuts.json b/src/i18n/locales/pt-BR/shortcuts.json
index 83d1a18ec..140e1e341 100644
--- a/src/i18n/locales/pt-BR/shortcuts.json
+++ b/src/i18n/locales/pt-BR/shortcuts.json
@@ -13,7 +13,9 @@
"reservedShortcut": "Este atalho é reservado para \"{{label}}\" e não pode ser reatribuído.",
"savedToast": "Atalhos de teclado salvos",
"resetToast": "Atalhos redefinidos para o padrão — clique em Salvar para aplicar",
+ "registrationFailed": "Falha ao registrar o atalho. Ele pode já estar em uso por outro aplicativo. Tente uma tecla diferente.",
"actions": {
+ "openApp": "Abrir Aplicativo",
"addZoom": "Adicionar Zoom",
"addTrim": "Adicionar Recorte",
"addSpeed": "Adicionar Velocidade",
diff --git a/src/i18n/locales/pt-BR/timeline.json b/src/i18n/locales/pt-BR/timeline.json
index b5d38ec82..0d7d25471 100644
--- a/src/i18n/locales/pt-BR/timeline.json
+++ b/src/i18n/locales/pt-BR/timeline.json
@@ -2,6 +2,10 @@
"buttons": {
"addZoom": "Adicionar Zoom (Z)",
"suggestZooms": "Sugerir Zooms a partir do Cursor",
+ "autoZoomOn": "Sugestões de zoom automático ativadas — clique para remover os zooms sugeridos",
+ "autoZoomOff": "Sugestões de zoom automático desativadas — clique para sugerir zooms a partir do cursor",
+ "autoFocusAllOn": "Foco automático ativado para todos os zooms — clique para mudar todos para manual",
+ "autoFocusAllOff": "Ativar foco automático para todos os zooms (a câmera segue o cursor)",
"addTrim": "Adicionar Recorte (T)",
"addAnnotation": "Adicionar Anotação (A)",
"addBlur": "Adicionar Desfoque (B)",
@@ -57,5 +61,32 @@
"success": {
"addedZoomSuggestions": "Adicionada {{count}} sugestão de zoom baseada no cursor",
"addedZoomSuggestionsPlural": "Adicionadas {{count}} sugestões de zoom baseadas no cursor"
+ },
+ "toolbar": {
+ "autoEnhance": "Melhoria automática",
+ "automaticZooms": "Zooms automáticos",
+ "automaticZoomsHint": "Do movimento do cursor gravado",
+ "smartZoomsAndCuts": "Zooms e cortes inteligentes",
+ "smartZoomsAndCutsHint": "Com IA",
+ "comment": "Comentário",
+ "aspectRatio": "Proporção",
+ "timelineTools": "Ferramentas da linha do tempo",
+ "arrangeClips": "Organizar clipes",
+ "arrangeClipsHint": "Arraste os clipes abaixo para reordená-los ou solte novos",
+ "newAnnotation": "Nova anotação",
+ "noAnnotationsYet": "Ainda não há anotações",
+ "constantSpeed": "Velocidade constante",
+ "noTrims": "Sem recortes",
+ "dragToReorderHint": "Arraste para reordenar · clique duas vezes para editar os pontos de entrada/saída",
+ "editInOutPoints": "Editar pontos de entrada/saída",
+ "deleteClip": "Excluir clipe",
+ "dropToAdd": "Solte para adicionar à linha do tempo",
+ "importRecordingFirst": "Importe uma gravação primeiro",
+ "noAutoZoomMoments": "Nenhum momento de zoom automático encontrado",
+ "noAutoZoomMomentsDescription": "Esta gravação não tem dados de movimento do cursor, ou os zooms existentes já cobrem os momentos de destaque.",
+ "addedAutoZoom": "{{count}} zoom automático adicionado",
+ "addedAutoZoomPlural": "{{count}} zooms automáticos adicionados",
+ "autoZoomFailed": "Falha no zoom automático",
+ "aiEnhanceRequested": "Foi solicitado ao agente de IA que melhore esta gravação"
}
}
diff --git a/src/i18n/locales/ru/dialogs.json b/src/i18n/locales/ru/dialogs.json
index 8d1f0aa2a..a821771e9 100644
--- a/src/i18n/locales/ru/dialogs.json
+++ b/src/i18n/locales/ru/dialogs.json
@@ -57,9 +57,23 @@
"detailLoadProject": "Хотите сохранить проект перед загрузкой другого?",
"saveAndLoadProject": "Сохранить и загрузить проект",
"discardAndLoadProject": "Отменить и загрузить проект",
+ "newProject": "Новый проект",
+ "importVideo": "Импортировать видеофайл…",
"loadProject": "Загрузить проект…",
"saveProject": "Сохранить проект…",
- "saveProjectAs": "Сохранить проект как…"
+ "saveProjectAs": "Сохранить проект как…",
+ "modal": {
+ "closeTitle": "Сохранить изменения перед закрытием?",
+ "closeBody": "В проекте есть несохранённые изменения. Сохраните их сейчас, отмените или останьтесь в редакторе.",
+ "newTitle": "Сохранить изменения перед созданием нового проекта?",
+ "openTitle": "Сохранить изменения перед открытием другого проекта?",
+ "recordTitle": "Сохранить изменения перед началом новой записи?",
+ "sharedBody": "В текущем проекте есть несохранённые изменения. Сначала сохраните их, отмените или отмените действие.",
+ "notSavedYet": "Текущий проект ещё не сохранён на диск.",
+ "discard": "Отменить",
+ "saveAndContinue": "Сохранить и продолжить",
+ "saving": "Сохранение…"
+ }
},
"fileDialogs": {
"saveGif": "Сохранить экспортированный GIF",
diff --git a/src/i18n/locales/ru/editor.json b/src/i18n/locales/ru/editor.json
index c45501c32..cb3344a5d 100644
--- a/src/i18n/locales/ru/editor.json
+++ b/src/i18n/locales/ru/editor.json
@@ -65,9 +65,12 @@
},
"emptyState": {
"title": "Нет открытых проектов",
- "description": "Импортируйте видео для начала редактирования или загрузите существующий проект OpenScreen.",
- "importVideoButton": "Импортировать видеофайл…",
- "loadProjectButton": "Загрузить проект…",
+ "description": "Создайте новый проект или откройте существующий.",
+ "titleHasAsset": "Добавьте видео, чтобы начать",
+ "descriptionHasAsset": "Импортируйте запись, чтобы начать редактирование.",
+ "newProjectButton": "Новый проект + импорт видео",
+ "importVideoButton": "Импортировать видео",
+ "loadProjectButton": "Открыть проект",
"supportedFormats": "Поддерживаемые форматы: MP4, MOV, WebM, MKV, AVI, M4V, WMV",
"dragDropHint": "или перетащите файл проекта .openscreen сюда",
"dropOverlay": "Перетащите файл проекта для открытия",
@@ -89,5 +92,263 @@
"annotation": "Аннотация",
"blur": "Размытие"
}
+ },
+ "topbar": {
+ "toggleChatPanel": "Показать/скрыть панель чата",
+ "openProject": "Открыть проект",
+ "newProject": "Новый проект",
+ "saveProject": "Сохранить проект",
+ "unsaved": "Не сохранено",
+ "saved": "Сохранено",
+ "switchToLightTheme": "Переключить на светлую тему",
+ "switchToDarkTheme": "Переключить на тёмную тему",
+ "toggleTheme": "Переключить тему",
+ "settings": "Настройки",
+ "export": "Экспорт",
+ "renameProject": "Переименовать проект",
+ "noProject": "Нет проекта",
+ "changeLanguage": "Сменить язык",
+ "editorMode": "Режим редактора",
+ "modes": {
+ "media": "Медиа",
+ "edit": "Редактирование",
+ "rec": "Запись"
+ }
+ },
+ "rec": {
+ "source": "Источник",
+ "systemAudio": "Системный звук",
+ "microphone": "Микрофон",
+ "camera": "Камера",
+ "cursorHighlight": "Подсветка курсора",
+ "on": "Вкл",
+ "off": "Выкл",
+ "loading": "Загрузка…",
+ "noCameraFound": "Камера не найдена",
+ "cameraAccessError": "Не удалось получить доступ к этой камере",
+ "startingCamera": "Запуск камеры…",
+ "turnOnCameraHint": "Включите камеру, чтобы увидеть предпросмотр в реальном времени",
+ "entireScreen": "Весь экран",
+ "cancel": "Отмена",
+ "startRecording": "Начать запись",
+ "startRecordingHint": "Открывает виджет записи и закрывает это окно редактора.",
+ "sourceModal": {
+ "screens": "Экраны ({{count}})",
+ "windows": "Окна ({{count}})",
+ "loadingSources": "Загрузка источников…",
+ "noScreensFound": "Экраны не найдены",
+ "noWindowsFound": "Окна не найдены",
+ "cancel": "Отмена"
+ }
+ },
+ "mediaStage": {
+ "openProjectFirst": "Сначала откройте проект",
+ "couldNotAddAsset": "Не удалось добавить файл",
+ "searchPlaceholder": "Поиск медиа…",
+ "dragHint": "Перетащите клип на таймлайн ниже, чтобы добавить его",
+ "emptyHint": "Пока нет медиафайлов — импортируйте запись, чтобы начать.",
+ "importMedia": "Импортировать медиа",
+ "added": "Добавлено: {{label}}",
+ "sourceTranscript": "Транскрипт источника",
+ "close": "Закрыть",
+ "transcriptReady": "Транскрипт готов",
+ "notGeneratedYet": "Ещё не создан",
+ "regenerateAs": "Пересоздать на",
+ "auto": "Авто",
+ "regenerate": "Пересоздать",
+ "transcriptEmpty": "Транскрипт пуст.",
+ "notGeneratedHint": "Ещё не создан — выберите язык и нажмите «Пересоздать».",
+ "transcribing": "Расшифровка",
+ "transcribingEllipsis": "Расшифровка…",
+ "pendingTranscription": "Ожидает расшифровки",
+ "transcriptionFailed": "Ошибка расшифровки",
+ "noTranscript": "Нет расшифровки",
+ "generating": "Создание",
+ "generationFailed": "Ошибка создания",
+ "generated": "Создано",
+ "generationFailedHint": "Ошибка создания — выберите язык и создайте заново.",
+ "noPreviewAvailable": "Предпросмотр недоступен",
+ "restart": "Перезапустить",
+ "detectedLanguage": "Обнаруженный язык: {{language}}"
+ },
+ "exportDialog": {
+ "title": "Экспорт",
+ "subtitle": "Рендеринг таймлайна в файл",
+ "addVideoBeforeExporting": "Добавьте видео перед экспортом.",
+ "quality": "Качество",
+ "qualitySmallerFile": "Меньший размер файла",
+ "qualityRecommended": "Рекомендуется",
+ "qualityMatchRecording": "Как в записи",
+ "frameRate": "Частота кадров",
+ "codec": "Кодек",
+ "codecBestCompatibility": "Лучшая совместимость",
+ "codecMaySupportVary": "Может не поддерживаться некоторыми системными кодировщиками",
+ "size": "Размер",
+ "loopGif": "Зациклить GIF",
+ "loopOn": "Зацикливание включено",
+ "loopOff": "Зацикливание выключено",
+ "pickFormatAndExport": "Выберите формат и нажмите «Экспорт», чтобы начать.",
+ "savedTo": "Сохранено в",
+ "exportFailedGeneric": "Ошибка экспорта.",
+ "writingFile": "Запись файла…",
+ "renderingFrames": "Рендеринг кадров",
+ "framesEta": "{{current}} / {{total}} кадров · осталось {{eta}} с",
+ "preparingEncoder": "Подготовка кодировщика…",
+ "close": "Закрыть",
+ "cancel": "Отмена",
+ "rendering": "Рендеринг…",
+ "saving": "Сохранение…",
+ "starting": "Запуск…",
+ "exportGif": "Экспортировать GIF",
+ "exportMp4": "Экспортировать MP4",
+ "exportedGif": "GIF экспортирован",
+ "exportedVideo": "Видео экспортировано",
+ "showInFolder": "Показать в папке",
+ "exportFailed": "Ошибка экспорта",
+ "failedToWriteFile": "Не удалось записать файл"
+ },
+ "inspector": {
+ "resetFocusPoint": "Сбросить точку фокуса",
+ "setColor": "Задать цвет {{color}}",
+ "trimHiddenDuration": "{{duration}} с исходного медиа скрыто из отредактированной таймлинии.",
+ "restoreDeleteTrim": "Восстановить (удалить обрезку)",
+ "collapseInspector": "Свернуть инспектор",
+ "captionsDescription": "Создайте субтитры с привязкой по словам на основе транскрипции и добавьте их на таймлинию.",
+ "generateCaptions": "Создать субтитры",
+ "cropDescription": "Перекадрируйте запись — выберите соотношение сторон и увеличьте область, которую нужно сохранить.",
+ "openCrop": "Открыть обрезку…"
+ },
+ "leftPanel": {
+ "mediaTitle": "Медиа",
+ "searchPlaceholder": "Поиск…",
+ "clearSearch": "Очистить поиск",
+ "emptyHint": "В этом проекте пока нет медиафайлов. Импортируйте видео ниже.",
+ "transcriptReadyBadge": "РАСШИФРОВКА ГОТОВА"
+ },
+ "leftRail": {
+ "chat": "Чат",
+ "media": "Медиа",
+ "ariaLabel": "Левые инструменты"
+ },
+ "chat": {
+ "changeProvider": "Сменить провайдера",
+ "back": "Назад",
+ "currentModel": "Текущая модель:",
+ "notSelected": "Не выбрано",
+ "loadingModels": "Загрузка моделей…",
+ "searchModels": "Поиск моделей…",
+ "fetchModelsFailed": "Не удалось получить актуальные модели ({{error}}); откройте настройки провайдера, чтобы ввести id модели вручную.",
+ "noModelsAvailable": "У этого провайдера нет доступных моделей.",
+ "noModelsMatch": "Нет моделей, соответствующих запросу.",
+ "noProvidersConnected": "Пока нет подключённых провайдеров.",
+ "selectModelFailed": "Не удалось выбрать модель",
+ "providerSettings": "Настройки провайдера…",
+ "applyEditsFailed": "Не удалось применить правки агента",
+ "chatFailed": "Ошибка чата",
+ "rewindFailed": "Ошибка отката",
+ "rewoundSuccess": "Откат к началу этого сообщения выполнен",
+ "notEnoughHistory": "Пока недостаточно истории для сжатия.",
+ "compactedSuccess": "Предыдущий контекст сжат",
+ "compactFailed": "Ошибка сжатия",
+ "createSessionFailed": "Не удалось создать беседу",
+ "deleteSessionFailed": "Не удалось удалить беседу",
+ "renameSessionFailed": "Не удалось переименовать беседу",
+ "reasoningEffortUpdateFailed": "Не удалось обновить уровень рассуждений",
+ "addSkipRangePrompt": "Добавить диапазон пропуска\nФормат: startSec-endSec (напр. 1.2-3.4)",
+ "addSkipRangeFormatError": "Используйте startSec-endSec, напр. 1.2-3.4",
+ "addSkipRangeOrderError": "endSec должен быть больше startSec.",
+ "addSkipRangeApplied": "Добавлен пропуск {{startSec}}–{{endSec}} с.",
+ "contextTooltip": "{{usedTokens}} / {{budgetTokens}} расчётных токенов",
+ "contextPercent": "{{percent}}% контекста",
+ "compactContext": "Сжать контекст",
+ "aiSettings": "Настройки ИИ",
+ "history": "История",
+ "newConversation": "Новая беседа",
+ "untitledConversation": "Беседа",
+ "clickToRename": "Нажмите, чтобы переименовать",
+ "renameConversation": "Переименовать беседу",
+ "deleteConversation": "Удалить беседу",
+ "confirmDeleteConversation": "Удалить «{{title}}»?",
+ "addSkipRange": "Добавить диапазон пропуска",
+ "skipButtonShort": "+ пропуск",
+ "emptyState": "Пока нет сообщений. Попросите агента вырезать паузы, уплотнить их или добавить субтитры.",
+ "authorUser": "Вы",
+ "authorAssistant": "OpenScreen",
+ "rewindToMessage": "Откатить к этому сообщению",
+ "copyMessage": "Скопировать сообщение",
+ "copiedToClipboard": "Скопировано в буфер обмена",
+ "copyFailed": "Не удалось скопировать",
+ "appliedPrefix": "применено:",
+ "thinking": "Думаю…",
+ "composerPlaceholder": "Опишите нужную правку.",
+ "modelLabel": "Модель",
+ "reasoningEffortLabel": "Уровень рассуждений",
+ "sendTitle": "Отправить (Enter)",
+ "send": "Отправить",
+ "rewindConfirmTitle": "Откатить сюда?",
+ "rewindConfirmBody": "Правки агента и последующие сообщения после этой точки будут отменены. Проект, беседа и состояние агента будут восстановлены.",
+ "rewindConfirm": "Откатить",
+ "configureModel": "Настроить модель ИИ",
+ "historyDialog": {
+ "title": "История бесед",
+ "subtitle": "Переключить или создать сессию",
+ "empty": "Пока нет бесед.",
+ "msgsCount": "{{count}} сообщ. · {{date}}"
+ }
+ },
+ "newProjectDialog": {
+ "title": "Новый проект",
+ "subtitle": "Выберите отправную точку и дайте ей название",
+ "nameLabel": "Название проекта",
+ "startingPointLabel": "Отправная точка",
+ "create": "Создать проект",
+ "defaultTitle": "Проект без названия",
+ "templates": {
+ "blankTitle": "Пустой проект",
+ "blankDesc": "Пустая таймлиния, готова к импорту",
+ "screenRecordingTitle": "Запись экрана",
+ "screenRecordingDesc": "Начать системный захват",
+ "importMediaDesc": "Видео, аудио, изображения с диска",
+ "fromTemplateTitle": "Из шаблона",
+ "fromTemplateDesc": "Готовая раскадровка"
+ }
+ },
+ "openProjectDialog": {
+ "title": "Открыть проект",
+ "subtitle": "Продолжите существующий проект или просмотрите файлы",
+ "searchPlaceholder": "Поиск проектов…",
+ "noMatches": "Нет проектов, соответствующих «{{query}}».",
+ "navigateHint": "для навигации ·",
+ "openHint": "чтобы открыть",
+ "browseFiles": "Обзор файлов…"
+ },
+ "editClipDialog": {
+ "title": "Изменить клип",
+ "adjustStart": "Настроить начало клипа",
+ "adjustEnd": "Настроить конец клипа",
+ "start": "Начало",
+ "end": "Конец",
+ "duration": "Длительность",
+ "reset": "Сбросить",
+ "apply": "Применить",
+ "pickClipTitle": "Выберите клип для редактирования",
+ "clipLabel": "Клип {{index}}"
+ },
+ "insertSourceDialog": {
+ "title": "Вставить источник",
+ "subtitle": "Куда разместить «{{assetLabel}}» на таймлинии?",
+ "addBefore": "Добавить перед",
+ "addBeforeDesc": "Вставляет весь источник перед целевым клипом.",
+ "addAfter": "Добавить после",
+ "addAfterDesc": "Вставляет весь источник после целевого клипа.",
+ "split": "Разделить здесь и вставить",
+ "splitDesc": "Разделяет целевой клип в точке сброса и вставляет источник между частями."
+ },
+ "cropDialog": {
+ "subtitle": "Перетащите область или её маркеры, чтобы настроить область обрезки",
+ "fieldX": "X",
+ "fieldY": "Y",
+ "fieldW": "Ш",
+ "fieldH": "В"
}
}
diff --git a/src/i18n/locales/ru/launch.json b/src/i18n/locales/ru/launch.json
index b41f07bab..0302fb8f1 100644
--- a/src/i18n/locales/ru/launch.json
+++ b/src/i18n/locales/ru/launch.json
@@ -10,6 +10,7 @@
"openProject": "Открыть проект",
"useVerticalTray": "Использовать вертикальную панель",
"useHorizontalTray": "Использовать горизонтальную панель",
+ "openStudio": "Открыть студию",
"openNotes": "Открыть заметки",
"openNotesPlaceholder": "Пишите заметки здесь...",
"notesToolbar": {
@@ -27,7 +28,12 @@
"disableSystemAudio": "Отключить системное аудио",
"enableMicrophone": "Включить микрофон",
"disableMicrophone": "Отключить микрофон",
- "defaultMicrophone": "Микрофон по умолчанию"
+ "defaultMicrophone": "Микрофон по умолчанию",
+ "systemAudio": "Системный звук",
+ "microphone": "Микрофон",
+ "on": "Вкл",
+ "off": "Выкл",
+ "inputDevice": "Устройство ввода"
},
"webcam": {
"enableWebcam": "Включить веб-камеру",
@@ -35,12 +41,17 @@
"defaultCamera": "Камера по умолчанию",
"searching": "Поиск...",
"noneFound": "Камера не найдена",
- "unavailable": "Камера недоступна"
+ "unavailable": "Камера недоступна",
+ "camera": "Камера",
+ "cameraDevice": "Устройство камеры"
},
"sourceSelector": {
"loading": "Загрузка источников...",
"screens": "Экраны ({{count}})",
"windows": "Окна ({{count}})",
+ "emptyTitle": "Экраны или окна не найдены",
+ "emptyDescription": "Если вы только что предоставили разрешение на запись экрана, перезагрузите этот выбор источника. На macOS может потребоваться заново открыть OpenScreen.",
+ "loadFailedDescription": "OpenScreen не удалось загрузить источники захвата. Перезагрузите этот выбор источника и попробуйте снова.",
"defaultSourceName": "Экран"
},
"recording": {
diff --git a/src/i18n/locales/ru/settings.json b/src/i18n/locales/ru/settings.json
index a77508f00..25cdc52e5 100644
--- a/src/i18n/locales/ru/settings.json
+++ b/src/i18n/locales/ru/settings.json
@@ -8,7 +8,8 @@
"title": "Режим фокуса",
"manual": "Ручной",
"auto": "Авто",
- "autoDescription": "Камера следует за записанной позицией курсора"
+ "autoDescription": "Камера следует за записанной позицией курсора",
+ "lockedDisclaimer": "Управляется глобальным переключателем автофокуса на таймлайне. Отключите его, чтобы задавать режим фокуса для каждого зума отдельно."
},
"threeD": {
"title": "3D вращение",
@@ -211,6 +212,7 @@
"errorLoadFailed": "Не удалось загрузить шрифт. Пожалуйста, проверьте правильность URL Google Fonts."
},
"cursor": {
+ "title": "Курсор",
"theme": "Стиль курсора",
"themeDefault": "По умолчанию",
"show": "Показывать курсор",
@@ -218,7 +220,8 @@
"smoothing": "Сглаживание",
"motionBlur": "Размытие движения",
"clickBounce": "Отскок при клике",
- "clipToBounds": "Обрезать по холсту"
+ "clipToBounds": "Обрезать по холсту",
+ "clipToBoundsDescription": "Удерживает курсор внутри кадра видео. Отключите, чтобы курсор мог выходить за края — полезно при увеличении или панорамировании."
},
"language": {
"title": "Язык"
@@ -226,5 +229,9 @@
"timeline": {
"title": "Шкала времени",
"waveform": "Показывать форму волны на треке обрезки"
+ },
+ "facets": {
+ "captions": "Субтитры",
+ "transcript": "Транскрипт"
}
}
diff --git a/src/i18n/locales/ru/timeline.json b/src/i18n/locales/ru/timeline.json
index a22027db5..913a6974e 100644
--- a/src/i18n/locales/ru/timeline.json
+++ b/src/i18n/locales/ru/timeline.json
@@ -2,6 +2,10 @@
"buttons": {
"addZoom": "Добавить масштабирование (Z)",
"suggestZooms": "Предложить масштабирование на основе курсора",
+ "autoZoomOn": "Автоматические предложения масштабирования включены — нажмите, чтобы убрать предложенные зумы",
+ "autoZoomOff": "Автоматические предложения масштабирования выключены — нажмите, чтобы предложить зумы по курсору",
+ "autoFocusAllOn": "Автофокус включён для всех зумов — нажмите, чтобы переключить все в ручной режим",
+ "autoFocusAllOff": "Включить автофокус для всех зумов (камера следует за курсором)",
"addTrim": "Добавить обрезку (T)",
"addAnnotation": "Добавить аннотацию (A)",
"addBlur": "Добавить размытие (B)",
@@ -57,5 +61,32 @@
"success": {
"addedZoomSuggestions": "Добавлено {{count}} предложение масштабирования на основе курсора",
"addedZoomSuggestionsPlural": "Добавлено {{count}} предложений масштабирования на основе курсора"
+ },
+ "toolbar": {
+ "autoEnhance": "Авто-улучшение",
+ "automaticZooms": "Автоматические зумы",
+ "automaticZoomsHint": "На основе записанного движения курсора",
+ "smartZoomsAndCuts": "Умные зумы и вырезки",
+ "smartZoomsAndCutsHint": "С помощью ИИ",
+ "comment": "Комментарий",
+ "aspectRatio": "Соотношение сторон",
+ "timelineTools": "Инструменты таймлайна",
+ "arrangeClips": "Упорядочить клипы",
+ "arrangeClipsHint": "Перетащите клипы ниже, чтобы изменить порядок, или добавьте новые",
+ "newAnnotation": "Новая аннотация",
+ "noAnnotationsYet": "Пока нет аннотаций",
+ "constantSpeed": "Постоянная скорость",
+ "noTrims": "Нет обрезок",
+ "dragToReorderHint": "Перетащите для изменения порядка · дважды щёлкните для редактирования точек входа/выхода",
+ "editInOutPoints": "Редактировать точки входа/выхода",
+ "deleteClip": "Удалить клип",
+ "dropToAdd": "Отпустите, чтобы добавить на таймлайн",
+ "importRecordingFirst": "Сначала импортируйте запись",
+ "noAutoZoomMoments": "Моменты для автозума не найдены",
+ "noAutoZoomMomentsDescription": "В этой записи нет данных о движении курсора, либо существующие зумы уже покрывают активные моменты.",
+ "addedAutoZoom": "Добавлен {{count}} автоматический зум",
+ "addedAutoZoomPlural": "Добавлено {{count}} автоматических зумов",
+ "autoZoomFailed": "Не удалось выполнить автозум",
+ "aiEnhanceRequested": "ИИ-агенту предложено улучшить эту запись"
}
}
diff --git a/src/i18n/locales/tr/dialogs.json b/src/i18n/locales/tr/dialogs.json
index 1b62e7072..196807fd3 100644
--- a/src/i18n/locales/tr/dialogs.json
+++ b/src/i18n/locales/tr/dialogs.json
@@ -57,9 +57,23 @@
"detailLoadProject": "Başka bir proje yüklemeden önce kaydetmek ister misiniz?",
"saveAndLoadProject": "Kaydet ve Proje Yükle",
"discardAndLoadProject": "Kaydetmeden Proje Yükle",
+ "newProject": "Yeni Proje",
+ "importVideo": "Video Dosyası İçe Aktar…",
"loadProject": "Proje Yükle…",
"saveProject": "Proje Kaydet…",
- "saveProjectAs": "Farklı Kaydet…"
+ "saveProjectAs": "Farklı Kaydet…",
+ "modal": {
+ "closeTitle": "Kapatmadan önce değişiklikler kaydedilsin mi?",
+ "closeBody": "Projenizde kaydedilmemiş değişiklikler var. Şimdi kaydedin, atın veya düzenleyicide kalın.",
+ "newTitle": "Yeni bir proje oluşturmadan önce değişiklikler kaydedilsin mi?",
+ "openTitle": "Başka bir projeyi açmadan önce değişiklikler kaydedilsin mi?",
+ "recordTitle": "Yeni bir kayıt başlatmadan önce değişiklikler kaydedilsin mi?",
+ "sharedBody": "Geçerli projede kaydedilmemiş değişiklikler var. Önce kaydedin, atın veya vazgeçin.",
+ "notSavedYet": "Geçerli proje henüz diske kaydedilmedi.",
+ "discard": "At",
+ "saveAndContinue": "Kaydet ve devam et",
+ "saving": "Kaydediliyor…"
+ }
},
"fileDialogs": {
"saveGif": "Dışa Aktarılan GIF'i Kaydet",
diff --git a/src/i18n/locales/tr/editor.json b/src/i18n/locales/tr/editor.json
index 32f10b22d..97ef65f6f 100644
--- a/src/i18n/locales/tr/editor.json
+++ b/src/i18n/locales/tr/editor.json
@@ -65,9 +65,12 @@
},
"emptyState": {
"title": "Açık proje yok",
- "description": "Düzenlemeye başlamak için bir video içe aktarın veya mevcut bir OpenScreen projesi yükleyin.",
- "importVideoButton": "Video Dosyası İçe Aktar…",
- "loadProjectButton": "Proje Yükle…",
+ "description": "Yeni bir proje oluşturun veya mevcut birini açın.",
+ "titleHasAsset": "Başlamak için bir video ekleyin",
+ "descriptionHasAsset": "Düzenlemeye başlamak için bir kayıt içe aktarın.",
+ "newProjectButton": "Yeni proje + video içe aktar",
+ "importVideoButton": "Video içe aktar",
+ "loadProjectButton": "Proje aç",
"supportedFormats": "Desteklenen formatlar: MP4, MOV, WebM, MKV, AVI, M4V, WMV",
"dragDropHint": "veya bir .openscreen proje dosyasını buraya sürükleyip bırakın",
"dropOverlay": "Açmak için proje dosyasını bırakın",
@@ -89,5 +92,263 @@
"annotation": "Açıklama",
"blur": "Bulanıklık"
}
+ },
+ "topbar": {
+ "toggleChatPanel": "Sohbet panelini aç/kapat",
+ "openProject": "Proje aç",
+ "newProject": "Yeni proje",
+ "saveProject": "Projeyi kaydet",
+ "unsaved": "Kaydedilmedi",
+ "saved": "Kaydedildi",
+ "switchToLightTheme": "Açık temaya geç",
+ "switchToDarkTheme": "Koyu temaya geç",
+ "toggleTheme": "Temayı değiştir",
+ "settings": "Ayarlar",
+ "export": "Dışa aktar",
+ "renameProject": "Projeyi yeniden adlandır",
+ "noProject": "Proje yok",
+ "changeLanguage": "Dili değiştir",
+ "editorMode": "Düzenleyici modu",
+ "modes": {
+ "media": "Medya",
+ "edit": "Düzenle",
+ "rec": "Kayıt"
+ }
+ },
+ "rec": {
+ "source": "Kaynak",
+ "systemAudio": "Sistem sesi",
+ "microphone": "Mikrofon",
+ "camera": "Kamera",
+ "cursorHighlight": "İmleç vurgusu",
+ "on": "Açık",
+ "off": "Kapalı",
+ "loading": "Yükleniyor…",
+ "noCameraFound": "Kamera bulunamadı",
+ "cameraAccessError": "Bu kameraya erişilemedi",
+ "startingCamera": "Kamera başlatılıyor…",
+ "turnOnCameraHint": "Canlı önizleme için kamerayı açın",
+ "entireScreen": "Tüm Ekran",
+ "cancel": "İptal",
+ "startRecording": "Kaydı başlat",
+ "startRecordingHint": "Kayıt widget'ını açar ve bu düzenleyici penceresini kapatır.",
+ "sourceModal": {
+ "screens": "Ekranlar ({{count}})",
+ "windows": "Pencereler ({{count}})",
+ "loadingSources": "Kaynaklar yükleniyor…",
+ "noScreensFound": "Ekran bulunamadı",
+ "noWindowsFound": "Pencere bulunamadı",
+ "cancel": "İptal"
+ }
+ },
+ "mediaStage": {
+ "openProjectFirst": "Önce bir proje açın",
+ "couldNotAddAsset": "Öğe eklenemedi",
+ "searchPlaceholder": "Medya ara…",
+ "dragHint": "Eklemek için bir klibi aşağıdaki zaman çizelgesine sürükleyin",
+ "emptyHint": "Henüz medya yok — başlamak için bir kayıt içe aktarın.",
+ "importMedia": "Medya içe aktar",
+ "added": "{{label}} eklendi",
+ "sourceTranscript": "Kaynak Metin Dökümü",
+ "close": "Kapat",
+ "transcriptReady": "Metin dökümü hazır",
+ "notGeneratedYet": "Henüz oluşturulmadı",
+ "regenerateAs": "Şu dilde yeniden oluştur",
+ "auto": "Otomatik",
+ "regenerate": "Yeniden oluştur",
+ "transcriptEmpty": "Metin dökümü boş.",
+ "notGeneratedHint": "Henüz oluşturulmadı — bir dil seçin ve yeniden oluştur'a tıklayın.",
+ "transcribing": "Metne dökülüyor",
+ "transcribingEllipsis": "Metne dökülüyor…",
+ "pendingTranscription": "Metne dökme bekliyor",
+ "transcriptionFailed": "Metne dökme başarısız oldu",
+ "noTranscript": "Transkript yok",
+ "generating": "Oluşturuluyor",
+ "generationFailed": "Oluşturma başarısız oldu",
+ "generated": "Oluşturuldu",
+ "generationFailedHint": "Oluşturma başarısız oldu — bir dil seçip yeniden oluşturun.",
+ "noPreviewAvailable": "Önizleme kullanılamıyor",
+ "restart": "Yeniden başlat",
+ "detectedLanguage": "Algılanan dil: {{language}}"
+ },
+ "exportDialog": {
+ "title": "Dışa Aktar",
+ "subtitle": "Zaman çizelgesini bir dosyaya işleyin",
+ "addVideoBeforeExporting": "Dışa aktarmadan önce bir video ekleyin.",
+ "quality": "Kalite",
+ "qualitySmallerFile": "Daha küçük dosya",
+ "qualityRecommended": "Önerilen",
+ "qualityMatchRecording": "Kayıtla eşleştir",
+ "frameRate": "Kare hızı",
+ "codec": "Codec",
+ "codecBestCompatibility": "En iyi uyumluluk",
+ "codecMaySupportVary": "Her sistem kodlayıcısı tarafından desteklenmeyebilir",
+ "size": "Boyut",
+ "loopGif": "GIF'i döngüye al",
+ "loopOn": "Döngü açık",
+ "loopOff": "Döngü kapalı",
+ "pickFormatAndExport": "Bir format seçin ve başlamak için Dışa Aktar'a basın.",
+ "savedTo": "Kaydedildiği yer",
+ "exportFailedGeneric": "Dışa aktarma başarısız oldu.",
+ "writingFile": "Dosya yazılıyor…",
+ "renderingFrames": "Kareler işleniyor",
+ "framesEta": "{{current}} / {{total}} kare · Kalan süre {{eta}}sn",
+ "preparingEncoder": "Kodlayıcı hazırlanıyor…",
+ "close": "Kapat",
+ "cancel": "İptal",
+ "rendering": "İşleniyor…",
+ "saving": "Kaydediliyor…",
+ "starting": "Başlatılıyor…",
+ "exportGif": "GIF Dışa Aktar",
+ "exportMp4": "MP4 Dışa Aktar",
+ "exportedGif": "GIF dışa aktarıldı",
+ "exportedVideo": "Video dışa aktarıldı",
+ "showInFolder": "Klasörde göster",
+ "exportFailed": "Dışa aktarma başarısız oldu",
+ "failedToWriteFile": "Dosya yazılamadı"
+ },
+ "inspector": {
+ "resetFocusPoint": "Odak noktasını sıfırla",
+ "setColor": "Rengi ayarla {{color}}",
+ "trimHiddenDuration": "Düzenlenen zaman çizelgesinden {{duration}} sn kaynak medya gizlendi.",
+ "restoreDeleteTrim": "Geri yükle (kırpmayı sil)",
+ "collapseInspector": "Denetleyiciyi daralt",
+ "captionsDescription": "Transkriptten kelime zamanlamalı altyazılar oluşturun ve zaman çizelgesine bırakın.",
+ "generateCaptions": "Altyazı oluştur",
+ "cropDescription": "Kaydı yeniden çerçeveleyin — bir en boy oranı seçin ve saklamak istediğiniz bölgeye yakınlaşın.",
+ "openCrop": "Kırpmayı aç…"
+ },
+ "leftPanel": {
+ "mediaTitle": "Medya",
+ "searchPlaceholder": "Ara…",
+ "clearSearch": "Aramayı temizle",
+ "emptyHint": "Bu projede henüz medya yok. Aşağıdan bir video içe aktarın.",
+ "transcriptReadyBadge": "TRANSKRİPT HAZIR"
+ },
+ "leftRail": {
+ "chat": "Sohbet",
+ "media": "Medya",
+ "ariaLabel": "Sol araçlar"
+ },
+ "chat": {
+ "changeProvider": "Sağlayıcıyı değiştir",
+ "back": "Geri",
+ "currentModel": "Geçerli model:",
+ "notSelected": "Seçilmedi",
+ "loadingModels": "Modeller yükleniyor…",
+ "searchModels": "Modellerde ara…",
+ "fetchModelsFailed": "Canlı modeller alınamadı ({{error}}); model kimliğini elle girmek için sağlayıcı ayarlarını açın.",
+ "noModelsAvailable": "Bu sağlayıcıdan kullanılabilir model yok.",
+ "noModelsMatch": "Bu aramayla eşleşen model yok.",
+ "noProvidersConnected": "Henüz bağlı sağlayıcı yok.",
+ "selectModelFailed": "Model seçilemedi",
+ "providerSettings": "Sağlayıcı ayarları…",
+ "applyEditsFailed": "Aracının düzenlemeleri uygulanamadı",
+ "chatFailed": "Sohbet başarısız oldu",
+ "rewindFailed": "Geri sarma başarısız oldu",
+ "rewoundSuccess": "O mesajın başına geri sarıldı",
+ "notEnoughHistory": "Henüz sıkıştırmak için yeterli geçmiş yok.",
+ "compactedSuccess": "Önceki bağlam sıkıştırıldı",
+ "compactFailed": "Sıkıştırma başarısız oldu",
+ "createSessionFailed": "Konuşma oluşturulamadı",
+ "deleteSessionFailed": "Konuşma silinemedi",
+ "renameSessionFailed": "Konuşma yeniden adlandırılamadı",
+ "reasoningEffortUpdateFailed": "Akıl yürütme çabası güncellenemedi",
+ "addSkipRangePrompt": "Atlama aralığı ekle\nBiçim: startSec-endSec (örn. 1.2-3.4)",
+ "addSkipRangeFormatError": "startSec-endSec kullanın, örn. 1.2-3.4",
+ "addSkipRangeOrderError": "endSec, startSec'ten büyük olmalıdır.",
+ "addSkipRangeApplied": "{{startSec}}–{{endSec}} sn atlama eklendi.",
+ "contextTooltip": "{{usedTokens}} / {{budgetTokens}} tahmini belirteç",
+ "contextPercent": "%{{percent}} bağlam",
+ "compactContext": "Bağlamı sıkıştır",
+ "aiSettings": "Yapay zeka ayarları",
+ "history": "Geçmiş",
+ "newConversation": "Yeni konuşma",
+ "untitledConversation": "Konuşma",
+ "clickToRename": "Yeniden adlandırmak için tıklayın",
+ "renameConversation": "Konuşmayı yeniden adlandır",
+ "deleteConversation": "Konuşmayı sil",
+ "confirmDeleteConversation": "\"{{title}}\" silinsin mi?",
+ "addSkipRange": "Atlama aralığı ekle",
+ "skipButtonShort": "+ atla",
+ "emptyState": "Henüz mesaj yok. Aracıdan sessizlikleri kesmesini, duraklamaları sıkılaştırmasını veya altyazı eklemesini isteyin.",
+ "authorUser": "Siz",
+ "authorAssistant": "OpenScreen",
+ "rewindToMessage": "Bu mesaja geri sar",
+ "copyMessage": "Mesajı kopyala",
+ "copiedToClipboard": "Panoya kopyalandı",
+ "copyFailed": "Kopyalanamadı",
+ "appliedPrefix": "uygulandı:",
+ "thinking": "Düşünüyor…",
+ "composerPlaceholder": "İstediğiniz düzenlemeyi tanımlayın.",
+ "modelLabel": "Model",
+ "reasoningEffortLabel": "Akıl yürütme çabası",
+ "sendTitle": "Gönder (Enter)",
+ "send": "Gönder",
+ "rewindConfirmTitle": "Buraya geri sarılsın mı?",
+ "rewindConfirmBody": "Bu noktadan sonraki aracı düzenlemeleri ve takip eden turlar geri alınacak. Proje, konuşma ve aracı durumu geri yüklenecek.",
+ "rewindConfirm": "Geri sar",
+ "configureModel": "Yapay zeka modelini yapılandır",
+ "historyDialog": {
+ "title": "Konuşma geçmişi",
+ "subtitle": "Oturum değiştir veya oluştur",
+ "empty": "Henüz konuşma yok.",
+ "msgsCount": "{{count}} mesaj · {{date}}"
+ }
+ },
+ "newProjectDialog": {
+ "title": "Yeni proje",
+ "subtitle": "Bir başlangıç noktası seçin ve ad verin",
+ "nameLabel": "Proje adı",
+ "startingPointLabel": "Başlangıç noktası",
+ "create": "Proje oluştur",
+ "defaultTitle": "Adsız proje",
+ "templates": {
+ "blankTitle": "Boş proje",
+ "blankDesc": "İçe aktarmaya hazır boş zaman çizelgesi",
+ "screenRecordingTitle": "Ekran kaydı",
+ "screenRecordingDesc": "Sistem yakalamayı başlat",
+ "importMediaDesc": "Diskten video, ses, görsel",
+ "fromTemplateTitle": "Şablondan",
+ "fromTemplateDesc": "Önceden tanımlanmış hikaye tahtası"
+ }
+ },
+ "openProjectDialog": {
+ "title": "Proje aç",
+ "subtitle": "Mevcut bir projeye devam edin veya dosyalarınıza göz atın",
+ "searchPlaceholder": "Projelerde ara…",
+ "noMatches": "\"{{query}}\" ile eşleşen proje yok.",
+ "navigateHint": "gezinmek için ·",
+ "openHint": "açmak için",
+ "browseFiles": "Dosyalara göz at…"
+ },
+ "editClipDialog": {
+ "title": "Klibi düzenle",
+ "adjustStart": "Klip başlangıcını ayarla",
+ "adjustEnd": "Klip bitişini ayarla",
+ "start": "Başlangıç",
+ "end": "Bitiş",
+ "duration": "Süre",
+ "reset": "Sıfırla",
+ "apply": "Uygula",
+ "pickClipTitle": "Düzenlenecek klibi seçin",
+ "clipLabel": "Klip {{index}}"
+ },
+ "insertSourceDialog": {
+ "title": "Kaynağı ekle",
+ "subtitle": "\"{{assetLabel}}\" zaman çizelgesinde nereye yerleştirilsin?",
+ "addBefore": "Önce ekle",
+ "addBeforeDesc": "Kaynağın tamamını hedef klibin önüne ekler.",
+ "addAfter": "Sonra ekle",
+ "addAfterDesc": "Kaynağın tamamını hedef klibin arkasına ekler.",
+ "split": "Burada böl ve ekle",
+ "splitDesc": "Hedef klibi bırakma noktasında böler ve kaynağı arasına ekler."
+ },
+ "cropDialog": {
+ "subtitle": "Kırpma alanını ayarlamak için bölgeyi veya tutamaçlarını sürükleyin",
+ "fieldX": "X",
+ "fieldY": "Y",
+ "fieldW": "G",
+ "fieldH": "Y"
}
}
diff --git a/src/i18n/locales/tr/launch.json b/src/i18n/locales/tr/launch.json
index d30ddd0bc..ad6431e39 100644
--- a/src/i18n/locales/tr/launch.json
+++ b/src/i18n/locales/tr/launch.json
@@ -10,6 +10,7 @@
"openProject": "Proje aç",
"useVerticalTray": "Dikey araç çubuğunu kullan",
"useHorizontalTray": "Yatay araç çubuğunu kullan",
+ "openStudio": "Stüdyoyu aç",
"openNotes": "Notları aç",
"openNotesPlaceholder": "Notlarınızı buraya yazın...",
"notesToolbar": {
@@ -27,7 +28,12 @@
"disableSystemAudio": "Sistem sesini devre dışı bırak",
"enableMicrophone": "Mikrofonu etkinleştir",
"disableMicrophone": "Mikrofonu devre dışı bırak",
- "defaultMicrophone": "Varsayılan Mikrofon"
+ "defaultMicrophone": "Varsayılan Mikrofon",
+ "systemAudio": "Sistem sesi",
+ "microphone": "Mikrofon",
+ "on": "Açık",
+ "off": "Kapalı",
+ "inputDevice": "Giriş cihazı"
},
"webcam": {
"enableWebcam": "Kamerayı etkinleştir",
@@ -35,7 +41,9 @@
"defaultCamera": "Varsayılan Kamera",
"searching": "Aranıyor...",
"noneFound": "Kamera bulunamadı",
- "unavailable": "Kamera kullanılamıyor"
+ "unavailable": "Kamera kullanılamıyor",
+ "camera": "Kamera",
+ "cameraDevice": "Kamera cihazı"
},
"cursor": {
"useEditableCursor": "Düzenlenebilir imleci kullan",
@@ -45,6 +53,9 @@
"loading": "Kaynaklar yükleniyor...",
"screens": "Ekranlar ({{count}})",
"windows": "Pencereler ({{count}})",
+ "emptyTitle": "Ekran veya pencere bulunamadı",
+ "emptyDescription": "Ekran kaydı iznini az önce verdiyseniz bu seçiciyi yeniden yükleyin. macOS'ta OpenScreen'i yeniden açmanız gerekebilir.",
+ "loadFailedDescription": "OpenScreen yakalama kaynaklarını yükleyemedi. Bu seçiciyi yeniden yükleyip tekrar deneyin.",
"defaultSourceName": "Ekran"
},
"recording": {
diff --git a/src/i18n/locales/tr/settings.json b/src/i18n/locales/tr/settings.json
index a1d80f481..f591f3df3 100644
--- a/src/i18n/locales/tr/settings.json
+++ b/src/i18n/locales/tr/settings.json
@@ -8,7 +8,8 @@
"title": "Odak Modu",
"manual": "Manuel",
"auto": "Otomatik",
- "autoDescription": "Kamera kaydedilen imleç konumunu takip eder"
+ "autoDescription": "Kamera kaydedilen imleç konumunu takip eder",
+ "lockedDisclaimer": "Zaman çizelgesindeki genel Otomatik Odak anahtarı tarafından kontrol edilir. Odak modunu yakınlaştırma başına ayarlamak için kapatın."
},
"threeD": {
"title": "3D Döndürme",
@@ -135,8 +136,6 @@
"textPlaceholder": "Metninizi girin...",
"fontStyle": "Yazı Tipi Stili",
"selectStyle": "Stil seçin",
- "textAnimation": "Metin Animasyonu",
- "selectAnimation": "Animasyon seçin",
"size": "Boyut",
"customFonts": "Özel Yazı Tipleri",
"textColor": "Metin Rengi",
@@ -182,6 +181,17 @@
"modern": "Modern",
"clean": "Temiz"
},
+ "textAnimation": {
+ "title": "Metin Animasyonu",
+ "selectAnimation": "Animasyon seçin",
+ "none": "Yok",
+ "fade": "Belirme",
+ "rise": "Yükselme",
+ "pop": "Fırlama",
+ "slideLeft": "Sola Kaydırma",
+ "typewriter": "Daktilo",
+ "pulse": "Nabız"
+ },
"customFont": {
"dialogTitle": "Google Yazı Tipi Ekle",
"urlLabel": "Google Fonts İçe Aktarım URL'si",
@@ -202,6 +212,7 @@
"errorLoadFailed": "Yazı tipi yüklenemedi. Lütfen Google Fonts URL'sinin doğruluğunu kontrol edin."
},
"cursor": {
+ "title": "İmleç",
"theme": "İmleç Stili",
"themeDefault": "Varsayılan",
"show": "İmleci Göster",
@@ -209,7 +220,8 @@
"smoothing": "Yumuşatma",
"motionBlur": "Hareket Bulanıklığı",
"clickBounce": "Tıklama Sıçraması",
- "clipToBounds": "Tuvale Kırp"
+ "clipToBounds": "Tuvale Kırp",
+ "clipToBoundsDescription": "İmleci video kare içinde tutar. İmlecin kenarları aşmasına izin vermek için kapatın — yakınlaştırma veya kaydırma yapılırken kullanışlıdır."
},
"language": {
"title": "Dil"
@@ -217,5 +229,9 @@
"timeline": {
"title": "Zaman Tüneli",
"waveform": "Kırpma Parçasında Ses Dalgasını Göster"
+ },
+ "facets": {
+ "captions": "Altyazılar",
+ "transcript": "Metin Dökümü"
}
}
diff --git a/src/i18n/locales/tr/timeline.json b/src/i18n/locales/tr/timeline.json
index cae1d1f33..7c49cbf1a 100644
--- a/src/i18n/locales/tr/timeline.json
+++ b/src/i18n/locales/tr/timeline.json
@@ -2,6 +2,10 @@
"buttons": {
"addZoom": "Yakınlaştırma Ekle (Z)",
"suggestZooms": "İmleçten Yakınlaştırma Öner",
+ "autoZoomOn": "Otomatik yakınlaştırma önerileri açık — önerilen yakınlaştırmaları kaldırmak için tıklayın",
+ "autoZoomOff": "Otomatik yakınlaştırma önerileri kapalı — imleçten yakınlaştırma önermek için tıklayın",
+ "autoFocusAllOn": "Tüm yakınlaştırmalarda Otomatik Odak açık — hepsini manuel yapmak için tıklayın",
+ "autoFocusAllOff": "Tüm yakınlaştırmalarda Otomatik Odağı aç (kamera imleci takip eder)",
"addTrim": "Kırpma Ekle (T)",
"addAnnotation": "Açıklama Ekle (A)",
"addSpeed": "Hız Ekle (S)",
@@ -57,5 +61,32 @@
"success": {
"addedZoomSuggestions": "{{count}} imleç tabanlı yakınlaştırma önerisi eklendi",
"addedZoomSuggestionsPlural": "{{count}} imleç tabanlı yakınlaştırma önerisi eklendi"
+ },
+ "toolbar": {
+ "autoEnhance": "Otomatik iyileştirme",
+ "automaticZooms": "Otomatik yakınlaştırmalar",
+ "automaticZoomsHint": "Kaydedilen imleç hareketinden",
+ "smartZoomsAndCuts": "Akıllı yakınlaştırma + kırpma",
+ "smartZoomsAndCutsHint": "Yapay zeka ile",
+ "comment": "Yorum",
+ "aspectRatio": "En-boy oranı",
+ "timelineTools": "Zaman çizelgesi araçları",
+ "arrangeClips": "Klipleri düzenle",
+ "arrangeClipsHint": "Yeniden sıralamak için aşağıdaki klipleri sürükleyin veya yenilerini bırakın",
+ "newAnnotation": "Yeni açıklama",
+ "noAnnotationsYet": "Henüz açıklama yok",
+ "constantSpeed": "Sabit hız",
+ "noTrims": "Kırpma yok",
+ "dragToReorderHint": "Yeniden sıralamak için sürükleyin · giriş/çıkış noktalarını düzenlemek için çift tıklayın",
+ "editInOutPoints": "Giriş/çıkış noktalarını düzenle",
+ "deleteClip": "Klibi sil",
+ "dropToAdd": "Zaman çizelgesine eklemek için bırakın",
+ "importRecordingFirst": "Önce bir kayıt içe aktarın",
+ "noAutoZoomMoments": "Otomatik yakınlaştırma anı bulunamadı",
+ "noAutoZoomMomentsDescription": "Bu kayıtta imleç hareket verisi yok veya mevcut yakınlaştırmalar zaten yoğun anları kapsıyor.",
+ "addedAutoZoom": "{{count}} otomatik yakınlaştırma eklendi",
+ "addedAutoZoomPlural": "{{count}} otomatik yakınlaştırma eklendi",
+ "autoZoomFailed": "Otomatik yakınlaştırma başarısız oldu",
+ "aiEnhanceRequested": "Yapay zeka aracısından bu kaydı iyileştirmesi istendi"
}
}
diff --git a/src/i18n/locales/vi/dialogs.json b/src/i18n/locales/vi/dialogs.json
index b7216ad1d..644d2ba02 100644
--- a/src/i18n/locales/vi/dialogs.json
+++ b/src/i18n/locales/vi/dialogs.json
@@ -57,9 +57,23 @@
"detailLoadProject": "Bạn có muốn lưu dự án của mình trước khi tải dự án khác không?",
"saveAndLoadProject": "Lưu & Tải dự án",
"discardAndLoadProject": "Bỏ qua & Tải dự án",
+ "newProject": "Dự án mới",
+ "importVideo": "Nhập tệp video…",
"loadProject": "Tải dự án…",
"saveProject": "Lưu dự án…",
- "saveProjectAs": "Lưu dự án thành…"
+ "saveProjectAs": "Lưu dự án thành…",
+ "modal": {
+ "closeTitle": "Lưu thay đổi trước khi đóng?",
+ "closeBody": "Dự án của bạn có các thay đổi chưa lưu. Lưu ngay, hủy bỏ, hoặc ở lại trình chỉnh sửa.",
+ "newTitle": "Lưu thay đổi trước khi tạo dự án mới?",
+ "openTitle": "Lưu thay đổi trước khi mở dự án khác?",
+ "recordTitle": "Lưu thay đổi trước khi bắt đầu bản ghi mới?",
+ "sharedBody": "Dự án hiện tại có các thay đổi chưa lưu. Lưu trước, hủy bỏ, hoặc hủy thao tác.",
+ "notSavedYet": "Dự án hiện tại chưa được lưu vào ổ đĩa.",
+ "discard": "Hủy bỏ",
+ "saveAndContinue": "Lưu và tiếp tục",
+ "saving": "Đang lưu…"
+ }
},
"fileDialogs": {
"saveGif": "Lưu GIF đã xuất",
diff --git a/src/i18n/locales/vi/editor.json b/src/i18n/locales/vi/editor.json
index 838599646..f1246c62e 100644
--- a/src/i18n/locales/vi/editor.json
+++ b/src/i18n/locales/vi/editor.json
@@ -65,9 +65,12 @@
},
"emptyState": {
"title": "Không có dự án nào được mở",
- "description": "Nhập video để bắt đầu chỉnh sửa hoặc tải một dự án OpenScreen hiện có.",
- "importVideoButton": "Nhập tệp video…",
- "loadProjectButton": "Tải dự án…",
+ "description": "Tạo dự án mới hoặc mở một dự án hiện có.",
+ "titleHasAsset": "Thêm video để bắt đầu",
+ "descriptionHasAsset": "Nhập một bản ghi để bắt đầu chỉnh sửa.",
+ "newProjectButton": "Dự án mới + nhập video",
+ "importVideoButton": "Nhập video",
+ "loadProjectButton": "Mở dự án",
"supportedFormats": "Định dạng được hỗ trợ: MP4, MOV, WebM, MKV, AVI, M4V, WMV",
"dragDropHint": "hoặc kéo và thả tệp dự án .openscreen vào đây",
"dropOverlay": "Thả tệp dự án để mở",
@@ -89,5 +92,263 @@
"annotation": "Văn bản",
"blur": "Làm mờ"
}
+ },
+ "topbar": {
+ "toggleChatPanel": "Bật/tắt bảng trò chuyện",
+ "openProject": "Mở dự án",
+ "newProject": "Dự án mới",
+ "saveProject": "Lưu dự án",
+ "unsaved": "Chưa lưu",
+ "saved": "Đã lưu",
+ "switchToLightTheme": "Chuyển sang giao diện sáng",
+ "switchToDarkTheme": "Chuyển sang giao diện tối",
+ "toggleTheme": "Đổi giao diện",
+ "settings": "Cài đặt",
+ "export": "Xuất",
+ "renameProject": "Đổi tên dự án",
+ "noProject": "Không có dự án",
+ "changeLanguage": "Đổi ngôn ngữ",
+ "editorMode": "Chế độ trình chỉnh sửa",
+ "modes": {
+ "media": "Media",
+ "edit": "Chỉnh sửa",
+ "rec": "Ghi hình"
+ }
+ },
+ "rec": {
+ "source": "Nguồn",
+ "systemAudio": "Âm thanh hệ thống",
+ "microphone": "Micro",
+ "camera": "Máy ảnh",
+ "cursorHighlight": "Làm nổi bật con trỏ",
+ "on": "Bật",
+ "off": "Tắt",
+ "loading": "Đang tải…",
+ "noCameraFound": "Không tìm thấy máy ảnh",
+ "cameraAccessError": "Không thể truy cập máy ảnh này",
+ "startingCamera": "Đang khởi động máy ảnh…",
+ "turnOnCameraHint": "Bật máy ảnh để xem trước trực tiếp",
+ "entireScreen": "Toàn màn hình",
+ "cancel": "Hủy",
+ "startRecording": "Bắt đầu ghi hình",
+ "startRecordingHint": "Mở widget ghi hình và đóng cửa sổ trình chỉnh sửa này.",
+ "sourceModal": {
+ "screens": "Màn hình ({{count}})",
+ "windows": "Cửa sổ ({{count}})",
+ "loadingSources": "Đang tải nguồn…",
+ "noScreensFound": "Không tìm thấy màn hình",
+ "noWindowsFound": "Không tìm thấy cửa sổ",
+ "cancel": "Hủy"
+ }
+ },
+ "mediaStage": {
+ "openProjectFirst": "Hãy mở một dự án trước",
+ "couldNotAddAsset": "Không thể thêm tệp",
+ "searchPlaceholder": "Tìm kiếm media…",
+ "dragHint": "Kéo một clip vào dòng thời gian bên dưới để thêm",
+ "emptyHint": "Chưa có media nào — nhập một bản ghi để bắt đầu.",
+ "importMedia": "Nhập media",
+ "added": "Đã thêm {{label}}",
+ "sourceTranscript": "Bản ghi lời thoại nguồn",
+ "close": "Đóng",
+ "transcriptReady": "Bản ghi lời thoại đã sẵn sàng",
+ "notGeneratedYet": "Chưa được tạo",
+ "regenerateAs": "Tạo lại bằng",
+ "auto": "Tự động",
+ "regenerate": "Tạo lại",
+ "transcriptEmpty": "Bản ghi lời thoại trống.",
+ "notGeneratedHint": "Chưa được tạo — chọn ngôn ngữ và nhấp vào tạo lại.",
+ "transcribing": "Đang phiên âm",
+ "transcribingEllipsis": "Đang phiên âm…",
+ "pendingTranscription": "Đang chờ phiên âm",
+ "transcriptionFailed": "Phiên âm thất bại",
+ "noTranscript": "Không có bản ghi lời thoại",
+ "generating": "Đang tạo",
+ "generationFailed": "Tạo thất bại",
+ "generated": "Đã tạo",
+ "generationFailedHint": "Tạo thất bại — chọn ngôn ngữ và tạo lại.",
+ "noPreviewAvailable": "Không có bản xem trước",
+ "restart": "Bắt đầu lại",
+ "detectedLanguage": "Ngôn ngữ phát hiện: {{language}}"
+ },
+ "exportDialog": {
+ "title": "Xuất",
+ "subtitle": "Kết xuất dòng thời gian thành tệp",
+ "addVideoBeforeExporting": "Thêm video trước khi xuất.",
+ "quality": "Chất lượng",
+ "qualitySmallerFile": "Tệp nhỏ hơn",
+ "qualityRecommended": "Đề xuất",
+ "qualityMatchRecording": "Khớp với bản ghi",
+ "frameRate": "Tốc độ khung hình",
+ "codec": "Codec",
+ "codecBestCompatibility": "Tương thích tốt nhất",
+ "codecMaySupportVary": "Có thể không được hỗ trợ bởi mọi bộ mã hóa hệ thống",
+ "size": "Kích thước",
+ "loopGif": "Lặp GIF",
+ "loopOn": "Lặp bật",
+ "loopOff": "Lặp tắt",
+ "pickFormatAndExport": "Chọn định dạng và nhấn Xuất để bắt đầu.",
+ "savedTo": "Đã lưu vào",
+ "exportFailedGeneric": "Xuất thất bại.",
+ "writingFile": "Đang ghi tệp…",
+ "renderingFrames": "Đang kết xuất khung hình",
+ "framesEta": "{{current}} / {{total}} khung hình · Còn lại {{eta}} giây",
+ "preparingEncoder": "Đang chuẩn bị bộ mã hóa…",
+ "close": "Đóng",
+ "cancel": "Hủy",
+ "rendering": "Đang kết xuất…",
+ "saving": "Đang lưu…",
+ "starting": "Đang bắt đầu…",
+ "exportGif": "Xuất GIF",
+ "exportMp4": "Xuất MP4",
+ "exportedGif": "Đã xuất GIF",
+ "exportedVideo": "Đã xuất video",
+ "showInFolder": "Hiện trong thư mục",
+ "exportFailed": "Xuất thất bại",
+ "failedToWriteFile": "Không thể ghi tệp"
+ },
+ "inspector": {
+ "resetFocusPoint": "Đặt lại điểm lấy nét",
+ "setColor": "Đặt màu {{color}}",
+ "trimHiddenDuration": "{{duration}}s media gốc bị ẩn khỏi dòng thời gian đã chỉnh sửa.",
+ "restoreDeleteTrim": "Khôi phục (xóa cắt)",
+ "collapseInspector": "Thu gọn bảng kiểm tra",
+ "captionsDescription": "Tạo phụ đề đồng bộ theo từng từ từ bản ghi lời thoại và thả vào dòng thời gian.",
+ "generateCaptions": "Tạo phụ đề",
+ "cropDescription": "Đóng khung lại bản ghi — chọn tỷ lệ khung hình và phóng to vào vùng bạn muốn giữ lại.",
+ "openCrop": "Mở cắt…"
+ },
+ "leftPanel": {
+ "mediaTitle": "Media",
+ "searchPlaceholder": "Tìm kiếm…",
+ "clearSearch": "Xóa tìm kiếm",
+ "emptyHint": "Chưa có media nào trong dự án này. Nhập video bên dưới.",
+ "transcriptReadyBadge": "BẢN GHI LỜI THOẠI ĐÃ SẴN SÀNG"
+ },
+ "leftRail": {
+ "chat": "Trò chuyện",
+ "media": "Media",
+ "ariaLabel": "Công cụ bên trái"
+ },
+ "chat": {
+ "changeProvider": "Đổi nhà cung cấp",
+ "back": "Quay lại",
+ "currentModel": "Mô hình hiện tại:",
+ "notSelected": "Chưa chọn",
+ "loadingModels": "Đang tải mô hình…",
+ "searchModels": "Tìm kiếm mô hình…",
+ "fetchModelsFailed": "Không thể tải danh sách mô hình trực tiếp ({{error}}); mở cài đặt nhà cung cấp để nhập id mô hình thủ công.",
+ "noModelsAvailable": "Không có mô hình nào khả dụng từ nhà cung cấp này.",
+ "noModelsMatch": "Không có mô hình nào khớp với tìm kiếm này.",
+ "noProvidersConnected": "Chưa có nhà cung cấp nào được kết nối.",
+ "selectModelFailed": "Không thể chọn mô hình",
+ "providerSettings": "Cài đặt nhà cung cấp…",
+ "applyEditsFailed": "Không thể áp dụng chỉnh sửa của tác nhân",
+ "chatFailed": "Trò chuyện thất bại",
+ "rewindFailed": "Tua lại thất bại",
+ "rewoundSuccess": "Đã tua lại đến đầu tin nhắn đó",
+ "notEnoughHistory": "Chưa đủ lịch sử để nén.",
+ "compactedSuccess": "Đã nén ngữ cảnh trước đó",
+ "compactFailed": "Nén thất bại",
+ "createSessionFailed": "Không thể tạo cuộc trò chuyện",
+ "deleteSessionFailed": "Không thể xóa cuộc trò chuyện",
+ "renameSessionFailed": "Không thể đổi tên cuộc trò chuyện",
+ "reasoningEffortUpdateFailed": "Không thể cập nhật mức độ suy luận",
+ "addSkipRangePrompt": "Thêm khoảng bỏ qua\nĐịnh dạng: startSec-endSec (vd. 1.2-3.4)",
+ "addSkipRangeFormatError": "Dùng định dạng startSec-endSec, vd. 1.2-3.4",
+ "addSkipRangeOrderError": "endSec phải lớn hơn startSec.",
+ "addSkipRangeApplied": "Đã thêm khoảng bỏ qua {{startSec}}–{{endSec}}s.",
+ "contextTooltip": "{{usedTokens}} / {{budgetTokens}} token ước tính",
+ "contextPercent": "{{percent}}% ngữ cảnh",
+ "compactContext": "Nén ngữ cảnh",
+ "aiSettings": "Cài đặt AI",
+ "history": "Lịch sử",
+ "newConversation": "Cuộc trò chuyện mới",
+ "untitledConversation": "Cuộc trò chuyện",
+ "clickToRename": "Nhấp để đổi tên",
+ "renameConversation": "Đổi tên cuộc trò chuyện",
+ "deleteConversation": "Xóa cuộc trò chuyện",
+ "confirmDeleteConversation": "Xóa \"{{title}}\"?",
+ "addSkipRange": "Thêm khoảng bỏ qua",
+ "skipButtonShort": "+ bỏ qua",
+ "emptyState": "Chưa có tin nhắn nào. Yêu cầu tác nhân cắt khoảng lặng, rút ngắn khoảng dừng hoặc thêm phụ đề.",
+ "authorUser": "Bạn",
+ "authorAssistant": "OpenScreen",
+ "rewindToMessage": "Tua lại đến tin nhắn này",
+ "copyMessage": "Sao chép tin nhắn",
+ "copiedToClipboard": "Đã sao chép vào bộ nhớ tạm",
+ "copyFailed": "Không thể sao chép",
+ "appliedPrefix": "đã áp dụng:",
+ "thinking": "Đang suy nghĩ…",
+ "composerPlaceholder": "Mô tả chỉnh sửa bạn muốn.",
+ "modelLabel": "Mô hình",
+ "reasoningEffortLabel": "Mức độ suy luận",
+ "sendTitle": "Gửi (Enter)",
+ "send": "Gửi",
+ "rewindConfirmTitle": "Tua lại đến đây?",
+ "rewindConfirmBody": "Các chỉnh sửa của tác nhân và các lượt tiếp theo sau điểm này sẽ được khôi phục lại. Dự án, cuộc trò chuyện và trạng thái tác nhân sẽ được khôi phục.",
+ "rewindConfirm": "Tua lại",
+ "configureModel": "Cấu hình mô hình AI",
+ "historyDialog": {
+ "title": "Lịch sử trò chuyện",
+ "subtitle": "Chuyển đổi hoặc tạo phiên",
+ "empty": "Chưa có cuộc trò chuyện nào.",
+ "msgsCount": "{{count}} tin nhắn · {{date}}"
+ }
+ },
+ "newProjectDialog": {
+ "title": "Dự án mới",
+ "subtitle": "Chọn điểm bắt đầu và đặt tên cho nó",
+ "nameLabel": "Tên dự án",
+ "startingPointLabel": "Điểm bắt đầu",
+ "create": "Tạo dự án",
+ "defaultTitle": "Dự án chưa đặt tên",
+ "templates": {
+ "blankTitle": "Dự án trống",
+ "blankDesc": "Dòng thời gian trống, sẵn sàng nhập",
+ "screenRecordingTitle": "Ghi màn hình",
+ "screenRecordingDesc": "Bắt đầu chụp hệ thống",
+ "importMediaDesc": "Video, âm thanh, hình ảnh từ ổ đĩa",
+ "fromTemplateTitle": "Từ mẫu",
+ "fromTemplateDesc": "Bảng phân cảnh dựng sẵn"
+ }
+ },
+ "openProjectDialog": {
+ "title": "Mở dự án",
+ "subtitle": "Tiếp tục một dự án hiện có hoặc duyệt tệp của bạn",
+ "searchPlaceholder": "Tìm kiếm dự án…",
+ "noMatches": "Không có dự án nào khớp với \"{{query}}\".",
+ "navigateHint": "để điều hướng ·",
+ "openHint": "để mở",
+ "browseFiles": "Duyệt tệp…"
+ },
+ "editClipDialog": {
+ "title": "Chỉnh sửa clip",
+ "adjustStart": "Điều chỉnh điểm bắt đầu clip",
+ "adjustEnd": "Điều chỉnh điểm kết thúc clip",
+ "start": "Bắt đầu",
+ "end": "Kết thúc",
+ "duration": "Thời lượng",
+ "reset": "Đặt lại",
+ "apply": "Áp dụng",
+ "pickClipTitle": "Chọn clip để chỉnh sửa",
+ "clipLabel": "Clip {{index}}"
+ },
+ "insertSourceDialog": {
+ "title": "Chèn nguồn",
+ "subtitle": "Đặt \"{{assetLabel}}\" ở đâu trên dòng thời gian?",
+ "addBefore": "Thêm trước",
+ "addBeforeDesc": "Chèn toàn bộ nguồn trước clip mục tiêu.",
+ "addAfter": "Thêm sau",
+ "addAfterDesc": "Chèn toàn bộ nguồn sau clip mục tiêu.",
+ "split": "Cắt tại đây và chèn",
+ "splitDesc": "Cắt clip mục tiêu tại điểm thả và chèn nguồn vào giữa."
+ },
+ "cropDialog": {
+ "subtitle": "Kéo vùng hoặc các điểm điều khiển để điều chỉnh vùng cắt",
+ "fieldX": "X",
+ "fieldY": "Y",
+ "fieldW": "R",
+ "fieldH": "C"
}
}
diff --git a/src/i18n/locales/vi/launch.json b/src/i18n/locales/vi/launch.json
index c9f3c3bf4..04c41a8ff 100644
--- a/src/i18n/locales/vi/launch.json
+++ b/src/i18n/locales/vi/launch.json
@@ -10,6 +10,7 @@
"openProject": "Mở dự án",
"useVerticalTray": "Dùng khay dọc",
"useHorizontalTray": "Dùng khay ngang",
+ "openStudio": "Mở Studio",
"openNotes": "Mở ghi chú",
"openNotesPlaceholder": "Ghi chú của bạn tại đây...",
"notesToolbar": {
@@ -27,7 +28,12 @@
"disableSystemAudio": "Tắt âm thanh hệ thống",
"enableMicrophone": "Bật micro",
"disableMicrophone": "Tắt micro",
- "defaultMicrophone": "Micro Mặc định"
+ "defaultMicrophone": "Micro Mặc định",
+ "systemAudio": "Âm thanh hệ thống",
+ "microphone": "Micro",
+ "on": "Bật",
+ "off": "Tắt",
+ "inputDevice": "Thiết bị đầu vào"
},
"webcam": {
"enableWebcam": "Bật webcam",
@@ -35,12 +41,17 @@
"defaultCamera": "Máy ảnh Mặc định",
"searching": "Đang tìm kiếm...",
"noneFound": "Không tìm thấy máy ảnh",
- "unavailable": "Máy ảnh không khả dụng"
+ "unavailable": "Máy ảnh không khả dụng",
+ "camera": "Máy ảnh",
+ "cameraDevice": "Thiết bị máy ảnh"
},
"sourceSelector": {
"loading": "Đang tải nguồn...",
"screens": "Màn hình ({{count}})",
"windows": "Cửa sổ ({{count}})",
+ "emptyTitle": "Không tìm thấy màn hình hoặc cửa sổ nào",
+ "emptyDescription": "Nếu bạn vừa cấp quyền ghi màn hình, hãy tải lại bộ chọn này. Trên macOS, bạn có thể cần mở lại OpenScreen.",
+ "loadFailedDescription": "OpenScreen không thể tải các nguồn ghi hình. Hãy tải lại bộ chọn này và thử lại.",
"defaultSourceName": "Màn hình"
},
"recording": {
diff --git a/src/i18n/locales/vi/settings.json b/src/i18n/locales/vi/settings.json
index 8891e67c8..e11f1a51c 100644
--- a/src/i18n/locales/vi/settings.json
+++ b/src/i18n/locales/vi/settings.json
@@ -8,7 +8,8 @@
"title": "Chế độ lấy nét",
"manual": "Thủ công",
"auto": "Tự động",
- "autoDescription": "Máy ảnh đi theo vị trí con trỏ đã ghi"
+ "autoDescription": "Máy ảnh đi theo vị trí con trỏ đã ghi",
+ "lockedDisclaimer": "Được điều khiển bởi công tắc Lấy nét tự động chung trên dòng thời gian. Tắt để đặt chế độ lấy nét riêng cho từng lần thu phóng."
},
"customScale": "Thu phóng tùy chỉnh",
"position": {
@@ -135,8 +136,6 @@
"textPlaceholder": "Nhập văn bản của bạn...",
"fontStyle": "Kiểu phông chữ",
"selectStyle": "Chọn kiểu",
- "textAnimation": "Hoạt ảnh văn bản",
- "selectAnimation": "Chọn hoạt ảnh",
"size": "Kích thước",
"customFonts": "Phông chữ tùy chỉnh",
"textColor": "Màu văn bản",
@@ -182,6 +181,17 @@
"modern": "Hiện đại",
"clean": "Sạch sẽ"
},
+ "textAnimation": {
+ "title": "Hoạt ảnh văn bản",
+ "selectAnimation": "Chọn hoạt ảnh",
+ "none": "Không có",
+ "fade": "Mờ dần",
+ "rise": "Trồi lên",
+ "pop": "Bật lên",
+ "slideLeft": "Trượt sang trái",
+ "typewriter": "Máy đánh chữ",
+ "pulse": "Nhấp nháy"
+ },
"customFont": {
"dialogTitle": "Thêm Google Font",
"urlLabel": "URL nhập Google Fonts",
@@ -202,6 +212,7 @@
"errorLoadFailed": "Không thể tải phông chữ. Vui lòng xác minh URL Google Fonts là chính xác."
},
"cursor": {
+ "title": "Con trỏ",
"theme": "Kiểu con trỏ",
"themeDefault": "Mặc định",
"show": "Hiện con trỏ",
@@ -209,7 +220,8 @@
"smoothing": "Làm mượt",
"motionBlur": "Làm mờ chuyển động",
"clickBounce": "Nảy khi nhấp",
- "clipToBounds": "Cắt theo khung"
+ "clipToBounds": "Cắt theo khung",
+ "clipToBoundsDescription": "Giữ con trỏ bên trong khung hình video. Tắt để cho phép con trỏ vượt ra ngoài mép — hữu ích khi phóng to hoặc lia máy."
},
"language": {
"title": "Ngôn ngữ"
@@ -217,5 +229,9 @@
"timeline": {
"title": "Dòng thời gian",
"waveform": "Hiển thị dạng sóng âm thanh trên rãnh cắt"
+ },
+ "facets": {
+ "captions": "Phụ đề",
+ "transcript": "Bản ghi lời thoại"
}
}
diff --git a/src/i18n/locales/vi/timeline.json b/src/i18n/locales/vi/timeline.json
index 6956067d7..0771d1c11 100644
--- a/src/i18n/locales/vi/timeline.json
+++ b/src/i18n/locales/vi/timeline.json
@@ -2,6 +2,10 @@
"buttons": {
"addZoom": "Thêm Thu phóng (Z)",
"suggestZooms": "Đề xuất Thu phóng từ Con trỏ",
+ "autoZoomOn": "Đề xuất thu phóng tự động đang bật — nhấp để loại bỏ các thu phóng được đề xuất",
+ "autoZoomOff": "Đề xuất thu phóng tự động đang tắt — nhấp để đề xuất thu phóng từ con trỏ",
+ "autoFocusAllOn": "Lấy nét tự động đang bật cho tất cả các thu phóng — nhấp để chuyển tất cả sang thủ công",
+ "autoFocusAllOff": "Bật lấy nét tự động cho tất cả các thu phóng (máy ảnh theo dõi con trỏ)",
"addTrim": "Thêm Cắt (T)",
"addAnnotation": "Thêm Chú thích (A)",
"addBlur": "Thêm Làm mờ (B)",
@@ -57,5 +61,32 @@
"success": {
"addedZoomSuggestions": "Đã thêm {{count}} đề xuất thu phóng dựa trên con trỏ",
"addedZoomSuggestionsPlural": "Đã thêm {{count}} đề xuất thu phóng dựa trên con trỏ"
+ },
+ "toolbar": {
+ "autoEnhance": "Tự động nâng cao",
+ "automaticZooms": "Thu phóng tự động",
+ "automaticZoomsHint": "Từ chuyển động con trỏ đã ghi",
+ "smartZoomsAndCuts": "Thu phóng + cắt thông minh",
+ "smartZoomsAndCutsHint": "Với AI",
+ "comment": "Bình luận",
+ "aspectRatio": "Tỷ lệ khung hình",
+ "timelineTools": "Công cụ dòng thời gian",
+ "arrangeClips": "Sắp xếp clip",
+ "arrangeClipsHint": "Kéo các clip bên dưới để sắp xếp lại hoặc thả clip mới vào",
+ "newAnnotation": "Chú thích mới",
+ "noAnnotationsYet": "Chưa có chú thích nào",
+ "constantSpeed": "Tốc độ không đổi",
+ "noTrims": "Không có cắt nào",
+ "dragToReorderHint": "Kéo để sắp xếp lại · nhấp đúp để chỉnh sửa điểm vào/ra",
+ "editInOutPoints": "Chỉnh sửa điểm vào/ra",
+ "deleteClip": "Xóa clip",
+ "dropToAdd": "Thả để thêm vào dòng thời gian",
+ "importRecordingFirst": "Hãy nhập một bản ghi trước",
+ "noAutoZoomMoments": "Không tìm thấy khoảnh khắc thu phóng tự động",
+ "noAutoZoomMomentsDescription": "Bản ghi này không có dữ liệu chuyển động con trỏ, hoặc các thu phóng hiện có đã bao phủ các khoảnh khắc bận rộn.",
+ "addedAutoZoom": "Đã thêm {{count}} thu phóng tự động",
+ "addedAutoZoomPlural": "Đã thêm {{count}} thu phóng tự động",
+ "autoZoomFailed": "Thu phóng tự động thất bại",
+ "aiEnhanceRequested": "Đã yêu cầu AI cải thiện bản ghi này"
}
}
diff --git a/src/i18n/locales/zh-CN/dialogs.json b/src/i18n/locales/zh-CN/dialogs.json
index 246ea4859..645ebf9d8 100644
--- a/src/i18n/locales/zh-CN/dialogs.json
+++ b/src/i18n/locales/zh-CN/dialogs.json
@@ -57,9 +57,23 @@
"detailLoadProject": "是否在加载其他项目前保存当前项目?",
"saveAndLoadProject": "保存并加载项目",
"discardAndLoadProject": "放弃并加载项目",
+ "newProject": "新建项目",
+ "importVideo": "导入视频文件…",
"loadProject": "加载项目…",
"saveProject": "保存项目…",
- "saveProjectAs": "项目另存为…"
+ "saveProjectAs": "项目另存为…",
+ "modal": {
+ "closeTitle": "关闭前要保存更改吗?",
+ "closeBody": "项目中有未保存的更改。立即保存、放弃,或留在编辑器中。",
+ "newTitle": "创建新项目前要保存更改吗?",
+ "openTitle": "打开其他项目前要保存更改吗?",
+ "recordTitle": "开始新录制前要保存更改吗?",
+ "sharedBody": "当前项目有未保存的更改。请先保存,放弃更改,或取消操作。",
+ "notSavedYet": "当前项目尚未保存到磁盘。",
+ "discard": "放弃",
+ "saveAndContinue": "保存并继续",
+ "saving": "正在保存…"
+ }
},
"fileDialogs": {
"saveGif": "保存导出的 GIF",
diff --git a/src/i18n/locales/zh-CN/editor.json b/src/i18n/locales/zh-CN/editor.json
index ae15accef..369d18f77 100644
--- a/src/i18n/locales/zh-CN/editor.json
+++ b/src/i18n/locales/zh-CN/editor.json
@@ -65,9 +65,12 @@
},
"emptyState": {
"title": "未打开任何项目",
- "description": "导入视频开始编辑,或加载已有的 OpenScreen 项目。",
- "importVideoButton": "导入视频文件…",
- "loadProjectButton": "加载项目…",
+ "description": "创建新项目或打开现有项目。",
+ "titleHasAsset": "添加视频以开始",
+ "descriptionHasAsset": "导入录制内容以开始编辑。",
+ "newProjectButton": "新建项目并导入视频",
+ "importVideoButton": "导入视频",
+ "loadProjectButton": "打开项目",
"supportedFormats": "支持的格式:MP4、MOV、WebM、MKV、AVI、M4V、WMV",
"dragDropHint": "或将 .openscreen 项目文件拖放到此处",
"dropOverlay": "将项目文件拖放至此以打开",
@@ -89,5 +92,263 @@
"annotation": "标注",
"blur": "模糊"
}
+ },
+ "topbar": {
+ "toggleChatPanel": "切换聊天面板",
+ "openProject": "打开项目",
+ "newProject": "新建项目",
+ "saveProject": "保存项目",
+ "unsaved": "未保存",
+ "saved": "已保存",
+ "switchToLightTheme": "切换到浅色主题",
+ "switchToDarkTheme": "切换到深色主题",
+ "toggleTheme": "切换主题",
+ "settings": "设置",
+ "export": "导出",
+ "renameProject": "重命名项目",
+ "noProject": "无项目",
+ "changeLanguage": "切换语言",
+ "editorMode": "编辑器模式",
+ "modes": {
+ "media": "媒体",
+ "edit": "编辑",
+ "rec": "录制"
+ }
+ },
+ "rec": {
+ "source": "来源",
+ "systemAudio": "系统音频",
+ "microphone": "麦克风",
+ "camera": "摄像头",
+ "cursorHighlight": "光标高亮",
+ "on": "开",
+ "off": "关",
+ "loading": "加载中…",
+ "noCameraFound": "未找到摄像头",
+ "cameraAccessError": "无法访问该摄像头",
+ "startingCamera": "正在启动摄像头…",
+ "turnOnCameraHint": "开启摄像头以查看实时预览",
+ "entireScreen": "整个屏幕",
+ "cancel": "取消",
+ "startRecording": "开始录制",
+ "startRecordingHint": "打开录制小组件并关闭此编辑器窗口。",
+ "sourceModal": {
+ "screens": "屏幕({{count}})",
+ "windows": "窗口({{count}})",
+ "loadingSources": "正在加载来源…",
+ "noScreensFound": "未找到屏幕",
+ "noWindowsFound": "未找到窗口",
+ "cancel": "取消"
+ }
+ },
+ "mediaStage": {
+ "openProjectFirst": "请先打开一个项目",
+ "couldNotAddAsset": "无法添加素材",
+ "searchPlaceholder": "搜索媒体…",
+ "dragHint": "将片段拖到下方时间轴上以添加",
+ "emptyHint": "暂无媒体 — 导入录制内容以开始。",
+ "importMedia": "导入媒体",
+ "added": "已添加 {{label}}",
+ "sourceTranscript": "来源转录文本",
+ "close": "关闭",
+ "transcriptReady": "转录已就绪",
+ "notGeneratedYet": "尚未生成",
+ "regenerateAs": "重新生成为",
+ "auto": "自动",
+ "regenerate": "重新生成",
+ "transcriptEmpty": "转录内容为空。",
+ "notGeneratedHint": "尚未生成 — 选择语言并点击重新生成。",
+ "transcribing": "正在转录",
+ "transcribingEllipsis": "正在转录…",
+ "pendingTranscription": "等待转录",
+ "transcriptionFailed": "转录失败",
+ "noTranscript": "没有转录文本",
+ "generating": "正在生成",
+ "generationFailed": "生成失败",
+ "generated": "已生成",
+ "generationFailedHint": "生成失败 — 选择语言并重新生成。",
+ "noPreviewAvailable": "无法预览",
+ "restart": "重新开始",
+ "detectedLanguage": "检测到的语言:{{language}}"
+ },
+ "exportDialog": {
+ "title": "导出",
+ "subtitle": "将时间轴渲染为文件",
+ "addVideoBeforeExporting": "导出前请先添加视频。",
+ "quality": "画质",
+ "qualitySmallerFile": "文件更小",
+ "qualityRecommended": "推荐",
+ "qualityMatchRecording": "与录制一致",
+ "frameRate": "帧率",
+ "codec": "编码格式",
+ "codecBestCompatibility": "兼容性最佳",
+ "codecMaySupportVary": "并非所有系统编码器都支持",
+ "size": "尺寸",
+ "loopGif": "循环播放 GIF",
+ "loopOn": "循环已开启",
+ "loopOff": "循环已关闭",
+ "pickFormatAndExport": "选择格式并点击导出以开始。",
+ "savedTo": "已保存至",
+ "exportFailedGeneric": "导出失败。",
+ "writingFile": "正在写入文件…",
+ "renderingFrames": "正在渲染帧",
+ "framesEta": "{{current}} / {{total}} 帧 · 预计剩余 {{eta}} 秒",
+ "preparingEncoder": "正在准备编码器…",
+ "close": "关闭",
+ "cancel": "取消",
+ "rendering": "渲染中…",
+ "saving": "保存中…",
+ "starting": "启动中…",
+ "exportGif": "导出 GIF",
+ "exportMp4": "导出 MP4",
+ "exportedGif": "GIF 已导出",
+ "exportedVideo": "视频已导出",
+ "showInFolder": "在文件夹中显示",
+ "exportFailed": "导出失败",
+ "failedToWriteFile": "写入文件失败"
+ },
+ "inspector": {
+ "resetFocusPoint": "重置焦点",
+ "setColor": "设置颜色 {{color}}",
+ "trimHiddenDuration": "编辑后的时间轴中隐藏了 {{duration}} 秒的源媒体。",
+ "restoreDeleteTrim": "恢复(删除裁剪)",
+ "collapseInspector": "折叠检查器",
+ "captionsDescription": "根据转录文本生成按字词计时的字幕,并将其放置到时间轴上。",
+ "generateCaptions": "生成字幕",
+ "cropDescription": "重新构图录制内容 — 选择宽高比并缩放到要保留的区域。",
+ "openCrop": "打开裁剪…"
+ },
+ "leftPanel": {
+ "mediaTitle": "媒体",
+ "searchPlaceholder": "搜索…",
+ "clearSearch": "清除搜索",
+ "emptyHint": "此项目中还没有媒体。请在下方导入视频。",
+ "transcriptReadyBadge": "转录已就绪"
+ },
+ "leftRail": {
+ "chat": "聊天",
+ "media": "媒体",
+ "ariaLabel": "左侧工具"
+ },
+ "chat": {
+ "changeProvider": "更换提供方",
+ "back": "返回",
+ "currentModel": "当前模型:",
+ "notSelected": "未选择",
+ "loadingModels": "正在加载模型…",
+ "searchModels": "搜索模型…",
+ "fetchModelsFailed": "无法获取实时模型列表({{error}});请打开提供方设置手动输入模型 ID。",
+ "noModelsAvailable": "此提供方没有可用模型。",
+ "noModelsMatch": "没有与此搜索匹配的模型。",
+ "noProvidersConnected": "尚未连接任何提供方。",
+ "selectModelFailed": "无法选择模型",
+ "providerSettings": "提供方设置…",
+ "applyEditsFailed": "无法应用代理的编辑",
+ "chatFailed": "聊天失败",
+ "rewindFailed": "回退失败",
+ "rewoundSuccess": "已回退到该消息的开头",
+ "notEnoughHistory": "历史记录尚不足以压缩。",
+ "compactedSuccess": "已压缩早期上下文",
+ "compactFailed": "压缩失败",
+ "createSessionFailed": "无法创建对话",
+ "deleteSessionFailed": "无法删除对话",
+ "renameSessionFailed": "无法重命名对话",
+ "reasoningEffortUpdateFailed": "无法更新推理强度",
+ "addSkipRangePrompt": "添加跳过范围\n格式:startSec-endSec(例如 1.2-3.4)",
+ "addSkipRangeFormatError": "请使用 startSec-endSec 格式,例如 1.2-3.4",
+ "addSkipRangeOrderError": "endSec 必须大于 startSec。",
+ "addSkipRangeApplied": "已添加跳过 {{startSec}}–{{endSec}} 秒。",
+ "contextTooltip": "预估 {{usedTokens}} / {{budgetTokens}} 个 token",
+ "contextPercent": "上下文 {{percent}}%",
+ "compactContext": "压缩上下文",
+ "aiSettings": "AI 设置",
+ "history": "历史记录",
+ "newConversation": "新对话",
+ "untitledConversation": "对话",
+ "clickToRename": "点击重命名",
+ "renameConversation": "重命名对话",
+ "deleteConversation": "删除对话",
+ "confirmDeleteConversation": "删除 \"{{title}}\"?",
+ "addSkipRange": "添加跳过范围",
+ "skipButtonShort": "+ 跳过",
+ "emptyState": "暂无消息。可以让代理剪掉静音、收紧停顿或添加字幕。",
+ "authorUser": "你",
+ "authorAssistant": "OpenScreen",
+ "rewindToMessage": "回退到此消息",
+ "copyMessage": "复制消息",
+ "copiedToClipboard": "已复制到剪贴板",
+ "copyFailed": "无法复制",
+ "appliedPrefix": "已应用:",
+ "thinking": "思考中…",
+ "composerPlaceholder": "描述你想要的编辑内容。",
+ "modelLabel": "模型",
+ "reasoningEffortLabel": "推理强度",
+ "sendTitle": "发送(回车)",
+ "send": "发送",
+ "rewindConfirmTitle": "要回退到这里吗?",
+ "rewindConfirmBody": "此时间点之后代理的编辑和后续对话轮次将被回滚。项目、对话和代理状态将被恢复。",
+ "rewindConfirm": "回退",
+ "configureModel": "配置 AI 模型",
+ "historyDialog": {
+ "title": "对话历史",
+ "subtitle": "切换或新建会话",
+ "empty": "暂无对话。",
+ "msgsCount": "{{count}} 条消息 · {{date}}"
+ }
+ },
+ "newProjectDialog": {
+ "title": "新建项目",
+ "subtitle": "选择一个起点并为其命名",
+ "nameLabel": "项目名称",
+ "startingPointLabel": "起点",
+ "create": "创建项目",
+ "defaultTitle": "未命名项目",
+ "templates": {
+ "blankTitle": "空白项目",
+ "blankDesc": "空时间轴,可直接导入",
+ "screenRecordingTitle": "屏幕录制",
+ "screenRecordingDesc": "开始系统捕获",
+ "importMediaDesc": "从磁盘导入视频、音频、图片",
+ "fromTemplateTitle": "从模板创建",
+ "fromTemplateDesc": "预定义的故事板"
+ }
+ },
+ "openProjectDialog": {
+ "title": "打开项目",
+ "subtitle": "继续现有项目或浏览文件",
+ "searchPlaceholder": "搜索项目…",
+ "noMatches": "没有与 \"{{query}}\" 匹配的项目。",
+ "navigateHint": "导航 ·",
+ "openHint": "打开",
+ "browseFiles": "浏览文件…"
+ },
+ "editClipDialog": {
+ "title": "编辑片段",
+ "adjustStart": "调整片段起点",
+ "adjustEnd": "调整片段终点",
+ "start": "起点",
+ "end": "终点",
+ "duration": "时长",
+ "reset": "重置",
+ "apply": "应用",
+ "pickClipTitle": "选择要编辑的片段",
+ "clipLabel": "片段 {{index}}"
+ },
+ "insertSourceDialog": {
+ "title": "插入源",
+ "subtitle": "将 \"{{assetLabel}}\" 放在时间轴的哪个位置?",
+ "addBefore": "添加到前面",
+ "addBeforeDesc": "将整个源插入到目标片段之前。",
+ "addAfter": "添加到后面",
+ "addAfterDesc": "将整个源插入到目标片段之后。",
+ "split": "在此处拆分并插入",
+ "splitDesc": "在放置点拆分目标片段,并将源插入其中。"
+ },
+ "cropDialog": {
+ "subtitle": "拖动区域或其控点以调整裁剪区域",
+ "fieldX": "X",
+ "fieldY": "Y",
+ "fieldW": "宽",
+ "fieldH": "高"
}
}
diff --git a/src/i18n/locales/zh-CN/launch.json b/src/i18n/locales/zh-CN/launch.json
index b20f4546c..416e50892 100644
--- a/src/i18n/locales/zh-CN/launch.json
+++ b/src/i18n/locales/zh-CN/launch.json
@@ -10,6 +10,7 @@
"openProject": "打开项目",
"useVerticalTray": "使用竖向托盘",
"useHorizontalTray": "使用横向托盘",
+ "openStudio": "打开工作室",
"openNotes": "打开笔记",
"openNotesPlaceholder": "在此输入笔记...",
"notesToolbar": {
@@ -27,7 +28,12 @@
"disableSystemAudio": "禁用系统音频",
"enableMicrophone": "启用麦克风",
"disableMicrophone": "禁用麦克风",
- "defaultMicrophone": "默认麦克风"
+ "defaultMicrophone": "默认麦克风",
+ "systemAudio": "系统音频",
+ "microphone": "麦克风",
+ "on": "开",
+ "off": "关",
+ "inputDevice": "输入设备"
},
"webcam": {
"enableWebcam": "启用摄像头",
@@ -35,7 +41,9 @@
"defaultCamera": "默认摄像头",
"searching": "正在搜索...",
"noneFound": "未找到摄像头",
- "unavailable": "摄像头不可用"
+ "unavailable": "摄像头不可用",
+ "camera": "摄像头",
+ "cameraDevice": "摄像头设备"
},
"cursor": {
"useEditableCursor": "使用可编辑光标",
@@ -45,6 +53,9 @@
"loading": "正在加载源...",
"screens": "屏幕 ({{count}})",
"windows": "窗口 ({{count}})",
+ "emptyTitle": "未找到屏幕或窗口",
+ "emptyDescription": "如果您刚刚授予了屏幕录制权限,请重新加载此选择器。在 macOS 上,您可能需要重新打开 OpenScreen。",
+ "loadFailedDescription": "OpenScreen 无法加载采集源。请重新加载此选择器并重试。",
"defaultSourceName": "屏幕"
},
"recording": {
diff --git a/src/i18n/locales/zh-CN/settings.json b/src/i18n/locales/zh-CN/settings.json
index a80565931..7de56cfad 100644
--- a/src/i18n/locales/zh-CN/settings.json
+++ b/src/i18n/locales/zh-CN/settings.json
@@ -8,7 +8,8 @@
"title": "对焦模式",
"manual": "手动",
"auto": "自动",
- "autoDescription": "摄像头跟随录制时的光标位置"
+ "autoDescription": "摄像头跟随录制时的光标位置",
+ "lockedDisclaimer": "由时间线中的全局自动对焦开关控制。关闭后可为每个缩放单独设置对焦模式。"
},
"threeD": {
"title": "3D 旋转",
@@ -135,8 +136,6 @@
"textPlaceholder": "输入您的文本...",
"fontStyle": "字体样式",
"selectStyle": "选择样式",
- "textAnimation": "文本动画",
- "selectAnimation": "选择动画",
"size": "大小",
"customFonts": "自定义字体",
"textColor": "文本颜色",
@@ -182,6 +181,17 @@
"modern": "现代",
"clean": "简洁"
},
+ "textAnimation": {
+ "title": "文本动画",
+ "selectAnimation": "选择动画",
+ "none": "无",
+ "fade": "淡入淡出",
+ "rise": "上升",
+ "pop": "弹出",
+ "slideLeft": "向左滑动",
+ "typewriter": "打字机",
+ "pulse": "脉动"
+ },
"customFont": {
"dialogTitle": "添加 Google 字体",
"urlLabel": "Google Fonts 导入 URL",
@@ -202,6 +212,7 @@
"errorLoadFailed": "无法加载该字体。请确认 Google Fonts URL 是否正确。"
},
"cursor": {
+ "title": "光标",
"theme": "光标样式",
"themeDefault": "默认",
"show": "显示光标",
@@ -209,7 +220,8 @@
"smoothing": "平滑",
"motionBlur": "运动模糊",
"clickBounce": "点击弹跳",
- "clipToBounds": "裁剪到画布"
+ "clipToBounds": "裁剪到画布",
+ "clipToBoundsDescription": "将光标保持在视频画面内。关闭后光标可以超出边缘——在放大或平移时很有用。"
},
"language": {
"title": "语言"
@@ -217,5 +229,9 @@
"timeline": {
"title": "时间轴",
"waveform": "在剪辑轨道上显示音频波形"
+ },
+ "facets": {
+ "captions": "字幕",
+ "transcript": "转录文本"
}
}
diff --git a/src/i18n/locales/zh-CN/timeline.json b/src/i18n/locales/zh-CN/timeline.json
index c810edb35..645382a97 100644
--- a/src/i18n/locales/zh-CN/timeline.json
+++ b/src/i18n/locales/zh-CN/timeline.json
@@ -2,6 +2,10 @@
"buttons": {
"addZoom": "添加缩放 (Z)",
"suggestZooms": "根据光标建议缩放",
+ "autoZoomOn": "自动缩放建议已开启 — 点击可移除建议的缩放",
+ "autoZoomOff": "自动缩放建议已关闭 — 点击可根据光标建议缩放",
+ "autoFocusAllOn": "所有缩放的自动对焦已开启 — 点击可将全部切换为手动",
+ "autoFocusAllOff": "为所有缩放开启自动对焦(摄像头跟随光标)",
"addTrim": "添加剪辑 (T)",
"addAnnotation": "添加标注 (A)",
"addSpeed": "添加速度 (S)",
@@ -57,5 +61,32 @@
"success": {
"addedZoomSuggestions": "已添加 {{count}} 个基于光标的缩放建议",
"addedZoomSuggestionsPlural": "已添加 {{count}} 个基于光标的缩放建议"
+ },
+ "toolbar": {
+ "autoEnhance": "自动增强",
+ "automaticZooms": "自动缩放",
+ "automaticZoomsHint": "基于录制的光标移动",
+ "smartZoomsAndCuts": "智能缩放与剪切",
+ "smartZoomsAndCutsHint": "使用 AI",
+ "comment": "评论",
+ "aspectRatio": "宽高比",
+ "timelineTools": "时间轴工具",
+ "arrangeClips": "排列片段",
+ "arrangeClipsHint": "拖动下方片段以重新排序,或拖入新片段",
+ "newAnnotation": "新建标注",
+ "noAnnotationsYet": "暂无标注",
+ "constantSpeed": "恒定速度",
+ "noTrims": "无剪辑片段",
+ "dragToReorderHint": "拖动以重新排序 · 双击以编辑入点/出点",
+ "editInOutPoints": "编辑入点/出点",
+ "deleteClip": "删除片段",
+ "dropToAdd": "拖放以添加到时间轴",
+ "importRecordingFirst": "请先导入录制内容",
+ "noAutoZoomMoments": "未找到自动缩放时刻",
+ "noAutoZoomMomentsDescription": "此录制没有光标移动数据,或现有缩放已覆盖繁忙时刻。",
+ "addedAutoZoom": "已添加 {{count}} 个自动缩放",
+ "addedAutoZoomPlural": "已添加 {{count}} 个自动缩放",
+ "autoZoomFailed": "自动缩放失败",
+ "aiEnhanceRequested": "已请求 AI 代理增强此录制内容"
}
}
diff --git a/src/i18n/locales/zh-TW/dialogs.json b/src/i18n/locales/zh-TW/dialogs.json
index f5ba7f9a4..14fc364a0 100644
--- a/src/i18n/locales/zh-TW/dialogs.json
+++ b/src/i18n/locales/zh-TW/dialogs.json
@@ -57,9 +57,23 @@
"detailLoadProject": "是否在載入其他專案前儲存目前的專案?",
"saveAndLoadProject": "儲存並載入專案",
"discardAndLoadProject": "捨棄並載入專案",
+ "newProject": "新專案",
+ "importVideo": "匯入影片檔案…",
"loadProject": "載入專案…",
"saveProject": "儲存專案…",
- "saveProjectAs": "專案另存新檔…"
+ "saveProjectAs": "專案另存新檔…",
+ "modal": {
+ "closeTitle": "關閉前要儲存變更嗎?",
+ "closeBody": "專案中有未儲存的變更。立即儲存、捨棄,或留在編輯器中。",
+ "newTitle": "建立新專案前要儲存變更嗎?",
+ "openTitle": "開啟其他專案前要儲存變更嗎?",
+ "recordTitle": "開始新錄製前要儲存變更嗎?",
+ "sharedBody": "目前專案有未儲存的變更。請先儲存、捨棄變更,或取消操作。",
+ "notSavedYet": "目前專案尚未儲存到磁碟。",
+ "discard": "捨棄",
+ "saveAndContinue": "儲存並繼續",
+ "saving": "正在儲存…"
+ }
},
"fileDialogs": {
"saveGif": "儲存匯出的 GIF",
diff --git a/src/i18n/locales/zh-TW/editor.json b/src/i18n/locales/zh-TW/editor.json
index 26d44016c..2c0478ed0 100644
--- a/src/i18n/locales/zh-TW/editor.json
+++ b/src/i18n/locales/zh-TW/editor.json
@@ -65,9 +65,12 @@
},
"emptyState": {
"title": "未開啟任何專案",
- "description": "匯入影片以開始編輯,或載入現有的 OpenScreen 專案。",
- "importVideoButton": "匯入影片檔案…",
- "loadProjectButton": "載入專案…",
+ "description": "建立新專案或開啟現有專案。",
+ "titleHasAsset": "新增影片以開始",
+ "descriptionHasAsset": "匯入錄製內容以開始編輯。",
+ "newProjectButton": "新專案+匯入影片",
+ "importVideoButton": "匯入影片",
+ "loadProjectButton": "開啟專案",
"supportedFormats": "支援的格式:MP4、MOV、WebM、MKV、AVI、M4V、WMV",
"dragDropHint": "或將 .openscreen 專案檔案拖放至此",
"dropOverlay": "將專案檔案拖放至此以開啟",
@@ -89,5 +92,263 @@
"annotation": "文字",
"blur": "模糊"
}
+ },
+ "topbar": {
+ "toggleChatPanel": "切換聊天面板",
+ "openProject": "開啟專案",
+ "newProject": "新專案",
+ "saveProject": "儲存專案",
+ "unsaved": "未儲存",
+ "saved": "已儲存",
+ "switchToLightTheme": "切換至淺色主題",
+ "switchToDarkTheme": "切換至深色主題",
+ "toggleTheme": "切換主題",
+ "settings": "設定",
+ "export": "匯出",
+ "renameProject": "重新命名專案",
+ "noProject": "無專案",
+ "changeLanguage": "切換語言",
+ "editorMode": "編輯器模式",
+ "modes": {
+ "media": "媒體",
+ "edit": "編輯",
+ "rec": "錄製"
+ }
+ },
+ "rec": {
+ "source": "來源",
+ "systemAudio": "系統音訊",
+ "microphone": "麥克風",
+ "camera": "攝影機",
+ "cursorHighlight": "游標醒目提示",
+ "on": "開",
+ "off": "關",
+ "loading": "載入中…",
+ "noCameraFound": "找不到攝影機",
+ "cameraAccessError": "無法存取此攝影機",
+ "startingCamera": "正在啟動攝影機…",
+ "turnOnCameraHint": "開啟攝影機以檢視即時預覽",
+ "entireScreen": "整個螢幕",
+ "cancel": "取消",
+ "startRecording": "開始錄製",
+ "startRecordingHint": "開啟錄製小工具並關閉此編輯器視窗。",
+ "sourceModal": {
+ "screens": "螢幕({{count}})",
+ "windows": "視窗({{count}})",
+ "loadingSources": "正在載入來源…",
+ "noScreensFound": "找不到螢幕",
+ "noWindowsFound": "找不到視窗",
+ "cancel": "取消"
+ }
+ },
+ "mediaStage": {
+ "openProjectFirst": "請先開啟專案",
+ "couldNotAddAsset": "無法新增素材",
+ "searchPlaceholder": "搜尋媒體…",
+ "dragHint": "將片段拖曳至下方時間軸以新增",
+ "emptyHint": "尚無媒體 — 匯入錄製內容以開始。",
+ "importMedia": "匯入媒體",
+ "added": "已新增 {{label}}",
+ "sourceTranscript": "來源逐字稿",
+ "close": "關閉",
+ "transcriptReady": "逐字稿已就緒",
+ "notGeneratedYet": "尚未產生",
+ "regenerateAs": "以此語言重新產生",
+ "auto": "自動",
+ "regenerate": "重新產生",
+ "transcriptEmpty": "逐字稿為空。",
+ "notGeneratedHint": "尚未產生 — 選擇語言並點擊重新產生。",
+ "transcribing": "轉錄中",
+ "transcribingEllipsis": "轉錄中…",
+ "pendingTranscription": "等待轉錄",
+ "transcriptionFailed": "轉錄失敗",
+ "noTranscript": "沒有逐字稿",
+ "generating": "產生中",
+ "generationFailed": "產生失敗",
+ "generated": "已產生",
+ "generationFailedHint": "產生失敗 — 選擇語言並重新產生。",
+ "noPreviewAvailable": "無法預覽",
+ "restart": "重新開始",
+ "detectedLanguage": "偵測到的語言:{{language}}"
+ },
+ "exportDialog": {
+ "title": "匯出",
+ "subtitle": "將時間軸轉譯為檔案",
+ "addVideoBeforeExporting": "匯出前請先新增影片。",
+ "quality": "畫質",
+ "qualitySmallerFile": "檔案較小",
+ "qualityRecommended": "建議",
+ "qualityMatchRecording": "與錄製內容相符",
+ "frameRate": "幀率",
+ "codec": "編碼格式",
+ "codecBestCompatibility": "相容性最佳",
+ "codecMaySupportVary": "並非所有系統編碼器都支援",
+ "size": "尺寸",
+ "loopGif": "循環播放 GIF",
+ "loopOn": "循環開啟",
+ "loopOff": "循環關閉",
+ "pickFormatAndExport": "選擇格式並按下匯出以開始。",
+ "savedTo": "已儲存至",
+ "exportFailedGeneric": "匯出失敗。",
+ "writingFile": "正在寫入檔案…",
+ "renderingFrames": "正在轉譯畫格",
+ "framesEta": "{{current}} / {{total}} 畫格 · 預計剩餘 {{eta}} 秒",
+ "preparingEncoder": "正在準備編碼器…",
+ "close": "關閉",
+ "cancel": "取消",
+ "rendering": "轉譯中…",
+ "saving": "儲存中…",
+ "starting": "啟動中…",
+ "exportGif": "匯出 GIF",
+ "exportMp4": "匯出 MP4",
+ "exportedGif": "GIF 已匯出",
+ "exportedVideo": "影片已匯出",
+ "showInFolder": "在資料夾中顯示",
+ "exportFailed": "匯出失敗",
+ "failedToWriteFile": "寫入檔案失敗"
+ },
+ "inspector": {
+ "resetFocusPoint": "重設焦點",
+ "setColor": "設定顏色 {{color}}",
+ "trimHiddenDuration": "已編輯的時間軸中隱藏了 {{duration}} 秒的來源媒體。",
+ "restoreDeleteTrim": "還原(刪除修剪)",
+ "collapseInspector": "摺疊檢查器",
+ "captionsDescription": "根據逐字稿產生逐字計時的字幕,並放置到時間軸上。",
+ "generateCaptions": "產生字幕",
+ "cropDescription": "重新構圖錄製內容 — 選擇長寬比並縮放至想保留的區域。",
+ "openCrop": "開啟裁切…"
+ },
+ "leftPanel": {
+ "mediaTitle": "媒體",
+ "searchPlaceholder": "搜尋…",
+ "clearSearch": "清除搜尋",
+ "emptyHint": "此專案中尚無媒體。請在下方匯入影片。",
+ "transcriptReadyBadge": "逐字稿已就緒"
+ },
+ "leftRail": {
+ "chat": "聊天",
+ "media": "媒體",
+ "ariaLabel": "左側工具"
+ },
+ "chat": {
+ "changeProvider": "更換提供者",
+ "back": "返回",
+ "currentModel": "目前模型:",
+ "notSelected": "未選擇",
+ "loadingModels": "正在載入模型…",
+ "searchModels": "搜尋模型…",
+ "fetchModelsFailed": "無法取得即時模型清單({{error}});請開啟提供者設定手動輸入模型 ID。",
+ "noModelsAvailable": "此提供者沒有可用模型。",
+ "noModelsMatch": "沒有符合此搜尋的模型。",
+ "noProvidersConnected": "尚未連接任何提供者。",
+ "selectModelFailed": "無法選擇模型",
+ "providerSettings": "提供者設定…",
+ "applyEditsFailed": "無法套用代理的編輯",
+ "chatFailed": "聊天失敗",
+ "rewindFailed": "倒轉失敗",
+ "rewoundSuccess": "已倒轉至該訊息的開頭",
+ "notEnoughHistory": "歷史紀錄尚不足以壓縮。",
+ "compactedSuccess": "已壓縮先前的上下文",
+ "compactFailed": "壓縮失敗",
+ "createSessionFailed": "無法建立對話",
+ "deleteSessionFailed": "無法刪除對話",
+ "renameSessionFailed": "無法重新命名對話",
+ "reasoningEffortUpdateFailed": "無法更新推理強度",
+ "addSkipRangePrompt": "新增跳過範圍\n格式:startSec-endSec(例如 1.2-3.4)",
+ "addSkipRangeFormatError": "請使用 startSec-endSec 格式,例如 1.2-3.4",
+ "addSkipRangeOrderError": "endSec 必須大於 startSec。",
+ "addSkipRangeApplied": "已新增跳過 {{startSec}}–{{endSec}} 秒。",
+ "contextTooltip": "預估 {{usedTokens}} / {{budgetTokens}} 個權杖",
+ "contextPercent": "上下文 {{percent}}%",
+ "compactContext": "壓縮上下文",
+ "aiSettings": "AI 設定",
+ "history": "歷史紀錄",
+ "newConversation": "新對話",
+ "untitledConversation": "對話",
+ "clickToRename": "點擊重新命名",
+ "renameConversation": "重新命名對話",
+ "deleteConversation": "刪除對話",
+ "confirmDeleteConversation": "刪除「{{title}}」?",
+ "addSkipRange": "新增跳過範圍",
+ "skipButtonShort": "+ 跳過",
+ "emptyState": "尚無訊息。可以請代理剪掉靜音、收緊停頓或加入字幕。",
+ "authorUser": "你",
+ "authorAssistant": "OpenScreen",
+ "rewindToMessage": "倒轉至此訊息",
+ "copyMessage": "複製訊息",
+ "copiedToClipboard": "已複製到剪貼簿",
+ "copyFailed": "無法複製",
+ "appliedPrefix": "已套用:",
+ "thinking": "思考中…",
+ "composerPlaceholder": "描述你想要的編輯內容。",
+ "modelLabel": "模型",
+ "reasoningEffortLabel": "推理強度",
+ "sendTitle": "傳送(Enter)",
+ "send": "傳送",
+ "rewindConfirmTitle": "要倒轉到這裡嗎?",
+ "rewindConfirmBody": "此時間點之後代理的編輯與後續對話回合將被回復。專案、對話與代理狀態將被還原。",
+ "rewindConfirm": "倒轉",
+ "configureModel": "設定 AI 模型",
+ "historyDialog": {
+ "title": "對話歷史",
+ "subtitle": "切換或新增工作階段",
+ "empty": "尚無對話。",
+ "msgsCount": "{{count}} 則訊息 · {{date}}"
+ }
+ },
+ "newProjectDialog": {
+ "title": "新增專案",
+ "subtitle": "選擇一個起點並為其命名",
+ "nameLabel": "專案名稱",
+ "startingPointLabel": "起點",
+ "create": "建立專案",
+ "defaultTitle": "未命名專案",
+ "templates": {
+ "blankTitle": "空白專案",
+ "blankDesc": "空時間軸,可直接匯入",
+ "screenRecordingTitle": "螢幕錄製",
+ "screenRecordingDesc": "開始系統擷取",
+ "importMediaDesc": "從磁碟匯入影片、音訊、圖片",
+ "fromTemplateTitle": "從範本建立",
+ "fromTemplateDesc": "預先定義的分鏡腳本"
+ }
+ },
+ "openProjectDialog": {
+ "title": "開啟專案",
+ "subtitle": "繼續現有專案或瀏覽檔案",
+ "searchPlaceholder": "搜尋專案…",
+ "noMatches": "沒有符合 \"{{query}}\" 的專案。",
+ "navigateHint": "導覽 ·",
+ "openHint": "開啟",
+ "browseFiles": "瀏覽檔案…"
+ },
+ "editClipDialog": {
+ "title": "編輯片段",
+ "adjustStart": "調整片段起點",
+ "adjustEnd": "調整片段終點",
+ "start": "起點",
+ "end": "終點",
+ "duration": "時長",
+ "reset": "重設",
+ "apply": "套用",
+ "pickClipTitle": "選擇要編輯的片段",
+ "clipLabel": "片段 {{index}}"
+ },
+ "insertSourceDialog": {
+ "title": "插入來源",
+ "subtitle": "要將「{{assetLabel}}」放在時間軸的哪個位置?",
+ "addBefore": "新增至前面",
+ "addBeforeDesc": "將整個來源插入到目標片段之前。",
+ "addAfter": "新增至後面",
+ "addAfterDesc": "將整個來源插入到目標片段之後。",
+ "split": "在此處分割並插入",
+ "splitDesc": "在放置點分割目標片段,並將來源插入其中。"
+ },
+ "cropDialog": {
+ "subtitle": "拖曳區域或其控點以調整裁切區域",
+ "fieldX": "X",
+ "fieldY": "Y",
+ "fieldW": "寬",
+ "fieldH": "高"
}
}
diff --git a/src/i18n/locales/zh-TW/launch.json b/src/i18n/locales/zh-TW/launch.json
index f20f6b61c..099324a34 100644
--- a/src/i18n/locales/zh-TW/launch.json
+++ b/src/i18n/locales/zh-TW/launch.json
@@ -10,6 +10,7 @@
"openProject": "開啟專案",
"useVerticalTray": "使用直向托盤",
"useHorizontalTray": "使用橫向托盤",
+ "openStudio": "開啟工作室",
"openNotes": "開啟筆記",
"openNotesPlaceholder": "在此輸入筆記...",
"notesToolbar": {
@@ -27,7 +28,12 @@
"disableSystemAudio": "停用系統音訊",
"enableMicrophone": "啟用麥克風",
"disableMicrophone": "停用麥克風",
- "defaultMicrophone": "預設麥克風"
+ "defaultMicrophone": "預設麥克風",
+ "systemAudio": "系統音訊",
+ "microphone": "麥克風",
+ "on": "開",
+ "off": "關",
+ "inputDevice": "輸入裝置"
},
"webcam": {
"enableWebcam": "啟用攝影機",
@@ -35,7 +41,9 @@
"defaultCamera": "預設攝影機",
"searching": "正在搜尋...",
"noneFound": "未找到攝影機",
- "unavailable": "攝影機不可用"
+ "unavailable": "攝影機不可用",
+ "camera": "攝影機",
+ "cameraDevice": "攝影機裝置"
},
"cursor": {
"useEditableCursor": "使用可編輯游標",
@@ -45,6 +53,9 @@
"loading": "正在載入來源...",
"screens": "螢幕 ({{count}})",
"windows": "視窗 ({{count}})",
+ "emptyTitle": "找不到螢幕或視窗",
+ "emptyDescription": "如果您剛授予螢幕錄製權限,請重新載入此選擇器。在 macOS 上,您可能需要重新開啟 OpenScreen。",
+ "loadFailedDescription": "OpenScreen 無法載入擷取來源。請重新載入此選擇器並再試一次。",
"defaultSourceName": "螢幕"
},
"recording": {
diff --git a/src/i18n/locales/zh-TW/settings.json b/src/i18n/locales/zh-TW/settings.json
index f083da6f4..f1654a9f6 100644
--- a/src/i18n/locales/zh-TW/settings.json
+++ b/src/i18n/locales/zh-TW/settings.json
@@ -8,7 +8,8 @@
"title": "對焦模式",
"manual": "手動",
"auto": "自動",
- "autoDescription": "攝影機跟隨錄製時的游標位置"
+ "autoDescription": "攝影機跟隨錄製時的游標位置",
+ "lockedDisclaimer": "由時間軸中的全域自動對焦開關控制。關閉後可為每個縮放個別設定對焦模式。"
},
"speed": {},
"threeD": {
@@ -136,8 +137,6 @@
"textPlaceholder": "輸入您的文字...",
"fontStyle": "字體樣式",
"selectStyle": "選擇樣式",
- "textAnimation": "文字動畫",
- "selectAnimation": "選擇動畫",
"size": "大小",
"customFonts": "自訂字體",
"textColor": "文字顏色",
@@ -183,6 +182,17 @@
"modern": "現代",
"clean": "簡潔"
},
+ "textAnimation": {
+ "title": "文字動畫",
+ "selectAnimation": "選擇動畫",
+ "none": "無",
+ "fade": "淡入淡出",
+ "rise": "上升",
+ "pop": "彈出",
+ "slideLeft": "向左滑動",
+ "typewriter": "打字機",
+ "pulse": "脈動"
+ },
"customFont": {
"dialogTitle": "新增 Google 字體",
"urlLabel": "Google Fonts 匯入 URL",
@@ -203,6 +213,7 @@
"errorLoadFailed": "無法載入該字體。請確認 Google Fonts URL 是否正確。"
},
"cursor": {
+ "title": "游標",
"theme": "游標樣式",
"themeDefault": "預設",
"show": "顯示游標",
@@ -210,7 +221,8 @@
"smoothing": "平滑",
"motionBlur": "動態模糊",
"clickBounce": "點擊彈跳",
- "clipToBounds": "裁切至畫布"
+ "clipToBounds": "裁切至畫布",
+ "clipToBoundsDescription": "讓游標保持在影片畫面內。關閉後游標可超出邊緣——在縮放或平移時很有用。"
},
"language": {
"title": "語言"
@@ -218,5 +230,9 @@
"timeline": {
"title": "時間軸",
"waveform": "在剪輯軌道上顯示音訊波形"
+ },
+ "facets": {
+ "captions": "字幕",
+ "transcript": "逐字稿"
}
}
diff --git a/src/i18n/locales/zh-TW/timeline.json b/src/i18n/locales/zh-TW/timeline.json
index f30f98f16..85e444d81 100644
--- a/src/i18n/locales/zh-TW/timeline.json
+++ b/src/i18n/locales/zh-TW/timeline.json
@@ -2,6 +2,10 @@
"buttons": {
"addZoom": "新增縮放 (Z)",
"suggestZooms": "根據游標建議縮放",
+ "autoZoomOn": "自動縮放建議已開啟 — 點擊可移除建議的縮放",
+ "autoZoomOff": "自動縮放建議已關閉 — 點擊可根據游標建議縮放",
+ "autoFocusAllOn": "所有縮放的自動對焦已開啟 — 點擊可將全部切換為手動",
+ "autoFocusAllOff": "為所有縮放開啟自動對焦(攝影機跟隨游標)",
"addTrim": "新增剪輯 (T)",
"addAnnotation": "新增標註 (A)",
"addSpeed": "新增速度 (S)",
@@ -57,5 +61,32 @@
"success": {
"addedZoomSuggestions": "已新增 {{count}} 個基於游標的縮放建議",
"addedZoomSuggestionsPlural": "已新增 {{count}} 個基於游標的縮放建議"
+ },
+ "toolbar": {
+ "autoEnhance": "自動加強",
+ "automaticZooms": "自動縮放",
+ "automaticZoomsHint": "根據錄製的游標移動",
+ "smartZoomsAndCuts": "智慧縮放與剪輯",
+ "smartZoomsAndCutsHint": "使用 AI",
+ "comment": "留言",
+ "aspectRatio": "長寬比",
+ "timelineTools": "時間軸工具",
+ "arrangeClips": "排列片段",
+ "arrangeClipsHint": "拖曳下方片段以重新排序,或拖曳新片段至此",
+ "newAnnotation": "新增註解",
+ "noAnnotationsYet": "尚無註解",
+ "constantSpeed": "恆定速度",
+ "noTrims": "無剪輯片段",
+ "dragToReorderHint": "拖曳以重新排序 · 按兩下以編輯入點/出點",
+ "editInOutPoints": "編輯入點/出點",
+ "deleteClip": "刪除片段",
+ "dropToAdd": "拖放以新增至時間軸",
+ "importRecordingFirst": "請先匯入錄製內容",
+ "noAutoZoomMoments": "找不到自動縮放時刻",
+ "noAutoZoomMomentsDescription": "此錄製內容沒有游標移動資料,或現有縮放已涵蓋忙碌時刻。",
+ "addedAutoZoom": "已新增 {{count}} 個自動縮放",
+ "addedAutoZoomPlural": "已新增 {{count}} 個自動縮放",
+ "autoZoomFailed": "自動縮放失敗",
+ "aiEnhanceRequested": "已請求 AI 代理程式加強此錄製內容"
}
}
diff --git a/src/lib/ai-edition/exporter/documentExporter.test.ts b/src/lib/ai-edition/exporter/documentExporter.test.ts
index c24f61c9f..31b2025cd 100644
--- a/src/lib/ai-edition/exporter/documentExporter.test.ts
+++ b/src/lib/ai-edition/exporter/documentExporter.test.ts
@@ -1,6 +1,6 @@
import { describe, expect, it } from "vitest";
import type { AxcutClip, AxcutTrimRange } from "../schema";
-import { computeExportTrimRegions } from "./documentExporter";
+import { computeCropSchedule, computeExportTrimRegions } from "./documentExporter";
function clip(p: Partial<AxcutClip> & Pick<AxcutClip, "id">): AxcutClip {
return {
@@ -53,3 +53,42 @@ describe("computeExportTrimRegions", () => {
expect(computeExportTrimRegions(10, clips, trims, "a")).toEqual([]);
});
});
+
+describe("computeCropSchedule", () => {
+ it("builds one schedule entry per clip, defaulting to the identity crop", () => {
+ const clips = [
+ clip({ id: "c1", sourceStartSec: 0, sourceEndSec: 3 }),
+ clip({
+ id: "c2",
+ sourceStartSec: 3,
+ sourceEndSec: 6,
+ cropRegion: { x: 0.25, y: 0.25, width: 0.5, height: 0.5 },
+ }),
+ ];
+ expect(computeCropSchedule(clips, 6, "a")).toEqual([
+ { startSec: 0, endSec: 3, cropRegion: { x: 0, y: 0, width: 1, height: 1 } },
+ {
+ startSec: 3,
+ endSec: 6,
+ cropRegion: { x: 0.25, y: 0.25, width: 0.5, height: 0.5 },
+ },
+ ]);
+ });
+
+ it("falls back to sourceDurationSec when a clip's sourceEndSec is unset", () => {
+ const clips = [clip({ id: "c1", sourceStartSec: 0, sourceEndSec: undefined })];
+ expect(computeCropSchedule(clips, 12, "a")).toEqual([
+ { startSec: 0, endSec: 12, cropRegion: { x: 0, y: 0, width: 1, height: 1 } },
+ ]);
+ });
+
+ it("excludes clips that belong to a different asset", () => {
+ const clips = [
+ clip({ id: "c1", assetId: "a" }),
+ clip({ id: "c2", assetId: "other", cropRegion: { x: 0.1, y: 0.1, width: 0.5, height: 0.5 } }),
+ ];
+ expect(computeCropSchedule(clips, 10, "a")).toEqual([
+ { startSec: 0, endSec: 10, cropRegion: { x: 0, y: 0, width: 1, height: 1 } },
+ ]);
+ });
+});
diff --git a/src/lib/ai-edition/exporter/documentExporter.ts b/src/lib/ai-edition/exporter/documentExporter.ts
index 9813e1a10..3ac1bf572 100644
--- a/src/lib/ai-edition/exporter/documentExporter.ts
+++ b/src/lib/ai-edition/exporter/documentExporter.ts
@@ -22,6 +22,7 @@ import {
type ZoomRegion,
} from "@/components/video-editor/types";
import {
+ type CropScheduleEntry,
type ExportFormat,
type ExportQuality,
GifExporter,
@@ -116,6 +117,29 @@ export function computeExportTrimRegions(
}));
}
+const IDENTITY_CROP: CropRegion = { x: 0, y: 0, width: 1, height: 1 };
+
+// Crop is per-clip (clipSchema.cropRegion), applied clip-by-clip — not
+// per-frame interpolation. The export renderer switches to whichever entry's
+// [startSec, endSec) covers the current frame's SOURCE time right before
+// rendering it (see VideoExporter/GifExporter + FrameRenderer.setCropRegion).
+// Only clips on `primaryAssetId` matter here — export renders one continuous
+// source video (the primary asset), so a clip pointing at a different asset
+// has no meaningful source-time range against this one.
+export function computeCropSchedule(
+ clips: AxcutDocument["timeline"]["clips"],
+ sourceDurationSec: number,
+ primaryAssetId: string,
+): CropScheduleEntry[] {
+ return clips
+ .filter((c) => c.assetId === primaryAssetId)
+ .map((c) => ({
+ startSec: c.sourceStartSec,
+ endSec: c.sourceEndSec ?? sourceDurationSec,
+ cropRegion: c.cropRegion ?? IDENTITY_CROP,
+ }));
+}
+
function extractLegacyField<T>(
legacy: Record<string, unknown> | null,
key: string,
@@ -170,12 +194,8 @@ export async function exportAxcutDocument(
const motionBlurAmount = extractLegacyField(legacy, "motionBlurAmount", 0);
const borderRadius = extractLegacyField(legacy, "borderRadius", 0);
const padding = extractLegacyField(legacy, "padding", 50);
- const cropRegion = extractLegacyField<CropRegion>(legacy, "cropRegion", {
- x: 0,
- y: 0,
- width: 1,
- height: 1,
- });
+ const cropSchedule = computeCropSchedule(clips, sourceDurationSec, asset.id);
+ const cropRegion: CropRegion = IDENTITY_CROP;
const webcamLayoutPreset = extractLegacyField(legacy, "webcamLayoutPreset", "picture-in-picture");
const webcamMaskShape = extractLegacyField(legacy, "webcamMaskShape", "rectangle");
const webcamMirrored = extractLegacyField(legacy, "webcamMirrored", false);
@@ -221,6 +241,7 @@ export async function exportAxcutDocument(
borderRadius,
padding,
cropRegion,
+ cropSchedule,
annotationRegions,
webcamLayoutPreset: webcamLayoutPreset as
| "picture-in-picture"
diff --git a/src/lib/ai-edition/schema/index.ts b/src/lib/ai-edition/schema/index.ts
index a6f9ab261..09dc9687d 100644
--- a/src/lib/ai-edition/schema/index.ts
+++ b/src/lib/ai-edition/schema/index.ts
@@ -99,6 +99,20 @@ export const assetSchema = z.object({
cameraTrack: cameraTrackSchema,
});
+// A crop is a sub-rectangle of the source video, expressed as fractions
+// (0-1) of its full frame. Lives on the clip (not the document/legacyEditor
+// envelope) since a crop frames one specific piece of footage — two clips
+// cut from the same or different assets can reasonably want different
+// framings. Mirrors `CropRegion` in `src/components/video-editor/types.ts`;
+// duplicated here so the schema package has no dependency on the React
+// editor module (same rationale as AnnotationRegion/ZoomRegion above).
+export const clipCropRegionSchema = z.object({
+ x: z.number().min(0).max(1),
+ y: z.number().min(0).max(1),
+ width: z.number().min(0).max(1),
+ height: z.number().min(0).max(1),
+});
+
export const clipSchema = z
.object({
id: z.string().min(1),
@@ -113,6 +127,10 @@ export const clipSchema = z
wordRefs: z.array(z.string().min(1)).default([]),
origin: z.enum(["system", "agent", "user"]),
reason: z.string().default(""),
+ // Absent/undefined means "no crop" (full frame) — callers should treat
+ // that as the identity region {x:0,y:0,width:1,height:1} rather than
+ // storing the identity explicitly, so untouched clips stay lean.
+ cropRegion: clipCropRegionSchema.optional(),
})
.refine((data) => data.timelineEndSec >= data.timelineStartSec, {
message: "timelineEndSec must be greater than or equal to timelineStartSec",
@@ -544,6 +562,7 @@ export type AxcutTranscriptSegment = z.infer<typeof transcriptSegmentSchema>;
export type AxcutTranscript = z.infer<typeof transcriptSchema>;
export type AxcutAsset = z.infer<typeof assetSchema>;
export type AxcutClip = z.infer<typeof clipSchema>;
+export type AxcutClipCropRegion = z.infer<typeof clipCropRegionSchema>;
export type AxcutGap = z.infer<typeof gapSchema>;
export type AxcutTrimRange = z.infer<typeof trimRangeSchema>;
export type AxcutTimeline = z.infer<typeof timelineSchema>;
diff --git a/src/lib/ai-edition/store/undo.ts b/src/lib/ai-edition/store/undo.ts
index 6742697a3..81ab02159 100644
--- a/src/lib/ai-edition/store/undo.ts
+++ b/src/lib/ai-edition/store/undo.ts
@@ -72,6 +72,11 @@ export function useUndoRedoShortcuts(onAfter: () => void) {
if (redo()) onAfterRef.current();
return;
}
+ if (ctrl && e.key.toLowerCase() === "y") {
+ e.preventDefault();
+ if (redo()) onAfterRef.current();
+ return;
+ }
if (ctrl && e.key === "z") {
e.preventDefault();
if (undo()) onAfterRef.current();
diff --git a/src/lib/ai-edition/store/useTimeline.ts b/src/lib/ai-edition/store/useTimeline.ts
index 6d56a73ad..545d31573 100644
--- a/src/lib/ai-edition/store/useTimeline.ts
+++ b/src/lib/ai-edition/store/useTimeline.ts
@@ -12,7 +12,7 @@ import {
moveClip as moveClipInDocument,
resequenceClips,
} from "../document/timeline";
-import type { AxcutDocument } from "../schema";
+import type { AxcutClipCropRegion, AxcutDocument } from "../schema";
import { probeVideoDuration } from "../timeline/duration";
import { resolveTimelineSpanToTrim } from "../timeline/trim-mapping";
import type { AutoZoomSuggestion } from "../timeline/zoom-suggestions";
@@ -683,6 +683,25 @@ export function useTimeline() {
[document, saveDocument],
);
+ // Crop is a per-clip framing, not a document-wide setting — two clips
+ // (even from the same asset) can reasonably want different crops. Passing
+ // `null` clears it back to "no crop" (full frame) instead of storing the
+ // identity region explicitly.
+ const updateClipCrop = useCallback(
+ async (clipId: string, region: AxcutClipCropRegion | null) => {
+ if (!document) return;
+ const arr = document.timeline.clips.map((c) =>
+ c.id === clipId ? { ...c, cropRegion: region ?? undefined } : c,
+ );
+ const next: AxcutDocument = {
+ ...document,
+ timeline: { ...document.timeline, clips: arr },
+ };
+ await saveDocument(next);
+ },
+ [document, saveDocument],
+ );
+
const splitAndInsert = useCallback(
async (assetId: string, splitTimeSec: number) => {
if (!document) return;
@@ -924,6 +943,7 @@ export function useTimeline() {
addClipAfter,
editClip,
updateClipSourceRange,
+ updateClipCrop,
splitAndInsert,
insertClipAt,
moveClip,
diff --git a/src/lib/ai-edition/timeline/aggregated-transcript.test.ts b/src/lib/ai-edition/timeline/aggregated-transcript.test.ts
index 261e97ca3..1956121bb 100644
--- a/src/lib/ai-edition/timeline/aggregated-transcript.test.ts
+++ b/src/lib/ai-edition/timeline/aggregated-transcript.test.ts
@@ -1,6 +1,11 @@
import { describe, expect, it } from "vitest";
import type { AxcutAsset, AxcutClip, AxcutTranscript, AxcutTrimRange } from "../schema";
-import { buildAggregatedSections, buildClipSection, findCueWordId } from "./aggregated-transcript";
+import {
+ buildAggregatedSections,
+ buildClipSection,
+ findCueWordId,
+ isSilenceWord,
+} from "./aggregated-transcript";
function makeClip(overrides: Partial<AxcutClip> = {}): AxcutClip {
return {
@@ -124,7 +129,9 @@ describe("buildClipSection", () => {
const trim = makeTrim({ id: "trim_x", assetId: "asset_2", startSec: 0.5, endSec: 2.5 });
const section = buildClipSection(clip, transcript, makeAsset(), [trim]);
- expect(section.words.map((cw) => cw.kept)).toEqual([true, true]);
+ // Trailing gap 2s→3s is a silence — the different-asset trim doesn't
+ // cover any of the three entries, so all stay kept.
+ expect(section.words.map((cw) => cw.kept)).toEqual([true, true, true]);
});
it("treats every word the same (no filler concept)", () => {
@@ -160,7 +167,49 @@ describe("buildClipSection", () => {
]);
const section = buildClipSection(clip, transcript, makeAsset(), []);
- expect(section.words.map((cw) => cw.word.id)).toEqual(["w_mid"]);
+ // Leading (2s→2.5s) and trailing (3.5s→4s) gaps are both silences.
+ expect(section.words.map((cw) => cw.word.id)).toEqual(["silence_1", "w_mid", "silence_2"]);
+ });
+});
+
+describe("silence gaps", () => {
+ it("inserts a [silence] pseudo-word for gaps at or above the threshold", () => {
+ const clip = makeClip({ sourceStartSec: 0, sourceEndSec: 3 });
+ const transcript = makeTranscript([
+ { id: "w1", segmentId: "s1", startSec: 0, endSec: 1, text: "hi" },
+ { id: "w2", segmentId: "s1", startSec: 1.3, endSec: 2, text: "there" },
+ ]);
+
+ const section = buildClipSection(clip, transcript, makeAsset(), []);
+ const ids = section.words.map((cw) => cw.word.id);
+ expect(ids).toEqual(["w1", "silence_1", "w2", "silence_2"]);
+ expect(section.words.filter((cw) => isSilenceWord(cw.word))).toHaveLength(2);
+ expect(section.words[1]?.word.text).toBe("[silence]");
+ });
+
+ it("does not insert a silence for gaps under the threshold", () => {
+ const clip = makeClip({ sourceStartSec: 0, sourceEndSec: 2 });
+ const transcript = makeTranscript([
+ { id: "w1", segmentId: "s1", startSec: 0, endSec: 1, text: "hi" },
+ { id: "w2", segmentId: "s1", startSec: 1.1, endSec: 2, text: "there" },
+ ]);
+
+ const section = buildClipSection(clip, transcript, makeAsset(), []);
+ expect(section.words.map((cw) => cw.word.id)).toEqual(["w1", "w2"]);
+ });
+
+ it("marks a silence as removed when a trim range covers it, restorable via its trimId", () => {
+ const clip = makeClip({ sourceStartSec: 0, sourceEndSec: 3 });
+ const transcript = makeTranscript([
+ { id: "w1", segmentId: "s1", startSec: 0, endSec: 1, text: "hi" },
+ { id: "w2", segmentId: "s1", startSec: 2, endSec: 3, text: "there" },
+ ]);
+ const trim = makeTrim({ id: "trim_silence", startSec: 1, endSec: 2 });
+
+ const section = buildClipSection(clip, transcript, makeAsset(), [trim]);
+ const silence = section.words.find((cw) => isSilenceWord(cw.word));
+ expect(silence?.kept).toBe(false);
+ expect(silence?.trimId).toBe("trim_silence");
});
});
diff --git a/src/lib/ai-edition/timeline/aggregated-transcript.ts b/src/lib/ai-edition/timeline/aggregated-transcript.ts
index 1102f3f06..fed4f7490 100644
--- a/src/lib/ai-edition/timeline/aggregated-transcript.ts
+++ b/src/lib/ai-edition/timeline/aggregated-transcript.ts
@@ -16,6 +16,53 @@
import type { AxcutAsset, AxcutClip, AxcutTranscript, AxcutTrimRange, AxcutWord } from "../schema";
+/** Gaps between words at least this long are surfaced as a `[silence]` token. */
+export const SILENCE_THRESHOLD_SEC = 0.2;
+
+/** True for the synthetic `[silence]` pseudo-words inserted by `withSilenceGaps`. */
+export function isSilenceWord(word: AxcutWord): boolean {
+ return word.id.startsWith("silence_");
+}
+
+/**
+ * Insert a synthetic `[silence]` pseudo-word into every gap of at least
+ * `SILENCE_THRESHOLD_SEC` between consecutive words (and at the clip's
+ * leading/trailing edges). These behave like any other word for trim
+ * tagging/runs — `buildClipSection` marks them kept/removed the same way —
+ * so the transcript panel can show already-trimmed silences distinctly
+ * from untrimmed ones and let the user trim/restore them directly.
+ */
+function withSilenceGaps(
+ words: AxcutWord[],
+ clipStartSec: number,
+ clipEndSec: number | undefined,
+): AxcutWord[] {
+ const sorted = [...words].sort((a, b) => a.startSec - b.startSec);
+ const result: AxcutWord[] = [];
+ let cursor = clipStartSec;
+ let n = 0;
+ const pushGap = (start: number, end: number) => {
+ if (end - start < SILENCE_THRESHOLD_SEC) return;
+ n += 1;
+ result.push({
+ id: `silence_${n}`,
+ segmentId: "silence",
+ startSec: start,
+ endSec: end,
+ text: "[silence]",
+ });
+ };
+ for (const word of sorted) {
+ pushGap(cursor, word.startSec);
+ result.push(word);
+ cursor = Math.max(cursor, word.endSec);
+ }
+ if (typeof clipEndSec === "number" && Number.isFinite(clipEndSec)) {
+ pushGap(cursor, clipEndSec);
+ }
+ return result;
+}
+
/** A contiguous run of removed words inside one clip's source range. */
export interface TrimRun {
/** Id of the trim range this run came from (used by the bin-icon restore). */
@@ -81,7 +128,11 @@ export function buildClipSection(
);
const words = transcript
- ? wordsInRange(transcript, clip.sourceStartSec, clip.sourceEndSec ?? Infinity)
+ ? withSilenceGaps(
+ wordsInRange(transcript, clip.sourceStartSec, clip.sourceEndSec ?? Infinity),
+ clip.sourceStartSec,
+ clip.sourceEndSec,
+ )
: [];
const tagged: ClipWord[] = words.map((word) => {
const covering = findCoveringTrim(word, clipTrims);
diff --git a/src/lib/ai-edition/timeline/virtual-preview.test.ts b/src/lib/ai-edition/timeline/virtual-preview.test.ts
index 172503778..052ff440f 100644
--- a/src/lib/ai-edition/timeline/virtual-preview.test.ts
+++ b/src/lib/ai-edition/timeline/virtual-preview.test.ts
@@ -111,4 +111,52 @@ describe("virtual-preview pure functions", () => {
const posNone = locateSourcePosition(multiClips, 5, "a3");
expect(posNone).toBeNull();
});
+
+ it("locateSourcePosition prefers the given clip id when two clips share an asset and overlap in source-time", () => {
+ // Same asset, identical (untrimmed) source range — e.g. the same clip
+ // duplicated, or the same recording dropped onto the timeline twice.
+ const duplicateClips: AxcutClip[] = [
+ {
+ id: "clip_1",
+ assetId: "a1",
+ sourceStartSec: 0,
+ sourceEndSec: 10,
+ timelineStartSec: 0,
+ timelineEndSec: 10,
+ wordRefs: [],
+ origin: "system",
+ reason: "",
+ },
+ {
+ id: "clip_2",
+ assetId: "a1",
+ sourceStartSec: 0,
+ sourceEndSec: 10,
+ timelineStartSec: 10,
+ timelineEndSec: 20,
+ wordRefs: [],
+ origin: "system",
+ reason: "",
+ },
+ ];
+
+ // Without a preferred clip id, the ambiguous scan always resolves to
+ // the earliest matching clip — this is the bug: playing back the
+ // second clip's segment would still report position/identity for the
+ // first.
+ const ambiguous = locateSourcePosition(duplicateClips, 5, "a1");
+ expect(ambiguous?.clip.id).toBe("clip_1");
+
+ // With the currently-active clip id passed through, it's preferred
+ // even though clip_1 also matches (assetId, sourceTime).
+ const disambiguated = locateSourcePosition(duplicateClips, 5, "a1", 0.05, "clip_2");
+ expect(disambiguated?.clip.id).toBe("clip_2");
+ expect(disambiguated?.virtualTimeSec).toBe(15);
+
+ // A preferred clip id that no longer applies (source time moved
+ // outside its range) falls back to the ambiguous scan rather than
+ // forcing a stale match.
+ const outOfRange = locateSourcePosition(duplicateClips, 5, "a1", 0.05, "clip_3");
+ expect(outOfRange?.clip.id).toBe("clip_1");
+ });
});
diff --git a/src/lib/ai-edition/timeline/virtual-preview.ts b/src/lib/ai-edition/timeline/virtual-preview.ts
index cd4625003..ab2ea1a97 100644
--- a/src/lib/ai-edition/timeline/virtual-preview.ts
+++ b/src/lib/ai-edition/timeline/virtual-preview.ts
@@ -41,22 +41,11 @@ export function locateVirtualPosition(
};
}
-export function locateSourcePosition(
+function toPositionAt(
clips: AxcutClip[],
+ clipIndex: number,
sourceTimeSec: number,
- assetId?: string,
- epsilon = 0.05,
-): VirtualPosition | null {
- const clipIndex = clips.findIndex((clip, index) => {
- if (assetId && clip.assetId !== assetId) return false;
- const lowerBound = clip.sourceStartSec - epsilon;
- const upperBound =
- index === clips.length - 1
- ? (clip.sourceEndSec ?? 0) + epsilon
- : (clip.sourceEndSec ?? 0) - epsilon;
- return sourceTimeSec >= lowerBound && sourceTimeSec <= upperBound;
- });
- if (clipIndex < 0) return null;
+): VirtualPosition {
const clip = clips[clipIndex];
const sourceOffset = Math.max(
0,
@@ -70,6 +59,57 @@ export function locateSourcePosition(
};
}
+function isWithinClipBounds(
+ clip: AxcutClip,
+ index: number,
+ total: number,
+ sourceTimeSec: number,
+ epsilon: number,
+): boolean {
+ const lowerBound = clip.sourceStartSec - epsilon;
+ const upperBound =
+ index === total - 1 ? (clip.sourceEndSec ?? 0) + epsilon : (clip.sourceEndSec ?? 0) - epsilon;
+ return sourceTimeSec >= lowerBound && sourceTimeSec <= upperBound;
+}
+
+export function locateSourcePosition(
+ clips: AxcutClip[],
+ sourceTimeSec: number,
+ assetId?: string,
+ epsilon = 0.05,
+ // When two clips share the same source asset (and possibly overlapping
+ // source ranges — a duplicated clip, or simply not trimmed yet), scanning
+ // by (assetId, sourceTime) alone is ambiguous and always resolves to the
+ // earliest matching clip in array order — even while a *later* clip of
+ // that same asset is the one actually playing. Callers that already know
+ // which clip they're tracking (VirtualPreview, mid-playback) should pass
+ // its id here so it's preferred whenever the source time still falls
+ // inside it, before falling back to the ambiguous asset-wide scan.
+ preferredClipId?: string,
+): VirtualPosition | null {
+ if (preferredClipId) {
+ const preferredIndex = clips.findIndex((clip) => clip.id === preferredClipId);
+ if (
+ preferredIndex >= 0 &&
+ isWithinClipBounds(
+ clips[preferredIndex],
+ preferredIndex,
+ clips.length,
+ sourceTimeSec,
+ epsilon,
+ )
+ ) {
+ return toPositionAt(clips, preferredIndex, sourceTimeSec);
+ }
+ }
+ const clipIndex = clips.findIndex((clip, index) => {
+ if (assetId && clip.assetId !== assetId) return false;
+ return isWithinClipBounds(clip, index, clips.length, sourceTimeSec, epsilon);
+ });
+ if (clipIndex < 0) return null;
+ return toPositionAt(clips, clipIndex, sourceTimeSec);
+}
+
export function keptWordIdSet(clips: AxcutClip[]): Set<string> {
return new Set(clips.flatMap((clip) => clip.wordRefs));
}
diff --git a/src/lib/exporter/frameRenderer.ts b/src/lib/exporter/frameRenderer.ts
index b5e09e04c..7f2c03bd1 100644
--- a/src/lib/exporter/frameRenderer.ts
+++ b/src/lib/exporter/frameRenderer.ts
@@ -187,6 +187,18 @@ export class FrameRenderer {
};
}
+ /**
+ * Swaps the active crop before rendering the next frame — crop is per-clip
+ * (see clipSchema.cropRegion), not a single value for the whole export.
+ * `updateLayout()` (called at the top of every `renderFrame`) reads
+ * `this.config.cropRegion` fresh each time, and the cursor overlay does
+ * the same, so mutating it here is picked up correctly by both without
+ * any extra cache invalidation.
+ */
+ setCropRegion(cropRegion: CropRegion): void {
+ this.config.cropRegion = cropRegion;
+ }
+
async initialize(): Promise<void> {
const canvas = document.createElement("canvas");
canvas.width = this.config.width;
diff --git a/src/lib/exporter/gifExporter.ts b/src/lib/exporter/gifExporter.ts
index 1a5ef56e8..ce2df298d 100644
--- a/src/lib/exporter/gifExporter.ts
+++ b/src/lib/exporter/gifExporter.ts
@@ -22,6 +22,7 @@ import type {
GifFrameRate,
GifSizePreset,
} from "./types";
+import { type CropScheduleEntry, resolveCropAt } from "./videoExporter";
const GIF_WORKER_URL = new URL("gif.js/dist/gif.worker.js", import.meta.url).toString();
@@ -46,6 +47,8 @@ interface GifExporterConfig {
padding?: number;
videoPadding?: number;
cropRegion: CropRegion;
+ /** Per-clip crop, in source-media time — see VideoExporterConfig.cropSchedule. */
+ cropSchedule?: CropScheduleEntry[];
webcamLayoutPreset?: WebcamLayoutPreset;
webcamMaskShape?: import("@/components/video-editor/types").WebcamMaskShape;
webcamMirrored?: boolean;
@@ -281,6 +284,13 @@ export class GifExporter {
}
const sourceTimestampUs = sourceTimestampMs * 1000; // us
+ renderer.setCropRegion(
+ resolveCropAt(
+ this.config.cropSchedule,
+ sourceTimestampMs / 1000,
+ this.config.cropRegion,
+ ),
+ );
await renderer.renderFrame(videoFrame, sourceTimestampUs, webcamFrame);
const canvas = renderer.getCanvas();
diff --git a/src/lib/exporter/index.ts b/src/lib/exporter/index.ts
index 8ac404fac..9d4f96d6f 100644
--- a/src/lib/exporter/index.ts
+++ b/src/lib/exporter/index.ts
@@ -26,4 +26,4 @@ export {
VALID_GIF_FRAME_RATES,
} from "./types";
export { VideoFileDecoder } from "./videoDecoder";
-export { VideoExporter } from "./videoExporter";
+export { type CropScheduleEntry, resolveCropAt, VideoExporter } from "./videoExporter";
diff --git a/src/lib/exporter/muxer.ts b/src/lib/exporter/muxer.ts
index b640a806a..6ac81d9bb 100644
--- a/src/lib/exporter/muxer.ts
+++ b/src/lib/exporter/muxer.ts
@@ -10,6 +10,15 @@ import type { ExportConfig } from "./types";
export type ExportAudioMuxerCodec = "aac" | "opus";
+// Map a WebCodecs codec string (e.g. "avc1.640033", "hvc1.1.6.L120.90",
+// "vp09.00.10.08") to its codec family.
+export function videoCodecFamily(codec: string | undefined): "avc" | "hevc" | "vp9" {
+ const lower = (codec ?? "").toLowerCase();
+ if (lower.startsWith("hvc1") || lower.startsWith("hev1")) return "hevc";
+ if (lower.startsWith("vp09") || lower.startsWith("vp9")) return "vp9";
+ return "avc";
+}
+
export class VideoMuxer {
private output: Output | null = null;
private videoSource: EncodedVideoPacketSource | null = null;
@@ -25,15 +34,6 @@ export class VideoMuxer {
this.audioCodec = audioCodec;
}
- // Map the WebCodecs codec string (e.g. "avc1.640033", "hvc1.1.6.L120.90",
- // "vp09.00.10.08") to mediabunny's codec family for the mp4 track.
- private videoCodecFamily(): "avc" | "hevc" | "vp9" {
- const codec = (this.config.codec ?? "").toLowerCase();
- if (codec.startsWith("hvc1") || codec.startsWith("hev1")) return "hevc";
- if (codec.startsWith("vp09") || codec.startsWith("vp9")) return "vp9";
- return "avc";
- }
-
async initialize(): Promise<void> {
this.target = new BufferTarget();
@@ -46,7 +46,7 @@ export class VideoMuxer {
// Codec details are deduced from the chunk metadata; the family must
// match the encoder codec (F2.4 exposes h264/h265/vp9 in the dialog).
- this.videoSource = new EncodedVideoPacketSource(this.videoCodecFamily());
+ this.videoSource = new EncodedVideoPacketSource(videoCodecFamily(this.config.codec));
this.output.addVideoTrack(this.videoSource, {
frameRate: this.config.frameRate,
});
diff --git a/src/lib/exporter/videoExporter.test.ts b/src/lib/exporter/videoExporter.test.ts
index 4ce257e36..61dad9f72 100644
--- a/src/lib/exporter/videoExporter.test.ts
+++ b/src/lib/exporter/videoExporter.test.ts
@@ -2,6 +2,7 @@ import { describe, expect, it, vi } from "vitest";
import {
getSourceCopyFastPathBlockers,
isSourceCopyFastPathEligible,
+ resolveCropAt,
type VideoExporterConfig,
waitForEncoderQueueSpace,
} from "./videoExporter";
@@ -31,12 +32,28 @@ describe("isSourceCopyFastPathEligible", () => {
isSourceCopyFastPathEligible(createConfig(), {
width: 1920,
height: 1080,
+ frameRate: 60,
+ codec: "avc1.640033",
}),
).toBe(true);
});
+ it("rejects a frame rate or codec that differs from the source", () => {
+ const videoInfo = { width: 1920, height: 1080, frameRate: 60, codec: "avc1.640033" };
+
+ expect(isSourceCopyFastPathEligible(createConfig({ frameRate: 30 }), videoInfo)).toBe(false);
+ expect(
+ isSourceCopyFastPathEligible(createConfig({ codec: "hvc1.1.6.L120.90" }), videoInfo),
+ ).toBe(false);
+ // A container-rounded rate (59.94 vs the nominal 60) shouldn't force a
+ // re-encode on its own.
+ expect(isSourceCopyFastPathEligible(createConfig(), { ...videoInfo, frameRate: 59.94 })).toBe(
+ true,
+ );
+ });
+
it("rejects timeline edits and frame-level effects", () => {
- const videoInfo = { width: 1920, height: 1080 };
+ const videoInfo = { width: 1920, height: 1080, frameRate: 60, codec: "avc1.640033" };
expect(
isSourceCopyFastPathEligible(
@@ -82,7 +99,7 @@ describe("isSourceCopyFastPathEligible", () => {
});
it("rejects resizing and overlays", () => {
- const videoInfo = { width: 1920, height: 1080 };
+ const videoInfo = { width: 1920, height: 1080, frameRate: 60, codec: "avc1.640033" };
expect(isSourceCopyFastPathEligible(createConfig({ width: 1280 }), videoInfo)).toBe(false);
expect(
@@ -126,31 +143,63 @@ describe("getSourceCopyFastPathBlockers", () => {
getSourceCopyFastPathBlockers(createConfig({ height: 1080 }), {
width: 1920,
height: 1032,
+ frameRate: 60,
+ codec: "avc1.640033",
}),
).toContain("output-size 1920x1080 differs from source 1920x1032");
});
- // A verbatim source copy would carry over every audio track; most players play only
- // the first, which on native macOS captures is often the silent system track — the
- // #108 bug. Multi-track sources must be blocked from the copy path so they get mixed.
- it("blocks the copy path when the source has multiple audio tracks (#108)", () => {
- expect(
- getSourceCopyFastPathBlockers(createConfig(), {
- width: 1920,
- height: 1080,
- audioStreamCount: 2,
+ it("blocks the fast path when any clip in the crop schedule has a non-default crop", () => {
+ const videoInfo = { width: 1920, height: 1080, frameRate: 60, codec: "avc1.640033" };
+ const blockers = getSourceCopyFastPathBlockers(
+ createConfig({
+ cropSchedule: [
+ { startSec: 0, endSec: 3, cropRegion: { x: 0, y: 0, width: 1, height: 1 } },
+ { startSec: 3, endSec: 6, cropRegion: { x: 0.25, y: 0.25, width: 0.5, height: 0.5 } },
+ ],
}),
- ).toContain("source has multiple audio tracks (must be mixed)");
+ videoInfo,
+ );
+ expect(blockers).toContain("crop is not default");
});
- it("does not report the audio-track blocker for a single-track source", () => {
- expect(
- getSourceCopyFastPathBlockers(createConfig(), {
- width: 1920,
- height: 1080,
- audioStreamCount: 1,
+ it("allows the fast path when every clip in the crop schedule is default", () => {
+ const videoInfo = { width: 1920, height: 1080, frameRate: 60, codec: "avc1.640033" };
+ const blockers = getSourceCopyFastPathBlockers(
+ createConfig({
+ cropSchedule: [
+ { startSec: 0, endSec: 3, cropRegion: { x: 0, y: 0, width: 1, height: 1 } },
+ { startSec: 3, endSec: 6, cropRegion: { x: 0, y: 0, width: 1, height: 1 } },
+ ],
}),
- ).not.toContain("source has multiple audio tracks (must be mixed)");
+ videoInfo,
+ );
+ expect(blockers).not.toContain("crop is not default");
+ });
+});
+
+describe("resolveCropAt", () => {
+ const identity = { x: 0, y: 0, width: 1, height: 1 };
+ const halfCrop = { x: 0.25, y: 0.25, width: 0.5, height: 0.5 };
+ const schedule = [
+ { startSec: 0, endSec: 3, cropRegion: halfCrop },
+ { startSec: 3, endSec: 6, cropRegion: identity },
+ ];
+
+ it("picks the schedule entry covering the given source time", () => {
+ expect(resolveCropAt(schedule, 1.5, identity)).toBe(halfCrop);
+ expect(resolveCropAt(schedule, 4, identity)).toBe(identity);
+ });
+
+ it("treats entry end as exclusive so back-to-back clips don't overlap", () => {
+ expect(resolveCropAt(schedule, 3, identity)).toBe(identity);
+ });
+
+ it("falls back when nothing covers the timestamp or the schedule is absent", () => {
+ const fallback = { x: 0.1, y: 0.1, width: 0.8, height: 0.8 };
+ expect(resolveCropAt(schedule, 10, fallback)).toBe(fallback);
+ expect(resolveCropAt(undefined, 1.5, fallback)).toBe(fallback);
+ expect(resolveCropAt([], 1.5, fallback)).toBe(fallback);
});
});
diff --git a/src/lib/exporter/videoExporter.ts b/src/lib/exporter/videoExporter.ts
index 03af3fa88..a3ac11d50 100644
--- a/src/lib/exporter/videoExporter.ts
+++ b/src/lib/exporter/videoExporter.ts
@@ -13,7 +13,7 @@ import type { CursorRecordingData } from "@/native/contracts";
import { getPlatform } from "@/utils/platformUtils";
import { AudioProcessor } from "./audioEncoder";
import { FrameRenderer } from "./frameRenderer";
-import { VideoMuxer } from "./muxer";
+import { VideoMuxer, videoCodecFamily } from "./muxer";
import { MAX_IN_MEMORY_SOURCE_BYTES } from "./sourceFileLimits";
import { StreamingVideoDecoder } from "./streamingDecoder";
import { TimestampedVideoFrameQueue } from "./timestampedVideoFrameQueue";
@@ -53,6 +53,16 @@ export async function waitForEncoderQueueSpace(params: {
}
}
+/** One clip's crop, in SOURCE-media time — the export renderer switches to
+ * the covering entry's `cropRegion` before rendering each frame, so a crop
+ * applies to its own clip only (see clipSchema.cropRegion), not the whole
+ * export. */
+export interface CropScheduleEntry {
+ startSec: number;
+ endSec: number;
+ cropRegion: CropRegion;
+}
+
export interface VideoExporterConfig extends ExportConfig {
videoUrl: string;
webcamVideoUrl?: string;
@@ -68,7 +78,13 @@ export interface VideoExporterConfig extends ExportConfig {
borderRadius?: number;
padding?: number;
videoPadding?: number;
+ /** Fallback crop when `cropSchedule` is absent or a source timestamp
+ * doesn't fall in any entry (e.g. no clips info available). */
cropRegion: CropRegion;
+ /** Per-clip crop, in source-media time. When present, takes priority over
+ * the flat `cropRegion` for every frame that falls inside one of its
+ * entries. */
+ cropSchedule?: CropScheduleEntry[];
webcamLayoutPreset?: WebcamLayoutPreset;
webcamMaskShape?: import("@/components/video-editor/types").WebcamMaskShape;
webcamMirrored?: boolean;
@@ -91,6 +107,10 @@ export interface VideoExporterConfig extends ExportConfig {
}
const SOURCE_COPY_EPSILON = 0.0001;
+// Looser than SOURCE_COPY_EPSILON: container-reported avg frame rate is a
+// rounded rational (e.g. 59.94 for a "60fps" recording), so this only needs
+// to catch a genuinely different rate selection (24/30/60), not that noise.
+const FRAME_RATE_EPSILON = 0.5;
function hasActiveTimeRegions(regions?: Array<{ startMs: number; endMs: number }>) {
return Boolean(regions?.some((region) => region.endMs - region.startMs > SOURCE_COPY_EPSILON));
@@ -119,16 +139,45 @@ function isDefaultCrop(cropRegion: CropRegion) {
);
}
+function hasNonDefaultCrop(config: VideoExporterConfig): boolean {
+ if (config.cropSchedule && config.cropSchedule.length > 0) {
+ return config.cropSchedule.some((entry) => !isDefaultCrop(entry.cropRegion));
+ }
+ return !isDefaultCrop(config.cropRegion);
+}
+
+/** Finds which clip's crop applies at a given SOURCE-media timestamp — the
+ * first schedule entry whose [startSec, endSec) covers it, falling back to
+ * `fallback` when the schedule is absent or nothing covers it (e.g. a gap). */
+export function resolveCropAt(
+ schedule: CropScheduleEntry[] | undefined,
+ sourceSec: number,
+ fallback: CropRegion,
+): CropRegion {
+ if (!schedule || schedule.length === 0) return fallback;
+ const covering = schedule.find(
+ (entry) => sourceSec >= entry.startSec && sourceSec < entry.endSec,
+ );
+ return covering?.cropRegion ?? fallback;
+}
+
+interface SourceCopyVideoInfo {
+ width: number;
+ height: number;
+ frameRate: number;
+ codec: string;
+}
+
export function isSourceCopyFastPathEligible(
config: VideoExporterConfig,
- videoInfo: { width: number; height: number; audioStreamCount?: number },
+ videoInfo: SourceCopyVideoInfo,
) {
return getSourceCopyFastPathBlockers(config, videoInfo).length === 0;
}
export function getSourceCopyFastPathBlockers(
config: VideoExporterConfig,
- videoInfo: { width: number; height: number; audioStreamCount?: number },
+ videoInfo: SourceCopyVideoInfo,
) {
const blockers: string[] = [];
@@ -137,12 +186,15 @@ export function getSourceCopyFastPathBlockers(
`output-size ${config.width}x${config.height} differs from source ${videoInfo.width}x${videoInfo.height}`,
);
}
- // Copying the source verbatim would carry over its multiple audio tracks (native
- // macOS writes system audio + mic separately). Most players play only the first,
- // which is often the silent system track — so multi-track sources must go through
- // the full pipeline, which mixes every track into one (issue #108).
- if ((videoInfo.audioStreamCount ?? 0) > 1) {
- blockers.push("source has multiple audio tracks (must be mixed)");
+ // A copied file keeps the source's exact frame rate/codec — if the user
+ // picked a different one in the export dialog, honor it by re-encoding
+ // instead of silently shipping the source's encoding under a different
+ // label.
+ if (Math.abs(config.frameRate - videoInfo.frameRate) > FRAME_RATE_EPSILON) {
+ blockers.push(`frame rate ${config.frameRate} differs from source ${videoInfo.frameRate}`);
+ }
+ if (config.codec && videoCodecFamily(config.codec) !== videoCodecFamily(videoInfo.codec)) {
+ blockers.push(`codec ${config.codec} differs from source ${videoInfo.codec}`);
}
if (config.webcamVideoUrl) blockers.push("webcam overlay is enabled");
if (hasActiveTimeRegions(config.trimRegions)) blockers.push("trim regions are present");
@@ -153,7 +205,7 @@ export function getSourceCopyFastPathBlockers(
if (hasActiveTimeRegions(config.annotationRegions))
blockers.push("annotation regions are present");
if (hasNativeCursorOverlay(config)) blockers.push("editable cursor overlay is enabled");
- if (!isDefaultCrop(config.cropRegion)) blockers.push("crop is not default");
+ if (hasNonDefaultCrop(config)) blockers.push("crop is not default");
if ((config.padding ?? 0) > SOURCE_COPY_EPSILON) blockers.push("padding is not zero");
if ((config.videoPadding ?? 0) > SOURCE_COPY_EPSILON) blockers.push("video padding is not zero");
if ((config.borderRadius ?? 0) > SOURCE_COPY_EPSILON) blockers.push("roundness is not zero");
@@ -412,6 +464,16 @@ export class VideoExporter {
}
const sourceTimestampUs = sourceTimestampMs * 1000;
+ // Crop is per-clip — switch to whichever clip's crop covers this
+ // frame's source time before rendering it (see
+ // FrameRenderer.setCropRegion / resolveCropAt).
+ renderer.setCropRegion(
+ resolveCropAt(
+ this.config.cropSchedule,
+ sourceTimestampMs / 1000,
+ this.config.cropRegion,
+ ),
+ );
await renderer.renderFrame(videoFrame, sourceTimestampUs, webcamFrame);
const canvas = renderer.getCanvas();
@@ -708,7 +770,7 @@ export class VideoExporter {
return ["prefer-hardware", "prefer-software"];
}
- private async trySourceCopyFastPath(videoInfo: { width: number; height: number }) {
+ private async trySourceCopyFastPath(videoInfo: SourceCopyVideoInfo) {
const blockers = getSourceCopyFastPathBlockers(this.config, videoInfo);
if (blockers.length > 0) {
console.info("[VideoExporter] source-copy fast path disabled", {
diff --git a/src/lib/shortcuts.ts b/src/lib/shortcuts.ts
index a3eb00820..8bd536f91 100644
--- a/src/lib/shortcuts.ts
+++ b/src/lib/shortcuts.ts
@@ -5,8 +5,6 @@ export const SHORTCUT_ACTIONS = [
"addSpeed",
"addAnnotation",
"addBlur",
- "addKeyframe",
- "addCameraFullscreen",
"deleteSelected",
"playPause",
"copySelected",
@@ -64,7 +62,7 @@ export const FIXED_SHORTCUTS: FixedShortcut[] = [
{
i18nKey: "panTimeline",
label: "Pan Timeline",
- display: "Shift + Ctrl + Scroll",
+ display: "Scroll",
bindings: [],
},
{ i18nKey: "zoomTimeline", label: "Zoom Timeline", display: "Ctrl + Scroll", bindings: [] },
@@ -115,8 +113,6 @@ export const DEFAULT_SHORTCUTS: ShortcutsConfig = {
addSpeed: { key: "s" },
addAnnotation: { key: "a" },
addBlur: { key: "b" },
- addKeyframe: { key: "f" },
- addCameraFullscreen: { key: "c" },
deleteSelected: { key: "d", ctrl: true },
playPause: { key: " " },
copySelected: { key: "c", ctrl: true },
@@ -130,8 +126,6 @@ export const SHORTCUT_LABELS: Record<ShortcutAction, string> = {
addSpeed: "Add Speed",
addAnnotation: "Add Annotation",
addBlur: "Add Blur",
- addKeyframe: "Add Keyframe",
- addCameraFullscreen: "Add Full Camera",
deleteSelected: "Delete Selected",
playPause: "Play / Pause",
copySelected: "Copy Selected",
diff --git a/src/native/browserShim.ts b/src/native/browserShim.ts
index af8cfa88e..d5777f474 100644
--- a/src/native/browserShim.ts
+++ b/src/native/browserShim.ts
@@ -64,10 +64,49 @@ let shimRecordingPrefs: ShimRecordingPrefs = {
}
})();
+// ponytail: real file dialogs/ffmpeg probing aren't available in a plain
+// browser tab, but a hidden <input type="file"> + blob URL gets us a real,
+// playable video without any native bridge — NewEditorShell/toFileUrl
+// already special-case blob:/http(s):/data: asset paths and pass them
+// through untouched, so this just has to produce one.
+type PickVideoResult =
+ | { success: true; canceled: false; path: string; name: string }
+ | { success: false; canceled: true };
+
+function pickVideoFileViaInput(): Promise<PickVideoResult> {
+ return new Promise((resolve) => {
+ const input = document.createElement("input");
+ input.type = "file";
+ input.accept =
+ "video/mp4,video/quicktime,video/webm,video/x-matroska,video/x-msvideo,video/x-ms-wmv,video/*";
+ input.style.position = "fixed";
+ input.style.top = "-9999px";
+ let settled = false;
+ const finish = (result: PickVideoResult) => {
+ if (settled) return;
+ settled = true;
+ input.remove();
+ resolve(result);
+ };
+ input.addEventListener("change", () => {
+ const file = input.files?.[0];
+ if (!file) {
+ finish({ success: false, canceled: true });
+ return;
+ }
+ finish({ success: true, canceled: false, path: URL.createObjectURL(file), name: file.name });
+ });
+ // Chrome fires this when the picker is dismissed without a selection.
+ input.addEventListener("cancel", () => finish({ success: false, canceled: true }));
+ document.body.appendChild(input);
+ input.click();
+ });
+}
+
function createShimElectronAPI() {
return {
assetBaseUrl: "",
- openVideoFilePicker: () => Promise.resolve({ success: false, canceled: true }),
+ openVideoFilePicker: pickVideoFileViaInput,
openProjectFile: () => Promise.resolve({ success: false, canceled: true }),
pickExportSavePath: () => Promise.resolve({ success: false, canceled: true }),
writeExportToPath: () => Promise.resolve({ success: false }),
diff --git a/src/styles/design-tokens.css b/src/styles/design-tokens.css
index b1df04a0e..9e572531d 100644
--- a/src/styles/design-tokens.css
+++ b/src/styles/design-tokens.css
@@ -3,7 +3,14 @@
* Mint #10b981 is the sole chromatic accent. Red is reserved for
* REC / cut / skip / trim / transcript-highlight only. */
-:root {
+/* :root:root (doubled pseudo-class) deliberately outranks a plain `:root` —
+ * src/index.css's shadcn/Tailwind base ALSO declares --accent/--border/
+ * --muted (as space-separated HSL triples, a different convention than
+ * this file's hex values) in a plain `:root` block. Both are equal-weight
+ * declarations otherwise, so whichever stylesheet the bundler happens to
+ * emit last silently wins the collision — pin it here instead of
+ * depending on import order. */
+:root:root {
/* canvas */
--bg: #f8fafc;
--bg-grad: radial-gradient(ellipse 1200px 800px at 50% -200px, #ffffff 0%, #f1f5f9 80%);
@@ -16,7 +23,7 @@
/* lines */
--border: #e2e8f0;
- --border-soft: #f1f5f9;
+ --border-soft: #e6eaef;
--border-hi: #cbd5e1;
--border-dark: #0f172a;
@@ -26,8 +33,8 @@
--fg-emphasis: #020617;
--muted: #64748b;
--muted-soft: #94a3b8;
- --meta: #94a3b8;
- --dim: #cbd5e1;
+ --meta: #7c8aa0;
+ --dim: #b6c2d1;
/* mint brand */
--brand: #10b981;