Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
fix(editor): localize new recording dialog and fix session clear behavior
Ayush765-spec43ec6ee9cd74
diff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsxindex dae009ace..26bfd4453 100644--- a/src/components/video-editor/VideoEditor.tsx+++ b/src/components/video-editor/VideoEditor.tsx@@ -474,10 +474,14 @@ export default function VideoEditor() {}, [saveProject]);const handleNewRecordingConfirm = useCallback(async () => {- setShowNewRecordingDialog(false);- await window.electronAPI.clearCurrentVideoPath();- await window.electronAPI.setCurrentRecordingSession(null);- await window.electronAPI.switchToHud();+ try {+ await window.electronAPI.clearCurrentVideoPath();+ await window.electronAPI.switchToHud();+ setShowNewRecordingDialog(false);+ } catch (err) {+ console.error("Failed to start new recording:", err);+ setError("Failed to start new recording: " + String(err));+ }}, []);const handleLoadProject = useCallback(async () => {@@ -1415,10 +1419,8 @@ export default function VideoEditor() {style={{ WebkitAppRegion: "no-drag" } as React.CSSProperties}><DialogHeader>- <DialogTitle>New Recording</DialogTitle>- <DialogDescription>- Start a new recording? Your current recording will be discarded.- </DialogDescription>+ <DialogTitle>{t("newRecording.title")}</DialogTitle>+ <DialogDescription>{t("newRecording.description")}</DialogDescription></DialogHeader><DialogFooter><button@@ -1426,14 +1428,14 @@ export default function VideoEditor() {onClick={() => setShowNewRecordingDialog(false)}className="px-4 py-2 rounded-md bg-white/10 text-white hover:bg-white/20 text-sm font-medium transition-colors">- Cancel+ {t("newRecording.cancel")}</button><buttontype="button"onClick={handleNewRecordingConfirm}className="px-4 py-2 rounded-md bg-red-500/80 text-white hover:bg-red-500 text-sm font-medium transition-colors">- Confirm+ {t("newRecording.confirm")}</button></DialogFooter></DialogContent>@@ -1470,7 +1472,7 @@ export default function VideoEditor() {className="flex items-center gap-1 px-2 py-1 rounded-md text-white/50 hover:text-white/90 hover:bg-white/10 transition-all duration-150 text-[11px] font-medium"><Video size={14} />- New Recording+ {t("newRecording.title")}</button><buttontype="button"diff --git a/src/i18n/locales/en/editor.json b/src/i18n/locales/en/editor.jsonindex 6fdc3107f..1b772a2d4 100644--- a/src/i18n/locales/en/editor.json+++ b/src/i18n/locales/en/editor.json@@ -1,4 +1,10 @@{+ "newRecording": {+ "title": "New Recording",+ "description": "Start a new recording? Your current recording will be discarded.",+ "cancel": "Cancel",+ "confirm": "Confirm"+ },"errors": {"noVideoLoaded": "No video loaded","videoNotReady": "Video not ready",