From b5d37c427098a38f5b23b9dba3efb27df69b75b2 Mon Sep 17 00:00:00 2001 From: i1Zeus Date: Sun, 3 May 2026 20:03:01 +0300 Subject: [PATCH] feat: implement video editor SettingsPanel and add Arabic and English localization files --- src/components/video-editor/SettingsPanel.tsx | 52 +++++++++++++------ src/i18n/locales/ar/editor.json | 2 +- src/i18n/locales/ar/settings.json | 16 +++++- src/i18n/locales/en/settings.json | 16 +++++- 4 files changed, 68 insertions(+), 18 deletions(-) diff --git a/src/components/video-editor/SettingsPanel.tsx b/src/components/video-editor/SettingsPanel.tsx index 5cac573..343c4cf 100644 --- a/src/components/video-editor/SettingsPanel.tsx +++ b/src/components/video-editor/SettingsPanel.tsx @@ -1005,7 +1005,9 @@ export function SettingsPanel({ {cursorHighlight && onCursorHighlightChange && (
-
Cursor highlight
+
+ {t("effects.cursorHighlight.title")} +
- {style} + {t(`effects.cursorHighlight.${style}`)} ))}
-
Size
+
+ {t("effects.cursorHighlight.size")} +
{cursorHighlight.sizePx}px @@ -1051,7 +1055,10 @@ export function SettingsPanel({ - onCursorHighlightChange({ ...cursorHighlight, sizePx: values[0] }) + onCursorHighlightChange({ + ...cursorHighlight, + sizePx: values[0], + }) } min={10} max={36} @@ -1063,7 +1070,9 @@ export function SettingsPanel({
-
Only on clicks
+
+ {t("effects.cursorHighlight.onlyOnClicks")} +
)}
-
Color
+
+ {t("effects.cursorHighlight.color")} +
-
Offset X (window recordings)
+
+ {t("effects.cursorHighlight.offsetX")} +
{(cursorHighlight.offsetXNorm * 100).toFixed(1)}% @@ -1155,7 +1175,9 @@ export function SettingsPanel({
-
Offset Y
+
+ {t("effects.cursorHighlight.offsetY")} +
{(cursorHighlight.offsetYNorm * 100).toFixed(1)}% diff --git a/src/i18n/locales/ar/editor.json b/src/i18n/locales/ar/editor.json index 0d293d7..a246f01 100644 --- a/src/i18n/locales/ar/editor.json +++ b/src/i18n/locales/ar/editor.json @@ -17,7 +17,7 @@ "exportFailedWithError": "فشل التصدير: {{error}}", "exportBackgroundLoadFailed": "فشل التصدير: تعذر تحميل صورة الخلفية ({{url}})", "failedToSaveExport": "فشل حفظ التصدير", - "failedToSaveExportedVideo": "فشل حفظ الفيديو المصدر", + "failedToSaveExportedVideo": "فشل حفظ الفيديو المُصدَّر", "failedToRevealInFolder": "خطأ في الكشف في المجلد: {{error}}" }, "export": { diff --git a/src/i18n/locales/ar/settings.json b/src/i18n/locales/ar/settings.json index e0510c9..e21976d 100644 --- a/src/i18n/locales/ar/settings.json +++ b/src/i18n/locales/ar/settings.json @@ -35,9 +35,23 @@ "blurBg": "تمويه الخلفية", "motionBlur": "ضبابية الحركة", "off": "إيقاف", + "on": "تشغيل", "shadow": "ظل", "roundness": "الاستدارة", - "padding": "المسافة البادئة" + "padding": "المسافة البادئة", + "cursorHighlight": { + "title": "تمييز المؤشر", + "style": "النمط", + "dot": "نقطة", + "ring": "حلقة", + "size": "الحجم", + "onlyOnClicks": "عند النقر فقط", + "color": "اللون", + "offsetX": "إزاحة X (لتسجيلات النوافذ)", + "offsetY": "إزاحة Y", + "accessibilityPermissionTitle": "مطلوب إذن الوصول", + "accessibilityPermissionDescription": "افتح إعدادات النظام ← الخصوصية والأمان ← إمكانية الوصول، وقم بتفعيل Openscreen، ثم أعد تشغيل التطبيق." + } }, "background": { "title": "الخلفية", diff --git a/src/i18n/locales/en/settings.json b/src/i18n/locales/en/settings.json index 9b85c2b..aaa5be4 100644 --- a/src/i18n/locales/en/settings.json +++ b/src/i18n/locales/en/settings.json @@ -35,9 +35,23 @@ "blurBg": "Blur BG", "motionBlur": "Motion Blur", "off": "off", + "on": "on", "shadow": "Shadow", "roundness": "Roundness", - "padding": "Padding" + "padding": "Padding", + "cursorHighlight": { + "title": "Cursor highlight", + "style": "Style", + "dot": "Dot", + "ring": "Ring", + "size": "Size", + "onlyOnClicks": "Only on clicks", + "color": "Color", + "offsetX": "Offset X (window recordings)", + "offsetY": "Offset Y", + "accessibilityPermissionTitle": "Accessibility permission needed", + "accessibilityPermissionDescription": "Open System Settings → Privacy & Security → Accessibility, enable Openscreen, then restart the app." + } }, "background": { "title": "Background",