Skip to content

Commit

Permalink
Rename some attributes and add i18n messages
Browse files Browse the repository at this point in the history
  • Loading branch information
markusweigelt committed Oct 5, 2023
1 parent 178d7ac commit 9f47e06
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 30 deletions.
10 changes: 6 additions & 4 deletions Kitodo/src/main/resources/messages/messages_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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\:
Expand Down
12 changes: 7 additions & 5 deletions Kitodo/src/main/resources/messages/messages_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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\:
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Kitodo/src/main/webapp/WEB-INF/resources/css/kitodo.css
Original file line number Diff line number Diff line change
Expand Up @@ -3073,7 +3073,7 @@ Column content
max-height: 100%;
}

#imagePreviewForm\:mediaDetail #waveTools{
#imagePreviewForm\:mediaDetail #audioWaveformTools{
display: flex;
gap: 30px;
justify-content: center;
Expand All @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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)
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,30 @@
rendered="#{mediaProvider.hasMediaViewVariant(selectedGalleryMediaContent) and (fn:startsWith(selectedGalleryMediaContent.mediaViewMimeType, 'video') or fn:startsWith(selectedGalleryMediaContent.mediaViewMimeType, 'audio'))}">

<p:outputPanel rendered="#{fn:startsWith(selectedGalleryMediaContent.mediaViewMimeType, 'audio') and DataEditorForm.galleryPanel.isAudioMediaViewWaveform()}">
<div id="waveTools" >
<div id="audioWaveformTools" >
<div>
<label>Zoom: <input type="range" min="0" max="250" value="0"/></label>
<label><h:outputText value="#{msgs.audioWaveformToolsZoom}"/>: <input type="range" min="0" max="250" value="0"/></label>
</div>
<div>
<label>Auto Center: <input type="checkbox" checked="" value="autoCenter"/></label>
<label><h:outputText value="#{msgs.audioWaveformToolsCenteredCursor}"/>: <input type="checkbox" checked="" value="autoCenter"/></label>
</div>
<div>
<p:commandButton title="#{msgs.audioWaveformJumpBackFiveSeconds}"
<p:commandButton title="#{msgs.audioWaveformToolsJumpBackFiveSeconds}"
icon="fa fa-angle-double-left"
styleClass="audio-waveform-jump-button secondary"
a:data-audio-waveform-jump-seconds="-5"/>
<p:commandButton title="#{msgs.audioWaveformJumpBackOneSecond}"
styleClass="audio-waveform-tools-jump-button secondary"
a:data-audio-waveform-tools-jump-seconds="-5"/>
<p:commandButton title="#{msgs.audioWaveformToolsJumpBackOneSecond}"
icon="fa fa-angle-left"
styleClass="audio-waveform-jump-button secondary"
a:data-audio-waveform-jump-seconds="-1"/>
<p:commandButton title="#{msgs.audioWaveformJumpForwardOneSecond}"
styleClass="audio-waveform-tools-jump-button secondary"
a:data-audio-waveform-tools-jump-seconds="-1"/>
<p:commandButton title="#{msgs.audioWaveformToolsJumpForwardOneSecond}"
icon="fa fa-angle-right"
styleClass="audio-waveform-jump-button secondary"
a:data-audio-waveform-jump-seconds="1"/>
<p:commandButton title="#{msgs.audioWaveformJumpForwardFiveSeconds}"
styleClass="audio-waveform-tools-jump-button secondary"
a:data-audio-waveform-tools-jump-seconds="1"/>
<p:commandButton title="#{msgs.audioWaveformToolsJumpForwardFiveSeconds}"
icon="fa fa-angle-double-right"
styleClass="audio-waveform-jump-button secondary"
a:data-audio-waveform-jump-seconds="5"/>
styleClass="audio-waveform-tools-jump-button secondary"
a:data-audio-waveform-tools-jump-seconds="5"/>
</div>
</div>
</p:outputPanel>
Expand Down

0 comments on commit 9f47e06

Please sign in to comment.