From 9f47e064a1032a851532485378d4f3df93fecd58 Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Thu, 5 Oct 2023 18:04:35 +0200 Subject: [PATCH] Rename some attributes and add i18n messages --- .../resources/messages/messages_de.properties | 10 ++++--- .../resources/messages/messages_en.properties | 12 ++++---- .../webapp/WEB-INF/resources/css/kitodo.css | 6 ++-- .../js/media_detail_audio_waveform.js | 6 ++-- .../partials/media-detail.xhtml | 30 +++++++++---------- 5 files changed, 34 insertions(+), 30 deletions(-) diff --git a/Kitodo/src/main/resources/messages/messages_de.properties b/Kitodo/src/main/resources/messages/messages_de.properties index d99a40973bb..40a419f7890 100644 --- a/Kitodo/src/main/resources/messages/messages_de.properties +++ b/Kitodo/src/main/resources/messages/messages_de.properties @@ -9,10 +9,12 @@ # GPL3-License.txt file that was distributed with this source code. # AND=Enth\u00E4lt -audioWaveformJumpForwardFiveSeconds=5 Sekunden vorspringen -audioWaveformJumpForwardOneSecond=1 Sekunde vorspringen -audioWaveformJumpBackFiveSeconds=5 Sekunden zur\u00FCckspringen -audioWaveformJumpBackOneSecond=1 Sekunde zur\u00FCckspringen +audioWaveformToolsCenteredCursor=zentrierter Cursor +audioWaveformToolsJumpForwardFiveSeconds=5 Sekunden vorspringen +audioWaveformToolsJumpForwardOneSecond=1 Sekunde vorspringen +audioWaveformToolsJumpBackFiveSeconds=5 Sekunden zur\u00FCckspringen +audioWaveformToolsJumpBackOneSecond=1 Sekunde zur\u00FCckspringen +audioWaveformToolsZoom=Zoom authorities=Berechtigungen authority=Berechtigung DMSExportByThread=Der Vorgang wird vom Taskmanager ins DMS exportiert\: diff --git a/Kitodo/src/main/resources/messages/messages_en.properties b/Kitodo/src/main/resources/messages/messages_en.properties index 6a323a8cc18..83203d8d486 100644 --- a/Kitodo/src/main/resources/messages/messages_en.properties +++ b/Kitodo/src/main/resources/messages/messages_en.properties @@ -9,10 +9,12 @@ # GPL3-License.txt file that was distributed with this source code. # AND=Contains -audioWaveformJumpForwardFiveSeconds=Jump forward 5 seconds -audioWaveformJumpForwardOneSecond=Jump forward 1 second -audioWaveformJumpBackFiveSeconds=Jump back 5 seconds -audioWaveformJumpBackOneSecond=Jump back 5 second +audioWaveformToolsCenteredCursor=Centered cursor +audioWaveformToolsJumpForwardFiveSeconds=Jump forward 5 seconds +audioWaveformToolsJumpForwardOneSecond=Jump forward 1 second +audioWaveformToolsJumpBackFiveSeconds=Jump back 5 seconds +audioWaveformToolsJumpBackOneSecond=Jump back 5 second +audioWaveformToolsZoom=Zoom authorities=Authorities authority=Authority DMSExportByThread=The process is being exported into the DMS by the task manager\: @@ -1154,7 +1156,7 @@ userData=User data \u0026 settings userDN=User DN userDocumentationLink=Kitodo.Production 3.X user documentation userEdit.metadataEditorSettings = Metadata editor -userEdit.metadataEditorSettings.defaultGalleryView= Default gallery view +userEdit.metadataEditorSettings.defaultGalleryView = Default gallery view userEdit.metadataEditorSettings.showCommentsByDefault = Show comments by default userEdit.metadataEditorSettings.showPaginationByDefault = Show pagination by default userInstruction=User instructions diff --git a/Kitodo/src/main/webapp/WEB-INF/resources/css/kitodo.css b/Kitodo/src/main/webapp/WEB-INF/resources/css/kitodo.css index 0bd634f50e6..8886729cbd3 100644 --- a/Kitodo/src/main/webapp/WEB-INF/resources/css/kitodo.css +++ b/Kitodo/src/main/webapp/WEB-INF/resources/css/kitodo.css @@ -3073,7 +3073,7 @@ Column content max-height: 100%; } -#imagePreviewForm\:mediaDetail #waveTools{ +#imagePreviewForm\:mediaDetail #audioWaveformTools{ display: flex; gap: 30px; justify-content: center; @@ -3083,11 +3083,11 @@ Column content border-radius: 3px; } -#imagePreviewForm\:mediaDetail #waveTools > div > button:first-child { +#imagePreviewForm\:mediaDetail #audioWaveformTools > div > button:first-child { margin-left: 0px; } -#imagePreviewForm\:mediaDetail #waveTools > div > button { +#imagePreviewForm\:mediaDetail #audioWaveformTools > div > button { margin-left: 10px; } diff --git a/Kitodo/src/main/webapp/WEB-INF/resources/js/media_detail_audio_waveform.js b/Kitodo/src/main/webapp/WEB-INF/resources/js/media_detail_audio_waveform.js index daf2c2d9fa0..4c1f60a701c 100644 --- a/Kitodo/src/main/webapp/WEB-INF/resources/js/media_detail_audio_waveform.js +++ b/Kitodo/src/main/webapp/WEB-INF/resources/js/media_detail_audio_waveform.js @@ -84,7 +84,7 @@ class AudioWaveform { waveContainer.style.display = "block"; self.#loader.style.display = "none"; - let waveToolsContainer = document.getElementById("waveTools") + let waveToolsContainer = document.getElementById("audioWaveformTools") const waveToolsSlider = waveToolsContainer.querySelector('input[type="range"]') waveToolsSlider.addEventListener('input', (e) => { @@ -99,11 +99,11 @@ class AudioWaveform { }) } }) - const jumpButtons = document.getElementsByClassName("audio-waveform-jump-button"); + const jumpButtons = document.getElementsByClassName("audio-waveform-tools-jump-button"); Array.from(jumpButtons).forEach(function (jumpButton) { jumpButton.addEventListener('click', function (event) { event.stopPropagation(); - let jumpSeconds = parseInt(this.getAttribute("data-audio-waveform-jump-seconds")); + let jumpSeconds = parseInt(this.getAttribute("data-audio-waveform-tools-jump-seconds")); self.#wavesurfer.setTime(self.#wavesurfer.getCurrentTime() + jumpSeconds) }); }); diff --git a/Kitodo/src/main/webapp/WEB-INF/templates/includes/metadataEditor/partials/media-detail.xhtml b/Kitodo/src/main/webapp/WEB-INF/templates/includes/metadataEditor/partials/media-detail.xhtml index fc4a513111d..f893fc0be09 100644 --- a/Kitodo/src/main/webapp/WEB-INF/templates/includes/metadataEditor/partials/media-detail.xhtml +++ b/Kitodo/src/main/webapp/WEB-INF/templates/includes/metadataEditor/partials/media-detail.xhtml @@ -27,30 +27,30 @@ rendered="#{mediaProvider.hasMediaViewVariant(selectedGalleryMediaContent) and (fn:startsWith(selectedGalleryMediaContent.mediaViewMimeType, 'video') or fn:startsWith(selectedGalleryMediaContent.mediaViewMimeType, 'audio'))}"> -
+
- +
- +
- - + - + - + + styleClass="audio-waveform-tools-jump-button secondary" + a:data-audio-waveform-tools-jump-seconds="5"/>