diff --git a/changes/changelog.d/652.bugfix b/changes/changelog.d/652.bugfix new file mode 100644 index 0000000000000000000000000000000000000000..da8d30b001d96a9fef3bbca62bfc5ab20980181a --- /dev/null +++ b/changes/changelog.d/652.bugfix @@ -0,0 +1 @@ +Fixed escaping issues in translated strings (#652) diff --git a/changes/changelog.d/751.bugfix b/changes/changelog.d/751.bugfix new file mode 100644 index 0000000000000000000000000000000000000000..f107e2c78293721b2e7b26d18000a727a78339d2 --- /dev/null +++ b/changes/changelog.d/751.bugfix @@ -0,0 +1 @@ +Fixed saving moderation policy when clicking on "Cancel" (#751) diff --git a/front/src/components/audio/album/Card.vue b/front/src/components/audio/album/Card.vue index d798d2c23a657533891be3e72cc62ec360ecd5fb..52595ae623fd9a80794d25455e1d9c7e9430c962 100644 --- a/front/src/components/audio/album/Card.vue +++ b/front/src/components/audio/album/Card.vue @@ -11,7 +11,7 @@ <div class="meta"> <span> <router-link tag="span" :to="{name: 'library.artists.detail', params: {id: album.artist.id }}"> - <translate translate-context="Content/Album/Card" :translate-params="{artist: album.artist.name}">By %{ artist }</translate> + <span v-translate="{artist: album.artist.name}" translate-context="Content/Album/Card" :translate-params="{artist: album.artist.name}">By %{ artist }</translate> </router-link> </span><span class="time" v-if="album.release_date">– {{ album.release_date | year }}</span> </div> diff --git a/front/src/components/manage/moderation/InstancePolicyForm.vue b/front/src/components/manage/moderation/InstancePolicyForm.vue index e5b1c50244378f57abd2ebb51412e703c58dab2e..a633bc4f2dbad051c0c827852fa02415f331b754 100644 --- a/front/src/components/manage/moderation/InstancePolicyForm.vue +++ b/front/src/components/manage/moderation/InstancePolicyForm.vue @@ -51,7 +51,7 @@ </div> </div> <div class="ui hidden divider"></div> - <button @click="$emit('cancel')" class="ui basic left floated button"> + <button @click.prevent="$emit('cancel')" class="ui basic left floated button"> <translate translate-context="*/*/Button.Label/Verb">Cancel</translate> </button> <button :class="['ui', 'right', 'floated', 'green', {'disabled loading': isLoading}, 'button']" :disabled="isLoading"> diff --git a/front/src/components/playlists/Editor.vue b/front/src/components/playlists/Editor.vue index d0eeae03ddb1d776f79513a9b4da99f726d575a6..fca53f067a80aec5063ea6af5a6807e6f17bafc1 100644 --- a/front/src/components/playlists/Editor.vue +++ b/front/src/components/playlists/Editor.vue @@ -39,8 +39,8 @@ <dangerous-button :disabled="plts.length === 0" class="labeled right floated icon" color='yellow' :action="clearPlaylist"> <i class="eraser icon"></i> <translate translate-context="*/Playlist/Button.Label/Verb">Clear playlist</translate> - <p slot="modal-header"> - <translate translate-context="Popup/Playlist/Title" :translate-params="{playlist: playlist.name}">Do you want to clear the playlist "%{ playlist }"?</translate> + <p slot="modal-header" v-translate="{playlist: playlist.name}" translate-context="Popup/Playlist/Title" :translate-params="{playlist: playlist.name}"> + Do you want to clear the playlist "%{ playlist }"? </p> <p slot="modal-content"><translate translate-context="Popup/Playlist/Paragraph">This will remove all tracks from this playlist and cannot be undone.</translate></p> <div slot="modal-confirm"><translate translate-context="*/Playlist/Button.Label/Verb">Clear playlist</translate></div> diff --git a/front/src/components/playlists/PlaylistModal.vue b/front/src/components/playlists/PlaylistModal.vue index ef6263d3c9b625c70f90a9a3d4b87ed2e686a483..a3ffbd51eea94f6ac710288871043c9d0dde96af 100644 --- a/front/src/components/playlists/PlaylistModal.vue +++ b/front/src/components/playlists/PlaylistModal.vue @@ -7,11 +7,12 @@ <div class="description"> <template v-if="track"> <h4 class="ui header"><translate translate-context="Popup/Playlist/Title">Current track</translate></h4> - <translate translate-context="Popup/Playlist/Paragraph" + <span + translate-context="Popup/Playlist/Paragraph" v-translate="{artist: track.artist.name, title: track.title}" :translate-params="{artist: track.artist.name, title: track.title}"> "%{ title }", by %{ artist } - </translate> + </span> <div class="ui divider"></div> </template> diff --git a/front/src/views/playlists/Detail.vue b/front/src/views/playlists/Detail.vue index 35a277440e662aba199fd2bd76f094486c8d3e95..6fe7a4c8a1874d588b30363209aaf62ed4fdfcb0 100644 --- a/front/src/views/playlists/Detail.vue +++ b/front/src/views/playlists/Detail.vue @@ -33,8 +33,8 @@ </button> <dangerous-button v-if="$store.state.auth.profile && playlist.user.id === $store.state.auth.profile.id" class="labeled icon" :action="deletePlaylist"> <i class="trash icon"></i> <translate translate-context="*/*/*/Verb">Delete</translate> - <p slot="modal-header"> - <translate :translate-params="{playlist: playlist.name}" translate-context="Popup/Playlist/Title/Call to action">Do you want to delete the playlist "%{ playlist }"?</translate> + <p slot="modal-header" v-translate="{playlist: playlist.name}" translate-context="Popup/Playlist/Title/Call to action" :translate-params="{playlist: playlist.name}"> + Do you want to delete the playlist "%{ playlist }"? </p> <p slot="modal-content"><translate translate-context="Popup/Playlist/Paragraph">This will completely delete this playlist and cannot be undone.</translate></p> <div slot="modal-confirm"><translate translate-context="Popup/Playlist/Button.Label/Verb">Delete playlist</translate></div> diff --git a/front/src/views/radios/Detail.vue b/front/src/views/radios/Detail.vue index c350cb1f9f4b29ba65de3852ae2dbcb3e9562a08..d15aaf366a73477d445212ef2210c5d6d4f94a3f 100644 --- a/front/src/views/radios/Detail.vue +++ b/front/src/views/radios/Detail.vue @@ -24,9 +24,9 @@ </router-link> <dangerous-button class="labeled icon" :action="deleteRadio"> <i class="trash icon"></i> Delete - <p slot="modal-header"><translate translate-context="Popup/Radio/Title" :translate-params="{radio: radio.name}">Do you want to delete the radio "%{ radio }"?</translate></p> + <p slot="modal-header" v-translate="{radio: radio.name}" translate-context="Popup/Radio/Title" :translate-params="{radio: radio.name}">Do you want to delete the radio "%{ radio }"?</p> <p slot="modal-content"><translate translate-context="Popup/Radio/Paragraph">This will completely delete this radio and cannot be undone.</translate></p> - <div slot="modal-confirm"><translate translate-context="Popup/Radio/Button.Label/Verb">Delete radio</translate></div> + <p slot="modal-confirm"><translate translate-context="Popup/Radio/Button.Label/Verb">Delete radio</translate></p> </dangerous-button> </template> </div>