New translation strings for collections/playlist #1166

This commit is contained in:
advplyr 2022-12-17 17:47:35 -06:00
parent 5165f11460
commit d7cc8a052a
9 changed files with 30 additions and 6 deletions

View file

@ -108,13 +108,13 @@ export default {
contextMenuItems() {
const items = [
{
text: 'Create playlist from collection',
text: this.$strings.MessagePlaylistCreateFromCollection,
action: 'create-playlist'
}
]
if (this.userCanDelete) {
items.push({
text: 'Delete collection',
text: this.$strings.ButtonDelete,
action: 'delete'
})
}
@ -135,13 +135,13 @@ export default {
.$post(`/api/playlists/collection/${this.collectionId}`)
.then((playlist) => {
if (playlist) {
this.$toast.success('Playlist created')
this.$toast.success(this.$strings.ToastPlaylistCreateSuccess)
this.$router.push(`/playlist/${playlist.id}`)
}
})
.catch((error) => {
const errMsg = error.response ? error.response.data || '' : ''
this.$toast.error(errMsg || 'Failed to create playlist')
this.$toast.error(errMsg || this.$strings.ToastPlaylistCreateFailed)
})
.finally(() => {
this.processing = false