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
Refactor text animation options to use translation keys for localization
Justice Entsie2aa6e90edb9e
diff --git a/src/components/video-editor/AnnotationSettingsPanel.tsx b/src/components/video-editor/AnnotationSettingsPanel.tsxindex de6b627ed..4fe3f505e 100644--- a/src/components/video-editor/AnnotationSettingsPanel.tsx+++ b/src/components/video-editor/AnnotationSettingsPanel.tsx@@ -323,7 +323,7 @@ export function AnnotationSettingsPanel({<SelectContent className="max-h-[240px] border-white/10 bg-[#1a1a1c] text-slate-200">{TEXT_ANIMATION_OPTIONS.map((option) => (<SelectItem key={option.value} value={option.value}>- {option.label}+ {t(option.translationKey)}</SelectItem>))}</SelectContent>diff --git a/src/lib/annotationTextAnimation.ts b/src/lib/annotationTextAnimation.tsindex 13878a423..1993dbcba 100644--- a/src/lib/annotationTextAnimation.ts+++ b/src/lib/annotationTextAnimation.ts@@ -12,15 +12,15 @@ export interface TextAnimationState {export const TEXT_ANIMATION_OPTIONS: Array<{value: AnnotationTextAnimation;- label: string;+ translationKey: string;}> = [- { value: "none", label: "None" },- { value: "fade", label: "Fade" },- { value: "rise", label: "Rise" },- { value: "pop", label: "Pop" },- { value: "slide-left", label: "Slide" },- { value: "typewriter", label: "Typewriter" },- { value: "pulse", label: "Pulse" },+ { value: "none", translationKey: "textAnimation.none" },+ { value: "fade", translationKey: "textAnimation.fade" },+ { value: "rise", translationKey: "textAnimation.rise" },+ { value: "pop", translationKey: "textAnimation.pop" },+ { value: "slide-left", translationKey: "textAnimation.slideLeft" },+ { value: "typewriter", translationKey: "textAnimation.typewriter" },+ { value: "pulse", translationKey: "textAnimation.pulse" },];function clamp(value: number, min = 0, max = 1) {