diff --git a/src/i18n/locales/cs-CZ.json b/src/i18n/locales/cs-CZ.json index d1ba92324..9e9e3eb2e 100644 --- a/src/i18n/locales/cs-CZ.json +++ b/src/i18n/locales/cs-CZ.json @@ -54,7 +54,9 @@ "info-text": "The video will not be processed but all cutting information will be stored in Opencast. You can continue your edit later.", "success-text": "Changes saved successfully! You can now close the editor or continue working.", "success-tooltip-aria": "Saved successfully", - "saveArea-tooltip": "Save Area" + "saveArea-tooltip": "Save Area", + "confirm-success": "Okay", + "cancel-save": "Don't save" }, "discard": { "headline-text": "Discard changes", @@ -121,7 +123,7 @@ }, "language": { "LANGUAGES-SLOVENIAN": "Slovenian", - "LANGUAGES-PORTUGUESE": "Portuguese", + "LANGUAGES-PORTUGESE": "Portuguese", "LANGUAGES-ROMANSH": "Romansh", "LANGUAGES-ARABIC": "Arabic", "LANGUAGES-POLISH": "Polish", @@ -202,7 +204,7 @@ "goBack-button": "No, take me back" }, "trackSelection": { - "description": "Select or deselect which tracks are used for processing and publication.", + "title": "Select track(s) for processing", "trackInactive": "inactive", "deleteTrackText": "Delete Track", "restoreTrackText": "Restore Track", @@ -244,7 +246,7 @@ "overviewTimelineTooltip": "Timeline overview" }, "keyboardControls": { - "header": "Keyboard Controls", + "header": "Shortcuts", "defaultGroupName": "General", "missingLabel": "Unknown", "groupVideoPlayer": "Video Player", @@ -261,11 +263,13 @@ }, "theme": { "appearance": "Appearance", - "selectThemesLabel": "Appearances", - "darkmode": "Dark mode", - "lightmode": "Light mode", - "system": "System design", - "high-contrast-dark": "High contrast (Dark mode)", - "high-contrast-light": "High contrast (Light mode)" + "dark": "Dark", + "light": "Light", + "auto": "Auto", + "dark-high-contrast": "Dark (High contrast)", + "light-high-contrast": "Light (High contrast)" + }, + "language": { + "language": "Language" } } diff --git a/src/i18n/locales/de-DE.json b/src/i18n/locales/de-DE.json index e5be67f4a..d43d94192 100644 --- a/src/i18n/locales/de-DE.json +++ b/src/i18n/locales/de-DE.json @@ -54,7 +54,9 @@ "info-text": "Das Video wird nicht verarbeitet, aber alle Schnittinformationen werden in Opencast gespeichert. Sie können Ihre Bearbeitung später fortsetzen.", "success-text": "Änderungen erfolgreich gespeichert! Sie können den Editor nun schließen oder weiter arbeiten.", "success-tooltip-aria": "Erfolgreich gespeichert", - "saveArea-tooltip": "Speicherbereich" + "saveArea-tooltip": "Speicherbereich", + "confirm-success": "Okay", + "cancel-save": "Nicht speichern" }, "discard": { "headline-text": "Änderungen verwerfen", @@ -121,7 +123,7 @@ }, "language": { "LANGUAGES-SLOVENIAN": "Slowenisch", - "LANGUAGES-PORTUGUESE": "Portugiesisch", + "LANGUAGES-PORTUGESE": "Portugiesisch", "LANGUAGES-ROMANSH": "Rätoromanisch", "LANGUAGES-ARABIC": "Arabisch", "LANGUAGES-POLISH": "Polnisch", @@ -202,7 +204,7 @@ "goBack-button": "Nein, zurück" }, "trackSelection": { - "description": "Wählen oder deaktivieren Sie die Spuren für die Verarbeitung und Veröffentlichung.", + "title": "Spur(en) für die Verarbeitung auswählen", "trackInactive": "inaktiv", "deleteTrackText": "Spur löschen", "restoreTrackText": "Spur wiederherstellen", @@ -244,7 +246,7 @@ "overviewTimelineTooltip": "Zeitleiste-Übersicht" }, "keyboardControls": { - "header": "Tastatursteuerung", + "header": "Tastenkürzel", "defaultGroupName": "Allgemein", "missingLabel": "Unbekannt", "groupVideoPlayer": "Videoplayer", @@ -261,11 +263,13 @@ }, "theme": { "appearance": "Erscheinungsbild", - "selectThemesLabel": "Darstellung", - "darkmode": "Dunkles Design", - "lightmode": "Helles Design", - "system": "System Design", - "high-contrast-dark": "Hoher Kontrast (Dunkles Design)", - "high-contrast-light": "Hoher Kontrast (Helles Design)" + "dark": "Dunkel", + "light": "Hell", + "auto": "Auto", + "dark-high-contrast": "Dunkel (hoher Kontrast)", + "light-high-contrast": "Hell (hoher Kontrast)" + }, + "language": { + "language": "Sprache" } } diff --git a/src/i18n/locales/el-GR.json b/src/i18n/locales/el-GR.json index b34b7658a..80dbcb062 100644 --- a/src/i18n/locales/el-GR.json +++ b/src/i18n/locales/el-GR.json @@ -54,7 +54,9 @@ "info-text": "Το βίντεο δεν θα επεξεργαστεί, αλλά όλες οι πληροφορίες κοπής θα αποθηκευτούν στο Opencast. Μπορείτε να συνεχίσετε την επεξεργασία σας αργότερα.", "success-text": "Οι αλλαγές αποθηκεύτηκαν επιτυχώς! Τώρα μπορείτε να κλείσετε τον επεξεργαστή βίντεο ή να συνεχίσετε να εργάζεστε στο βίντεο.", "success-tooltip-aria": "Αποθηκεύτηκε επιτυχώς", - "saveArea-tooltip": "Αποθήκευση Περιοχής" + "saveArea-tooltip": "Αποθήκευση Περιοχής", + "confirm-success": "Okay", + "cancel-save": "Don't save" }, "discard": { "headline-text": "Απόρριψη αλλαγών", @@ -121,7 +123,7 @@ }, "language": { "LANGUAGES-SLOVENIAN": "Σλοβενικά", - "LANGUAGES-PORTUGUESE": "Πορτογαλικά", + "LANGUAGES-PORTUGESE": "Portuguese", "LANGUAGES-ROMANSH": "Ρωμανικά", "LANGUAGES-ARABIC": "Αραβικά", "LANGUAGES-POLISH": "Πολωνικά", @@ -202,7 +204,7 @@ "goBack-button": "Όχι, πήγαινέ με πίσω" }, "trackSelection": { - "description": "Επιλέξτε ή αποεπιλέξτε ποια κομμάτια χρησιμοποιούνται για την επεξεργασία και τη δημοσίευση.", + "title": "Select track(s) for processing", "trackInactive": "ανενεργό", "deleteTrackText": "Διαγραφή Κομματιού", "restoreTrackText": "Επαναφορά Κομματιού", @@ -244,7 +246,7 @@ "overviewTimelineTooltip": "Επισκόπηση χρονολογίου" }, "keyboardControls": { - "header": "Έλεγχοι Πληκτρολογίου", + "header": "Shortcuts", "defaultGroupName": "Γενικά", "missingLabel": "Άγνωστο", "groupVideoPlayer": "Αναπαραγωγή Βίντεο", @@ -261,11 +263,13 @@ }, "theme": { "appearance": "Εμφάνιση", - "selectThemesLabel": "Εμφανίσεις", - "darkmode": "Σκοτεινή λειτουργία", - "lightmode": "Φωτεινή λειτουργία", - "system": "Σχεδιασμός συστήματος", - "high-contrast-dark": "Υψηλή αντίθεση (Λειτουργία μαύρου)", - "high-contrast-light": "Υψηλή αντίθεση (λειτουργία άσπρου)" + "dark": "Dark", + "light": "Light", + "auto": "Auto", + "dark-high-contrast": "Dark (High contrast)", + "light-high-contrast": "Light (High contrast)" + }, + "language": { + "language": "Γλώσσα" } } diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json index d8a7a0d58..9f023d263 100644 --- a/src/i18n/locales/en-US.json +++ b/src/i18n/locales/en-US.json @@ -17,6 +17,9 @@ "delete-button": "Delete", "delete-restore-tooltip": "Mark or unmark the segment at the current position as to be deleted. Hotkey: {{hotkeyName}}", "delete-restore-tooltip-aria": "Delete and Restore. Mark or unmark the segment at the current position as to be deleted. Hotkey: {{hotKeyName}}.", + "merge-all-button": "Merge All", + "merge-all-tooltip": "Combine all segments into a single segment.", + "merge-all-tooltip-aria": "Merge All. Combine all segments into a single segment.", "restore-button": "Restore", "mergeLeft-button": "Merge Left", "mergeLeft-tooltip": "Combine the currently active segment with the segment to its left. Hotkey: {{hotkeyName}}", diff --git a/src/i18n/locales/es-ES.json b/src/i18n/locales/es-ES.json index b8000820e..207041843 100644 --- a/src/i18n/locales/es-ES.json +++ b/src/i18n/locales/es-ES.json @@ -54,7 +54,9 @@ "info-text": "El vídeo no será procesado, pero toda la información de corte será almacenada en Opencast. Puede continuar su edición más tarde.", "success-text": "¡Cambios guardados con éxito! Ahora puede cerrar el editor o continuar trabajando.", "success-tooltip-aria": "Guardado con éxito", - "saveArea-tooltip": "Guardar área" + "saveArea-tooltip": "Guardar área", + "confirm-success": "Okay", + "cancel-save": "Don't save" }, "discard": { "headline-text": "Descartar cambios", @@ -121,7 +123,7 @@ }, "language": { "LANGUAGES-SLOVENIAN": "Esloveno", - "LANGUAGES-PORTUGUESE": "Portugués", + "LANGUAGES-PORTUGESE": "Portuguese", "LANGUAGES-ROMANSH": "Rumano", "LANGUAGES-ARABIC": "Árabe", "LANGUAGES-POLISH": "Polaco", @@ -202,7 +204,7 @@ "goBack-button": "¡De ninguna manera! Volver atrás" }, "trackSelection": { - "description": "Seleccione qué pistas serán usadas para el procesamiento y publicación.", + "title": "Select track(s) for processing", "trackInactive": "inactivo", "deleteTrackText": "Eliminar pista", "restoreTrackText": "Restaurar pista", @@ -244,7 +246,7 @@ "overviewTimelineTooltip": "Previsualización de la línea de tiempo" }, "keyboardControls": { - "header": "Controles del teclado", + "header": "Shortcuts", "defaultGroupName": "General", "missingLabel": "Desconocido", "groupVideoPlayer": "Reproductor de vídeo", @@ -261,11 +263,13 @@ }, "theme": { "appearance": "Apariencia", - "selectThemesLabel": "Apariencias", - "darkmode": "Modo oscuro", - "lightmode": "Modo claro", - "system": "Diseño del sistema", - "high-contrast-dark": "Alto contraste (modo oscuro)", - "high-contrast-light": "Alto contraste (modo claro)" + "dark": "Dark", + "light": "Light", + "auto": "Auto", + "dark-high-contrast": "Dark (High contrast)", + "light-high-contrast": "Light (High contrast)" + }, + "language": { + "language": "Idioma" } } diff --git a/src/i18n/locales/fr-FR.json b/src/i18n/locales/fr-FR.json index eaf7789c3..cdc363eb3 100644 --- a/src/i18n/locales/fr-FR.json +++ b/src/i18n/locales/fr-FR.json @@ -54,7 +54,9 @@ "info-text": "La vidéo ne sera pas traitée mais toutes les informations de coupe seront stockées dans Opencast. Vous pouvez continuer votre modification plus tard.", "success-text": "Changes saved successfully! You can now close the editor or continue working.", "success-tooltip-aria": "Sauvegarde réussie", - "saveArea-tooltip": "Enregistrer la zone" + "saveArea-tooltip": "Enregistrer la zone", + "confirm-success": "Okay", + "cancel-save": "Don't save" }, "discard": { "headline-text": "Ignorer les modifications", @@ -121,7 +123,7 @@ }, "language": { "LANGUAGES-SLOVENIAN": "Slovaque", - "LANGUAGES-PORTUGUESE": "Portuguese", + "LANGUAGES-PORTUGESE": "Portuguese", "LANGUAGES-ROMANSH": "Romanche", "LANGUAGES-ARABIC": "Arabe", "LANGUAGES-POLISH": "Polonais", @@ -202,7 +204,7 @@ "goBack-button": "Non, laissez-moi revenir en arrière." }, "trackSelection": { - "description": "Sélectionnez ou désélectionnez quelles pistes sont utilisées pour le traitement et la publication.", + "title": "Select track(s) for processing", "trackInactive": "inactif", "deleteTrackText": "Supprimer la piste", "restoreTrackText": "Restaurer la piste", @@ -244,7 +246,7 @@ "overviewTimelineTooltip": "Timeline overview" }, "keyboardControls": { - "header": "Controles clavier", + "header": "Shortcuts", "defaultGroupName": "Général", "missingLabel": "Inconnu", "groupVideoPlayer": "Video Player", @@ -261,11 +263,13 @@ }, "theme": { "appearance": "Appearance", - "selectThemesLabel": "Appearances", - "darkmode": "Dark mode", - "lightmode": "Light mode", - "system": "System design", - "high-contrast-dark": "High contrast (Dark mode)", - "high-contrast-light": "High contrast (Light mode)" + "dark": "Dark", + "light": "Light", + "auto": "Auto", + "dark-high-contrast": "Dark (High contrast)", + "light-high-contrast": "Light (High contrast)" + }, + "language": { + "language": "Langue" } } diff --git a/src/i18n/locales/nl-NL.json b/src/i18n/locales/nl-NL.json index d57dcb9c2..92531b53e 100644 --- a/src/i18n/locales/nl-NL.json +++ b/src/i18n/locales/nl-NL.json @@ -54,7 +54,9 @@ "info-text": "De video wordt niet verwerkt, maar alle snijgegevens worden opgeslagen in Opencast. U kunt later doorgaan met uw bewerking.", "success-text": "Changes saved successfully! You can now close the editor or continue working.", "success-tooltip-aria": "Succesvol opgeslagen", - "saveArea-tooltip": "Gebied opslaan" + "saveArea-tooltip": "Gebied opslaan", + "confirm-success": "Okay", + "cancel-save": "Don't save" }, "discard": { "headline-text": "Annuleren", @@ -121,7 +123,7 @@ }, "language": { "LANGUAGES-SLOVENIAN": "Sloveens", - "LANGUAGES-PORTUGUESE": "Portuguese", + "LANGUAGES-PORTUGESE": "Portuguese", "LANGUAGES-ROMANSH": "Reto-Romaans", "LANGUAGES-ARABIC": "Arabisch", "LANGUAGES-POLISH": "Pools", @@ -202,7 +204,7 @@ "goBack-button": "Nee, breng me terug" }, "trackSelection": { - "description": "Selecteer of deselecteer welke sporen worden gebruikt voor verwerking en publicatie.", + "title": "Select track(s) for processing", "trackInactive": "inactief", "deleteTrackText": "Verwijder spoor", "restoreTrackText": "Herstel spoor", @@ -244,7 +246,7 @@ "overviewTimelineTooltip": "Timeline overview" }, "keyboardControls": { - "header": "Keyboard Controls", + "header": "Shortcuts", "defaultGroupName": "General", "missingLabel": "Unknown", "groupVideoPlayer": "Video Player", @@ -261,11 +263,13 @@ }, "theme": { "appearance": "Appearance", - "selectThemesLabel": "Appearances", - "darkmode": "Dark mode", - "lightmode": "Light mode", - "system": "System design", - "high-contrast-dark": "High contrast (Dark mode)", - "high-contrast-light": "High contrast (Light mode)" + "dark": "Dark", + "light": "Light", + "auto": "Auto", + "dark-high-contrast": "Dark (High contrast)", + "light-high-contrast": "Light (High contrast)" + }, + "language": { + "language": "Taal" } } diff --git a/src/i18n/locales/zh-CN.json b/src/i18n/locales/zh-CN.json index 63c370773..3848ea9d9 100644 --- a/src/i18n/locales/zh-CN.json +++ b/src/i18n/locales/zh-CN.json @@ -54,7 +54,9 @@ "info-text": "The video will not be processed but all cutting information will be stored in Opencast. You can continue your edit later.", "success-text": "Changes saved successfully! You can now close the editor or continue working.", "success-tooltip-aria": "Saved successfully", - "saveArea-tooltip": "Save Area" + "saveArea-tooltip": "Save Area", + "confirm-success": "Okay", + "cancel-save": "Don't save" }, "discard": { "headline-text": "Discard changes", @@ -121,7 +123,7 @@ }, "language": { "LANGUAGES-SLOVENIAN": "Slovenian", - "LANGUAGES-PORTUGUESE": "Portuguese", + "LANGUAGES-PORTUGESE": "Portuguese", "LANGUAGES-ROMANSH": "Romansh", "LANGUAGES-ARABIC": "Arabic", "LANGUAGES-POLISH": "Polish", @@ -202,7 +204,7 @@ "goBack-button": "No, take me back" }, "trackSelection": { - "description": "Select or deselect which tracks are used for processing and publication.", + "title": "Select track(s) for processing", "trackInactive": "inactive", "deleteTrackText": "Delete Track", "restoreTrackText": "Restore Track", @@ -244,7 +246,7 @@ "overviewTimelineTooltip": "Timeline overview" }, "keyboardControls": { - "header": "键盘设置", + "header": "Shortcuts", "defaultGroupName": "General", "missingLabel": "Unknown", "groupVideoPlayer": "Video Player", @@ -261,11 +263,13 @@ }, "theme": { "appearance": "Appearance", - "selectThemesLabel": "Appearances", - "darkmode": "Dark mode", - "lightmode": "Light mode", - "system": "System design", - "high-contrast-dark": "High contrast (Dark mode)", - "high-contrast-light": "High contrast (Light mode)" + "dark": "Dark", + "light": "Light", + "auto": "Auto", + "dark-high-contrast": "Dark (High contrast)", + "light-high-contrast": "Light (High contrast)" + }, + "language": { + "language": "Language" } } diff --git a/src/i18n/locales/zh-TW.json b/src/i18n/locales/zh-TW.json index f25181c72..c4109c259 100644 --- a/src/i18n/locales/zh-TW.json +++ b/src/i18n/locales/zh-TW.json @@ -54,7 +54,9 @@ "info-text": "影片不會被處理,但所有裁剪訊息都將存儲在 Opencast 中。 您可以稍後繼續編輯。", "success-text": "Changes saved successfully! You can now close the editor or continue working.", "success-tooltip-aria": "儲存成功", - "saveArea-tooltip": "儲存區域" + "saveArea-tooltip": "儲存區域", + "confirm-success": "Okay", + "cancel-save": "Don't save" }, "discard": { "headline-text": "放棄變更", @@ -121,7 +123,7 @@ }, "language": { "LANGUAGES-SLOVENIAN": "斯洛文尼亞語", - "LANGUAGES-PORTUGUESE": "Portuguese", + "LANGUAGES-PORTUGESE": "Portuguese", "LANGUAGES-ROMANSH": "羅曼什語", "LANGUAGES-ARABIC": "阿拉伯語", "LANGUAGES-POLISH": "波蘭語", @@ -202,7 +204,7 @@ "goBack-button": "不,回到上一步" }, "trackSelection": { - "description": "選擇或取消選擇用於處理和發佈的影音軌道。", + "title": "Select track(s) for processing", "trackInactive": "不活動的", "deleteTrackText": "刪除影音軌道", "restoreTrackText": "還原影音軌道", @@ -244,7 +246,7 @@ "overviewTimelineTooltip": "Timeline overview" }, "keyboardControls": { - "header": "鍵盤控制", + "header": "Shortcuts", "defaultGroupName": "一般", "missingLabel": "未知", "groupVideoPlayer": "Video Player", @@ -261,11 +263,13 @@ }, "theme": { "appearance": "Appearance", - "selectThemesLabel": "Appearances", - "darkmode": "Dark mode", - "lightmode": "Light mode", - "system": "System design", - "high-contrast-dark": "High contrast (Dark mode)", - "high-contrast-light": "High contrast (Light mode)" + "dark": "Dark", + "light": "Light", + "auto": "Auto", + "dark-high-contrast": "Dark (High contrast)", + "light-high-contrast": "Light (High contrast)" + }, + "language": { + "language": "語言" } } diff --git a/src/main/CuttingActions.tsx b/src/main/CuttingActions.tsx index e412375a6..2a6f92ad8 100644 --- a/src/main/CuttingActions.tsx +++ b/src/main/CuttingActions.tsx @@ -3,14 +3,14 @@ import React from "react"; import { basicButtonStyle, customIconStyle } from '../cssStyles' import { IconType } from "react-icons"; -import { LuScissors, LuChevronLeft, LuChevronRight, LuTrash} from "react-icons/lu"; +import { LuScissors, LuChevronLeft, LuChevronRight, LuTrash, LuMoveHorizontal} from "react-icons/lu"; import { ReactComponent as TrashRestore } from '../img/trash-restore.svg'; import { css } from '@emotion/react' import { useDispatch, useSelector } from 'react-redux'; import { - cut, markAsDeletedOrAlive, selectIsCurrentSegmentAlive, mergeLeft, mergeRight + cut, markAsDeletedOrAlive, selectIsCurrentSegmentAlive, mergeLeft, mergeRight, mergeAll } from '../redux/videoSlice' import { KEYMAP, rewriteKeys } from "../globalKeys"; import { ActionCreatorWithoutPayload } from "@reduxjs/toolkit"; @@ -86,6 +86,12 @@ const CuttingActions: React.FC = () => { tooltip={t('cuttingActions.mergeRight-tooltip', { hotkeyName: rewriteKeys(KEYMAP.cutting.mergeRight.key)})} ariaLabelText={t('cuttingActions.mergeRight-tooltip-aria', { hotkeyName: rewriteKeys(KEYMAP.cutting.mergeRight.key) })} /> +
+ {/* { + mergeSegments(state, state.activeSegmentIndex, 0) + mergeSegments(state, state.activeSegmentIndex, state.segments.length - 1) + state.hasChanges = true + }, }, // For Async Requests extraReducers: builder => { @@ -258,22 +263,25 @@ export const parseSegments = (segments: Segment[], duration: number) => { } /** - * Helper function for merging two segments + * Helper function for merging segments */ -const mergeSegments = (state: video, activeSegmentIndex: number, mergeSegmentIndex: number) => { +const mergeSegments = (state: video, startSegmentIndex: number, endSegmentIndex: number) => { // Check if mergeSegmentIndex is valid - if (mergeSegmentIndex < 0 || mergeSegmentIndex > state.segments.length - 1) { + if (endSegmentIndex < 0 || endSegmentIndex > state.segments.length - 1) { return } // Increase activeSegment length - state.segments[activeSegmentIndex].start = Math.min( - state.segments[activeSegmentIndex].start, state.segments[mergeSegmentIndex].start) - state.segments[activeSegmentIndex].end = Math.max( - state.segments[activeSegmentIndex].end, state.segments[mergeSegmentIndex].end) + state.segments[startSegmentIndex].start = Math.min( + state.segments[startSegmentIndex].start, state.segments[endSegmentIndex].start) + state.segments[startSegmentIndex].end = Math.max( + state.segments[startSegmentIndex].end, state.segments[endSegmentIndex].end) - // Remove the other segment - state.segments.splice(mergeSegmentIndex, 1); + // Remove the end segment and segments between + state.segments.splice( + startSegmentIndex < endSegmentIndex ? startSegmentIndex + 1 : endSegmentIndex, + Math.abs(endSegmentIndex - startSegmentIndex) + ); // Update active segment updateActiveSegment(state) @@ -342,7 +350,7 @@ const setThumbnailHelper = (state: video, id: Track["id"], uri: Track["thumbnail export const { setTrackEnabled, setIsPlaying, setIsPlayPreview, setCurrentlyAt, setCurrentlyAtInSeconds, addSegment, setAspectRatio, setHasChanges, setWaveformImages, setThumbnails, setThumbnail, removeThumbnail, - cut, markAsDeletedOrAlive, setSelectedWorkflowIndex, mergeLeft, mergeRight, setPreviewTriggered, + cut, markAsDeletedOrAlive, setSelectedWorkflowIndex, mergeLeft, mergeRight, mergeAll, setPreviewTriggered, setClickTriggered } = videoSlice.actions // Export selectors