diff --git a/client/components/app/Appbar.vue b/client/components/app/Appbar.vue
index 183d58eb..2d557e32 100644
--- a/client/components/app/Appbar.vue
+++ b/client/components/app/Appbar.vue
@@ -332,13 +332,13 @@ export default {
libraryItemIds: this.selectedMediaItems.map((i) => i.id)
})
.then(() => {
- this.$toast.success('Batch delete success')
+ this.$toast.success(this.$strings.ToastBatchDeleteSuccess)
this.$store.commit('globals/resetSelectedMediaItems', [])
this.$eventBus.$emit('bookshelf_clear_selection')
})
.catch((error) => {
console.error('Batch delete failed', error)
- this.$toast.error('Batch delete failed')
+ this.$toast.error(this.$strings.ToastBatchDeleteFailed)
})
.finally(() => {
this.$store.commit('setProcessingBatch', false)
diff --git a/client/components/app/BookShelfToolbar.vue b/client/components/app/BookShelfToolbar.vue
index 00b0d4a9..ff337428 100644
--- a/client/components/app/BookShelfToolbar.vue
+++ b/client/components/app/BookShelfToolbar.vue
@@ -473,11 +473,11 @@ export default {
this.$axios
.$get(`/api/me/series/${this.seriesId}/readd-to-continue-listening`)
.then(() => {
- this.$toast.success('Series re-added to continue listening')
+ this.$toast.success(this.$strings.ToastItemUpdateSuccess)
})
.catch((error) => {
console.error('Failed to re-add series to continue listening', error)
- this.$toast.error('Failed to re-add series to continue listening')
+ this.$toast.error(this.$strings.ToastItemUpdateFailed)
})
.finally(() => {
this.processingSeries = false
@@ -504,7 +504,7 @@ export default {
})
if (!response) {
console.error(`Author ${author.name} not found`)
- this.$toast.error(`Author ${author.name} not found`)
+ this.$toast.error(this.$getString('ToastAuthorNotFound', [author.name]))
} else if (response.updated) {
if (response.author.imagePath) console.log(`Author ${response.author.name} was updated`)
else console.log(`Author ${response.author.name} was updated (no image found)`)
@@ -522,13 +522,13 @@ export default {
this.$axios
.$delete(`/api/libraries/${this.currentLibraryId}/issues`)
.then(() => {
- this.$toast.success('Removed library items with issues')
+ this.$toast.success(this.$strings.ToastRemoveItemsWithIssuesSuccess)
this.$router.push(`/library/${this.currentLibraryId}/bookshelf`)
this.$store.dispatch('libraries/fetch', this.currentLibraryId)
})
.catch((error) => {
console.error('Failed to remove library items with issues', error)
- this.$toast.error('Failed to remove library items with issues')
+ this.$toast.error(this.$strings.ToastRemoveItemsWithIssuesFailed)
})
.finally(() => {
this.processingIssues = false
diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue
index ac75407c..4409dbd2 100644
--- a/client/components/cards/LazyBookCard.vue
+++ b/client/components/cards/LazyBookCard.vue
@@ -346,14 +346,14 @@ export default {
},
displaySortLine() {
if (this.collapsedSeries) return null
- if (this.orderBy === 'mtimeMs') return 'Modified ' + this.$formatDate(this._libraryItem.mtimeMs, this.dateFormat)
- if (this.orderBy === 'birthtimeMs') return 'Born ' + this.$formatDate(this._libraryItem.birthtimeMs, this.dateFormat)
- if (this.orderBy === 'addedAt') return 'Added ' + this.$formatDate(this._libraryItem.addedAt, this.dateFormat)
- if (this.orderBy === 'media.duration') return 'Duration: ' + this.$elapsedPrettyExtended(this.media.duration, false)
- if (this.orderBy === 'size') return 'Size: ' + this.$bytesPretty(this._libraryItem.size)
- if (this.orderBy === 'media.numTracks') return `${this.numEpisodes} Episodes`
+ if (this.orderBy === 'mtimeMs') return this.$getString('LabelFileModifiedDate', [this.$formatDate(this._libraryItem.mtimeMs, this.dateFormat)])
+ if (this.orderBy === 'birthtimeMs') return this.$getString('LabelFileBornDate', [this.$formatDate(this._libraryItem.birthtimeMs, this.dateFormat)])
+ if (this.orderBy === 'addedAt') return this.$getString('LabelAddedDate', [this.$formatDate(this._libraryItem.addedAt, this.dateFormat)])
+ if (this.orderBy === 'media.duration') return this.$strings.LabelDuration + ': ' + this.$elapsedPrettyExtended(this.media.duration, false)
+ if (this.orderBy === 'size') return this.$strings.LabelSize + ': ' + this.$bytesPretty(this._libraryItem.size)
+ if (this.orderBy === 'media.numTracks') return `${this.numEpisodes} ` + this.$strings.LabelEpisodes
if (this.orderBy === 'media.metadata.publishedYear') {
- if (this.mediaMetadata.publishedYear) return 'Published ' + this.mediaMetadata.publishedYear
+ if (this.mediaMetadata.publishedYear) return this.$getString('LabelPublishedDate', [this.mediaMetadata.publishedYear])
return '\u00A0'
}
return null
@@ -710,7 +710,7 @@ export default {
toggleFinished(confirmed = false) {
if (!this.itemIsFinished && this.userProgressPercent > 0 && !confirmed) {
const payload = {
- message: `Are you sure you want to mark "${this.displayTitle}" as finished?`,
+ message: this.$getString('MessageConfirmMarkItemFinished', [this.displayTitle]),
callback: (confirmed) => {
if (confirmed) {
this.toggleFinished(true)
@@ -755,18 +755,18 @@ export default {
.then((data) => {
var result = data.result
if (!result) {
- this.$toast.error(`Re-Scan Failed for "${this.title}"`)
+ this.$toast.error(this.$getString('ToastRescanFailed', [this.displayTitle]))
} else if (result === 'UPDATED') {
- this.$toast.success(`Re-Scan complete item was updated`)
+ this.$toast.success(this.$strings.ToastRescanUpdated)
} else if (result === 'UPTODATE') {
- this.$toast.success(`Re-Scan complete item was up to date`)
+ this.$toast.success(this.$strings.ToastRescanUpToDate)
} else if (result === 'REMOVED') {
- this.$toast.error(`Re-Scan complete item was removed`)
+ this.$toast.error(this.$strings.ToastRescanRemoved)
}
})
.catch((error) => {
console.error('Failed to scan library item', error)
- this.$toast.error('Failed to scan library item')
+ this.$toast.error(this.$strings.ToastScanFailed)
})
.finally(() => {
this.processing = false
@@ -823,7 +823,7 @@ export default {
})
.catch((error) => {
console.error('Failed to remove series from home', error)
- this.$toast.error('Failed to update user')
+ this.$toast.error(this.$strings.ToastFailedToUpdateUser)
})
.finally(() => {
this.processing = false
@@ -841,7 +841,7 @@ export default {
})
.catch((error) => {
console.error('Failed to hide item from home', error)
- this.$toast.error('Failed to update user')
+ this.$toast.error(this.$strings.ToastFailedToUpdateUser)
})
.finally(() => {
this.processing = false
@@ -856,7 +856,7 @@ export default {
episodeId: this.recentEpisode.id,
title: this.recentEpisode.title,
subtitle: this.mediaMetadata.title,
- caption: this.recentEpisode.publishedAt ? `Published ${this.$formatDate(this.recentEpisode.publishedAt, this.dateFormat)}` : 'Unknown publish date',
+ caption: this.recentEpisode.publishedAt ? this.$getString('LabelPublishedDate', [this.$formatDate(this.recentEpisode.publishedAt, this.dateFormat)]) : this.$strings.LabelUnknownPublishDate,
duration: this.recentEpisode.audioFile.duration || null,
coverPath: this.media.coverPath || null
}
@@ -906,11 +906,11 @@ export default {
axios
.$delete(`/api/items/${this.libraryItemId}?hard=${hardDelete ? 1 : 0}`)
.then(() => {
- this.$toast.success('Item deleted')
+ this.$toast.success(this.$strings.ToastItemDeletedSuccess)
})
.catch((error) => {
console.error('Failed to delete item', error)
- this.$toast.error('Failed to delete item')
+ this.$toast.error(this.$strings.ToastItemDeletedFailed)
})
.finally(() => {
this.processing = false
@@ -1016,7 +1016,7 @@ export default {
episodeId: episode.id,
title: episode.title,
subtitle: this.mediaMetadata.title,
- caption: episode.publishedAt ? `Published ${this.$formatDate(episode.publishedAt, this.dateFormat)}` : 'Unknown publish date',
+ caption: episode.publishedAt ? this.$getString('LabelPublishedDate', [this.$formatDate(episode.publishedAt, this.dateFormat)]) : this.$strings.LabelUnknownPublishDate,
duration: episode.audioFile.duration || null,
coverPath: this.media.coverPath || null
})
diff --git a/client/components/cards/LazySeriesCard.vue b/client/components/cards/LazySeriesCard.vue
index 6711099c..177ec5f3 100644
--- a/client/components/cards/LazySeriesCard.vue
+++ b/client/components/cards/LazySeriesCard.vue
@@ -96,7 +96,7 @@ export default {
displaySortLine() {
switch (this.orderBy) {
case 'addedAt':
- return `${this.$strings.LabelAdded} ${this.$formatDate(this.addedAt, this.dateFormat)}`
+ return this.$getString('LabelAddedDate', [this.$formatDate(this.addedAt, this.dateFormat)])
case 'totalDuration':
return `${this.$strings.LabelDuration} ${this.$elapsedPrettyExtended(this.totalDuration, false)}`
case 'lastBookUpdated':
diff --git a/client/components/cards/NotificationCard.vue b/client/components/cards/NotificationCard.vue
index 1506cfb5..cf959df7 100644
--- a/client/components/cards/NotificationCard.vue
+++ b/client/components/cards/NotificationCard.vue
@@ -4,11 +4,11 @@
diff --git a/client/components/modals/UploadImageModal.vue b/client/components/modals/UploadImageModal.vue
index d927a046..9a55ae51 100644
--- a/client/components/modals/UploadImageModal.vue
+++ b/client/components/modals/UploadImageModal.vue
@@ -78,14 +78,13 @@ export default {
if (data.error) {
this.$toast.error(data.error)
} else {
- this.$toast.success('Cover Uploaded')
this.resetCoverPreview()
}
this.processingUpload = false
})
.catch((error) => {
console.error('Failed', error)
- var errorMsg = error.response && error.response.data ? error.response.data : 'Unknown Error'
+ var errorMsg = error.response && error.response.data ? error.response.data : this.$strings.ToastUnknownError
this.$toast.error(errorMsg)
this.processingUpload = false
})
@@ -95,7 +94,7 @@ export default {
var success = await this.$axios.$post(`/api/${this.entity}/${this.entityId}/cover`, { url: this.imageUrl }).catch((error) => {
console.error('Failed to download cover from url', error)
- var errorMsg = error.response && error.response.data ? error.response.data : 'Unknown Error'
+ var errorMsg = error.response && error.response.data ? error.response.data : this.$strings.ToastUnknownError
this.$toast.error(errorMsg)
return false
})
@@ -104,4 +103,4 @@ export default {
}
}
}
-
\ No newline at end of file
+
diff --git a/client/components/modals/authors/EditModal.vue b/client/components/modals/authors/EditModal.vue
index 174b28d4..d49edd4d 100644
--- a/client/components/modals/authors/EditModal.vue
+++ b/client/components/modals/authors/EditModal.vue
@@ -116,12 +116,12 @@ export default {
this.$axios
.$delete(`/api/authors/${this.authorId}`)
.then(() => {
- this.$toast.success('Author removed')
+ this.$toast.success(this.$strings.ToastAuthorRemoveSuccess)
this.show = false
})
.catch((error) => {
console.error('Failed to remove author', error)
- this.$toast.error('Failed to remove author')
+ this.$toast.error(this.$strings.ToastRemoveFailed)
})
.finally(() => {
this.processing = false
@@ -141,7 +141,7 @@ export default {
}
})
if (!Object.keys(updatePayload).length) {
- this.$toast.info(this.$strings.MessageNoUpdateNecessary)
+ this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
return
}
this.processing = true
@@ -158,7 +158,7 @@ export default {
} else if (result.merged) {
this.$toast.success(this.$strings.ToastAuthorUpdateMerged)
this.show = false
- } else this.$toast.info(this.$strings.MessageNoUpdatesWereNecessary)
+ } else this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
}
this.processing = false
},
@@ -174,7 +174,7 @@ export default {
})
.catch((error) => {
console.error('Failed', error)
- this.$toast.error(this.$strings.ToastAuthorImageRemoveFailed)
+ this.$toast.error(this.$strings.ToastRemoveFailed)
})
.finally(() => {
this.processing = false
@@ -182,7 +182,7 @@ export default {
},
submitUploadCover() {
if (!this.imageUrl?.startsWith('http:') && !this.imageUrl?.startsWith('https:')) {
- this.$toast.error('Invalid image url')
+ this.$toast.error(this.$strings.ToastInvalidImageUrl)
return
}
@@ -194,14 +194,14 @@ export default {
.$post(`/api/authors/${this.authorId}/image`, updatePayload)
.then((data) => {
this.imageUrl = ''
- this.$toast.success('Author image updated')
+ this.$toast.success(this.$strings.ToastAuthorUpdateSuccess)
this.authorCopy.updatedAt = data.author.updatedAt
this.authorCopy.imagePath = data.author.imagePath
})
.catch((error) => {
console.error('Failed', error)
- this.$toast.error(error.response.data || 'Failed to remove author image')
+ this.$toast.error(error.response.data || this.$strings.ToastRemoveFailed)
})
.finally(() => {
this.processing = false
@@ -209,7 +209,7 @@ export default {
},
async searchAuthor() {
if (!this.authorCopy.name && !this.authorCopy.asin) {
- this.$toast.error('Must enter an author name')
+ this.$toast.error(this.$strings.ToastNameRequired)
return
}
this.processing = true
@@ -228,17 +228,19 @@ export default {
return null
})
if (!response) {
- this.$toast.error('Author not found')
+ this.$toast.error(this.$strings.ToastAuthorSearchNotFound)
} else if (response.updated) {
if (response.author.imagePath) {
this.$toast.success(this.$strings.ToastAuthorUpdateSuccess)
- } else this.$toast.success(this.$strings.ToastAuthorUpdateSuccessNoImageFound)
+ } else {
+ this.$toast.success(this.$strings.ToastAuthorUpdateSuccessNoImageFound)
+ }
this.authorCopy = {
...response.author
}
} else {
- this.$toast.info('No updates were made for Author')
+ this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
}
this.processing = false
}
diff --git a/client/components/modals/collections/AddCreateModal.vue b/client/components/modals/collections/AddCreateModal.vue
index 29c21624..7c22525f 100644
--- a/client/components/modals/collections/AddCreateModal.vue
+++ b/client/components/modals/collections/AddCreateModal.vue
@@ -143,7 +143,7 @@ export default {
})
.catch((error) => {
console.error('Failed to remove books from collection', error)
- this.$toast.error(this.$strings.ToastCollectionItemsRemoveFailed)
+ this.$toast.error(this.$strings.ToastRemoveFailed)
this.processing = false
})
} else {
@@ -157,7 +157,7 @@ export default {
})
.catch((error) => {
console.error('Failed to remove book from collection', error)
- this.$toast.error(this.$strings.ToastCollectionItemsRemoveFailed)
+ this.$toast.error(this.$strings.ToastRemoveFailed)
this.processing = false
})
}
@@ -172,12 +172,12 @@ export default {
.$post(`/api/collections/${collection.id}/batch/add`, { books: this.selectedBookIds })
.then((updatedCollection) => {
console.log(`Books added to collection`, updatedCollection)
- this.$toast.success('Books added to collection')
+ this.$toast.success(this.$strings.ToastCollectionItemsAddSuccess)
this.processing = false
})
.catch((error) => {
console.error('Failed to add books to collection', error)
- this.$toast.error('Failed to add books to collection')
+ this.$toast.error(this.$strings.ToastCollectionItemsAddFailed)
this.processing = false
})
} else {
@@ -187,12 +187,12 @@ export default {
.$post(`/api/collections/${collection.id}/book`, { id: this.selectedLibraryItemId })
.then((updatedCollection) => {
console.log(`Book added to collection`, updatedCollection)
- this.$toast.success('Book added to collection')
+ this.$toast.success(this.$strings.ToastCollectionItemsAddSuccess)
this.processing = false
})
.catch((error) => {
console.error('Failed to add book to collection', error)
- this.$toast.error('Failed to add book to collection')
+ this.$toast.error(this.$strings.ToastCollectionItemsAddFailed)
this.processing = false
})
}
@@ -221,7 +221,7 @@ export default {
.catch((error) => {
console.error('Failed to create collection', error)
var errMsg = error.response ? error.response.data || '' : ''
- this.$toast.error(`Failed to create collection: ${errMsg}`)
+ this.$toast.error(this.$strings.ToastCollectionCreateFailed + ': ' + errMsg)
this.processing = false
})
}
diff --git a/client/components/modals/collections/EditModal.vue b/client/components/modals/collections/EditModal.vue
index e5b3e305..2ab1b939 100644
--- a/client/components/modals/collections/EditModal.vue
+++ b/client/components/modals/collections/EditModal.vue
@@ -106,7 +106,7 @@ export default {
.catch((error) => {
console.error('Failed to remove collection', error)
this.processing = false
- this.$toast.error(this.$strings.ToastCollectionRemoveFailed)
+ this.$toast.error(this.$strings.ToastRemoveFailed)
})
}
},
@@ -115,7 +115,7 @@ export default {
return
}
if (!this.newCollectionName) {
- return this.$toast.error('Collection must have a name')
+ return this.$toast.error(this.$strings.ToastNameRequired)
}
this.processing = true
diff --git a/client/components/modals/emails/EReaderDeviceModal.vue b/client/components/modals/emails/EReaderDeviceModal.vue
index 70b295ae..7476dd4b 100644
--- a/client/components/modals/emails/EReaderDeviceModal.vue
+++ b/client/components/modals/emails/EReaderDeviceModal.vue
@@ -125,12 +125,12 @@ export default {
this.$refs.ereaderEmailInput.blur()
if (!this.newDevice.name?.trim() || !this.newDevice.email?.trim()) {
- this.$toast.error('Name and email required')
+ this.$toast.error(this.$strings.ToastNameEmailRequired)
return
}
if (this.newDevice.availabilityOption === 'specificUsers' && !this.newDevice.users.length) {
- this.$toast.error('Must select at least one user')
+ this.$toast.error(this.$strings.ToastSelectAtLeastOneUser)
return
}
if (this.newDevice.availabilityOption !== 'specificUsers') {
@@ -142,14 +142,14 @@ export default {
if (!this.ereaderDevice) {
if (this.existingDevices.some((d) => d.name === this.newDevice.name)) {
- this.$toast.error('Ereader device with that name already exists')
+ this.$toast.error(this.$strings.ToastDeviceNameAlreadyExists)
return
}
this.submitCreate()
} else {
if (this.ereaderDevice.name !== this.newDevice.name && this.existingDevices.some((d) => d.name === this.newDevice.name)) {
- this.$toast.error('Ereader device with that name already exists')
+ this.$toast.error(this.$strings.ToastDeviceNameAlreadyExists)
return
}
@@ -174,12 +174,11 @@ export default {
.$post(`/api/emails/ereader-devices`, payload)
.then((data) => {
this.$emit('update', data.ereaderDevices)
- this.$toast.success('Device updated')
this.show = false
})
.catch((error) => {
console.error('Failed to update device', error)
- this.$toast.error('Failed to update device')
+ this.$toast.error(this.$strings.ToastDeviceUpdateFailed)
})
.finally(() => {
this.processing = false
@@ -201,12 +200,11 @@ export default {
.$post('/api/emails/ereader-devices', payload)
.then((data) => {
this.$emit('update', data.ereaderDevices || [])
- this.$toast.success('Device added')
this.show = false
})
.catch((error) => {
console.error('Failed to add device', error)
- this.$toast.error('Failed to add device')
+ this.$toast.error(this.$strings.ToastDeviceAddFailed)
})
.finally(() => {
this.processing = false
diff --git a/client/components/modals/item/tabs/Cover.vue b/client/components/modals/item/tabs/Cover.vue
index fb87bdaa..69c11119 100644
--- a/client/components/modals/item/tabs/Cover.vue
+++ b/client/components/modals/item/tabs/Cover.vue
@@ -194,7 +194,6 @@ export default {
if (data.error) {
this.$toast.error(data.error)
} else {
- this.$toast.success('Cover Uploaded')
this.resetCoverPreview()
}
this.processingUpload = false
@@ -204,7 +203,7 @@ export default {
if (error.response && error.response.data) {
this.$toast.error(error.response.data)
} else {
- this.$toast.error('Oops, something went wrong...')
+ this.$toast.error(this.$strings.ToastUnknownError)
}
this.processingUpload = false
})
@@ -255,7 +254,7 @@ export default {
},
async updateCover(cover) {
if (!cover.startsWith('http:') && !cover.startsWith('https:')) {
- this.$toast.error('Invalid URL')
+ this.$toast.error(this.$strings.ToastInvalidUrl)
return
}
@@ -264,11 +263,10 @@ export default {
.$post(`/api/items/${this.libraryItemId}/cover`, { url: cover })
.then(() => {
this.imageUrl = ''
- this.$toast.success('Update Successful')
})
.catch((error) => {
console.error('Failed to update cover', error)
- this.$toast.error(error.response?.data || 'Failed to update cover')
+ this.$toast.error(error.response?.data || this.$strings.ToastCoverUpdateFailed)
})
.finally(() => {
this.isProcessing = false
@@ -308,12 +306,9 @@ export default {
this.isProcessing = true
this.$axios
.$patch(`/api/items/${this.libraryItemId}/cover`, { cover: coverFile.metadata.path })
- .then(() => {
- this.$toast.success('Update Successful')
- })
.catch((error) => {
console.error('Failed to set local cover', error)
- this.$toast.error(error.response?.data || 'Failed to set cover')
+ this.$toast.error(error.response?.data || this.$strings.ToastCoverUpdateFailed)
})
.finally(() => {
this.isProcessing = false
@@ -321,4 +316,4 @@ export default {
}
}
}
-
\ No newline at end of file
+
diff --git a/client/components/modals/item/tabs/Details.vue b/client/components/modals/item/tabs/Details.vue
index 62f08c92..6f814e1b 100644
--- a/client/components/modals/item/tabs/Details.vue
+++ b/client/components/modals/item/tabs/Details.vue
@@ -92,7 +92,7 @@ export default {
var { title, author } = this.$refs.itemDetailsEdit.getTitleAndAuthorName()
if (!title) {
- this.$toast.error('Must have a title for quick match')
+ this.$toast.error(this.$strings.ToastTitleRequired)
return
}
this.quickMatching = true
@@ -108,9 +108,9 @@ export default {
if (res.warning) {
this.$toast.warning(res.warning)
} else if (res.updated) {
- this.$toast.success('Item details updated')
+ this.$toast.success(this.$strings.ToastNoUpdatesNecessary)
} else {
- this.$toast.info('No updates were made')
+ this.$toast.info(this.$strings.ToastItemDetailsUpdateUnneeded)
}
})
.catch((error) => {
@@ -128,18 +128,18 @@ export default {
this.rescanning = false
var result = data.result
if (!result) {
- this.$toast.error(`Re-Scan Failed for "${this.title}"`)
+ this.$toast.error(this.$getString('ToastRescanFailed', [this.title]))
} else if (result === 'UPDATED') {
- this.$toast.success(`Re-Scan complete item was updated`)
+ this.$toast.success(this.$strings.ToastRescanUpdated)
} else if (result === 'UPTODATE') {
- this.$toast.success(`Re-Scan complete item was up to date`)
+ this.$toast.success(this.$strings.ToastRescanUpToDate)
} else if (result === 'REMOVED') {
- this.$toast.error(`Re-Scan complete item was removed`)
+ this.$toast.error(this.$strings.ToastRescanRemoved)
}
})
.catch((error) => {
console.error('Failed to scan library item', error)
- this.$toast.error('Failed to scan library item')
+ this.$toast.error(this.$strings.ToastScanFailed)
this.rescanning = false
})
},
@@ -156,7 +156,7 @@ export default {
}
var updatedDetails = this.$refs.itemDetailsEdit.getDetails()
if (!updatedDetails.hasChanges) {
- this.$toast.info('No changes were made')
+ this.$toast.info(this.$strings.MessageNoUpdatesWereNecessary)
return false
}
return this.updateDetails(updatedDetails)
@@ -170,7 +170,7 @@ export default {
this.isProcessing = false
if (updateResult) {
if (updateResult.updated) {
- this.$toast.success('Item details updated')
+ this.$toast.success(this.$strings.MessageItemDetailsUpdated)
return true
} else {
this.$toast.info(this.$strings.MessageNoUpdatesWereNecessary)
@@ -217,4 +217,4 @@ export default {
height: calc(100% - 80px);
max-height: calc(100% - 80px);
}
-
\ No newline at end of file
+
diff --git a/client/components/modals/item/tabs/Match.vue b/client/components/modals/item/tabs/Match.vue
index d11beac0..4cc8d10d 100644
--- a/client/components/modals/item/tabs/Match.vue
+++ b/client/components/modals/item/tabs/Match.vue
@@ -397,7 +397,7 @@ export default {
},
submitSearch() {
if (!this.searchTitle) {
- this.$toast.warning('Search title is required')
+ this.$toast.warning(this.$strings.ToastTitleRequired)
return
}
this.persistProvider()
@@ -618,7 +618,7 @@ export default {
if (updateResult.updated) {
this.$toast.success(this.$strings.ToastItemDetailsUpdateSuccess)
} else {
- this.$toast.info(this.$strings.ToastItemDetailsUpdateUnneeded)
+ this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
}
this.clearSelectedMatch()
this.$emit('selectTab', 'details')
diff --git a/client/components/modals/item/tabs/Schedule.vue b/client/components/modals/item/tabs/Schedule.vue
index 51783764..845f77ec 100644
--- a/client/components/modals/item/tabs/Schedule.vue
+++ b/client/components/modals/item/tabs/Schedule.vue
@@ -163,7 +163,7 @@ export default {
this.isProcessing = false
if (updateResult) {
if (updateResult.updated) {
- this.$toast.success('Item details updated')
+ this.$toast.success(this.$strings.ToastItemDetailsUpdateSuccess)
return true
} else {
this.$toast.info(this.$strings.MessageNoUpdatesWereNecessary)
diff --git a/client/components/modals/libraries/EditModal.vue b/client/components/modals/libraries/EditModal.vue
index 27e3ec6d..1dd9c92a 100644
--- a/client/components/modals/libraries/EditModal.vue
+++ b/client/components/modals/libraries/EditModal.vue
@@ -156,7 +156,7 @@ export default {
},
validate() {
if (!this.libraryCopy.name) {
- this.$toast.error('Library must have a name')
+ this.$toast.error(this.$strings.ToastNameRequired)
return false
}
if (!this.libraryCopy.folders.length) {
@@ -205,7 +205,7 @@ export default {
submitUpdateLibrary() {
var newLibraryPayload = this.getLibraryUpdatePayload()
if (!Object.keys(newLibraryPayload).length) {
- this.$toast.info('No updates are necessary')
+ this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
return
}
@@ -264,4 +264,4 @@ export default {
.tab.tab-selected {
height: 41px;
}
-
\ No newline at end of file
+
diff --git a/client/components/modals/libraries/LazyFolderChooser.vue b/client/components/modals/libraries/LazyFolderChooser.vue
index 061e702f..eb152c28 100644
--- a/client/components/modals/libraries/LazyFolderChooser.vue
+++ b/client/components/modals/libraries/LazyFolderChooser.vue
@@ -162,7 +162,7 @@ export default {
})
.catch((error) => {
console.error('Failed to get filesystem paths', error)
- this.$toast.error('Failed to get filesystem paths')
+ this.$toast.error(this.$strings.ToastFailedToLoadData)
return []
})
.finally(() => {
diff --git a/client/components/modals/libraries/LibraryTools.vue b/client/components/modals/libraries/LibraryTools.vue
index 7297c1ae..a42feeb2 100644
--- a/client/components/modals/libraries/LibraryTools.vue
+++ b/client/components/modals/libraries/LibraryTools.vue
@@ -78,4 +78,4 @@ export default {
},
mounted() {}
}
-
\ No newline at end of file
+
diff --git a/client/components/modals/notification/NotificationEditModal.vue b/client/components/modals/notification/NotificationEditModal.vue
index 2fc10ce6..afd4d1f9 100644
--- a/client/components/modals/notification/NotificationEditModal.vue
+++ b/client/components/modals/notification/NotificationEditModal.vue
@@ -86,7 +86,7 @@ export default {
return this.selectedEventData && this.selectedEventData.requiresLibrary
},
title() {
- return this.isNew ? 'Create Notification' : 'Update Notification'
+ return this.isNew ? this.$strings.HeaderNotificationCreate : this.$strings.HeaderNotificationUpdate
},
availableVariables() {
return this.selectedEventData ? this.selectedEventData.variables || null : null
@@ -104,9 +104,9 @@ export default {
},
submitForm() {
this.$refs.urlsInput?.forceBlur()
-
+
if (!this.newNotification.urls.length) {
- this.$toast.error('Must enter an Apprise URL')
+ this.$toast.error(this.$strings.ToastAppriseUrlRequired)
return
}
@@ -127,12 +127,12 @@ export default {
.$patch(`/api/notifications/${payload.id}`, payload)
.then((updatedSettings) => {
this.$emit('update', updatedSettings)
- this.$toast.success('Notification updated')
+ this.$toast.success(this.$strings.ToastNotificationUpdateSuccess)
this.show = false
})
.catch((error) => {
console.error('Failed to update notification', error)
- this.$toast.error('Failed to update notification')
+ this.$toast.error(this.$strings.ToastNotificationUpdateFailed)
})
.finally(() => {
this.processing = false
@@ -149,12 +149,11 @@ export default {
.$post('/api/notifications', payload)
.then((updatedSettings) => {
this.$emit('update', updatedSettings)
- this.$toast.success('Notification created')
this.show = false
})
.catch((error) => {
console.error('Failed to create notification', error)
- this.$toast.error('Failed to create notification')
+ this.$toast.error(this.$strings.ToastNotificationCreateFailed)
})
.finally(() => {
this.processing = false
diff --git a/client/components/modals/playlists/AddCreateModal.vue b/client/components/modals/playlists/AddCreateModal.vue
index 6d8114fb..3e0c7a9f 100644
--- a/client/components/modals/playlists/AddCreateModal.vue
+++ b/client/components/modals/playlists/AddCreateModal.vue
@@ -130,12 +130,12 @@ export default {
.$post(`/api/playlists/${playlist.id}/batch/remove`, { items: itemObjects })
.then((updatedPlaylist) => {
console.log(`Items removed from playlist`, updatedPlaylist)
- this.$toast.success('Playlist item(s) removed')
+ this.$toast.success(this.$strings.ToastPlaylistUpdateSuccess)
this.processing = false
})
.catch((error) => {
console.error('Failed to remove items from playlist', error)
- this.$toast.error('Failed to remove playlist item(s)')
+ this.$toast.error(this.$strings.ToastPlaylistUpdateFailed)
this.processing = false
})
},
@@ -148,12 +148,12 @@ export default {
.$post(`/api/playlists/${playlist.id}/batch/add`, { items: itemObjects })
.then((updatedPlaylist) => {
console.log(`Items added to playlist`, updatedPlaylist)
- this.$toast.success('Items added to playlist')
+ this.$toast.success(this.$strings.ToastPlaylistUpdateSuccess)
this.processing = false
})
.catch((error) => {
console.error('Failed to add items to playlist', error)
- this.$toast.error('Failed to add items to playlist')
+ this.$toast.error(this.$strings.ToastPlaylistUpdateFailed)
this.processing = false
})
},
@@ -174,14 +174,14 @@ export default {
.$post('/api/playlists', newPlaylist)
.then((data) => {
console.log('New playlist created', data)
- this.$toast.success(`Playlist "${data.name}" created`)
+ this.$toast.success(this.$strings.ToastPlaylistCreateSuccess + ': ' + data.name)
this.processing = false
this.newPlaylistName = ''
})
.catch((error) => {
console.error('Failed to create playlist', error)
var errMsg = error.response ? error.response.data || '' : ''
- this.$toast.error(`Failed to create playlist: ${errMsg}`)
+ this.$toast.error(this.$strings.ToastPlaylistCreateFailed + ': ' + errMsg)
this.processing = false
})
}
diff --git a/client/components/modals/playlists/EditModal.vue b/client/components/modals/playlists/EditModal.vue
index 9130c5b8..b26df65a 100644
--- a/client/components/modals/playlists/EditModal.vue
+++ b/client/components/modals/playlists/EditModal.vue
@@ -86,7 +86,7 @@ export default {
.catch((error) => {
console.error('Failed to remove playlist', error)
this.processing = false
- this.$toast.error(this.$strings.ToastPlaylistRemoveFailed)
+ this.$toast.error(this.$strings.ToastRemoveFailed)
})
}
},
@@ -95,7 +95,7 @@ export default {
return
}
if (!this.newPlaylistName) {
- return this.$toast.error('Playlist must have a name')
+ return this.$toast.error(this.$strings.ToastNameRequired)
}
this.processing = true
diff --git a/client/components/modals/podcast/tabs/EpisodeDetails.vue b/client/components/modals/podcast/tabs/EpisodeDetails.vue
index 720e1f75..ce5e1b58 100644
--- a/client/components/modals/podcast/tabs/EpisodeDetails.vue
+++ b/client/components/modals/podcast/tabs/EpisodeDetails.vue
@@ -142,7 +142,7 @@ export default {
const updatedDetails = this.getUpdatePayload()
if (!Object.keys(updatedDetails).length) {
- this.$toast.info('No changes were made')
+ this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
return false
}
return this.updateDetails(updatedDetails)
diff --git a/client/components/modals/podcast/tabs/EpisodeMatch.vue b/client/components/modals/podcast/tabs/EpisodeMatch.vue
index de58bdf9..403400d1 100644
--- a/client/components/modals/podcast/tabs/EpisodeMatch.vue
+++ b/client/components/modals/podcast/tabs/EpisodeMatch.vue
@@ -105,7 +105,7 @@ export default {
}
const updatePayload = this.getUpdatePayload(episodeData)
if (!Object.keys(updatePayload).length) {
- return this.$toast.info('No updates are necessary')
+ return this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
}
console.log('Episode update payload', updatePayload)
@@ -126,7 +126,7 @@ export default {
},
submitForm() {
if (!this.episodeTitle || !this.episodeTitle.length) {
- this.$toast.error('Must enter an episode title')
+ this.$toast.error(this.$strings.ToastTitleRequired)
return
}
this.searchedTitle = this.episodeTitle
diff --git a/client/components/modals/rssfeed/OpenCloseModal.vue b/client/components/modals/rssfeed/OpenCloseModal.vue
index b5a2a94f..f15a8e8e 100644
--- a/client/components/modals/rssfeed/OpenCloseModal.vue
+++ b/client/components/modals/rssfeed/OpenCloseModal.vue
@@ -121,14 +121,14 @@ export default {
methods: {
openFeed() {
if (!this.newFeedSlug) {
- this.$toast.error('Must set a feed slug')
+ this.$toast.error(this.$strings.ToastSlugRequired)
return
}
const sanitized = this.$sanitizeSlug(this.newFeedSlug)
if (this.newFeedSlug !== sanitized) {
this.newFeedSlug = sanitized
- this.$toast.warning('Slug had to be modified - Run again')
+ this.$toast.warning(this.$strings.ToastSlugMustChange)
return
}
diff --git a/client/components/stats/YearInReview.vue b/client/components/stats/YearInReview.vue
index 57e1e088..56840b9c 100644
--- a/client/components/stats/YearInReview.vue
+++ b/client/components/stats/YearInReview.vue
@@ -261,7 +261,7 @@ export default {
.catch((error) => {
console.error('Failed to share', error)
if (error.name !== 'AbortError') {
- this.$toast.error('Failed to share: ' + error.message)
+ this.$toast.error(this.$strings.ToastFailedToShare + ': ' + error.message)
}
})
} else {
diff --git a/client/components/stats/YearInReviewServer.vue b/client/components/stats/YearInReviewServer.vue
index 9843a64d..05bc0910 100644
--- a/client/components/stats/YearInReviewServer.vue
+++ b/client/components/stats/YearInReviewServer.vue
@@ -237,7 +237,7 @@ export default {
.catch((error) => {
console.error('Failed to share', error)
if (error.name !== 'AbortError') {
- this.$toast.error('Failed to share: ' + error.message)
+ this.$toast.error(this.$strings.ToastFailedToShare + ': ' + error.message)
}
})
} else {
diff --git a/client/components/stats/YearInReviewShort.vue b/client/components/stats/YearInReviewShort.vue
index dbcd234b..dbba0172 100644
--- a/client/components/stats/YearInReviewShort.vue
+++ b/client/components/stats/YearInReviewShort.vue
@@ -167,7 +167,7 @@ export default {
.catch((error) => {
console.error('Failed to share', error)
if (error.name !== 'AbortError') {
- this.$toast.error('Failed to share: ' + error.message)
+ this.$toast.error(this.$strings.ToastFailedToShare + ': ' + error.message)
}
})
} else {
diff --git a/client/components/tables/BackupsTable.vue b/client/components/tables/BackupsTable.vue
index d768407f..6b0c6723 100644
--- a/client/components/tables/BackupsTable.vue
+++ b/client/components/tables/BackupsTable.vue
@@ -186,7 +186,7 @@ export default {
mounted() {
this.loadBackups()
if (this.$route.query.backup) {
- this.$toast.success('Backup applied successfully')
+ this.$toast.success(this.$strings.ToastBackupAppliedSuccess)
}
}
}
diff --git a/client/components/tables/CollectionBooksTable.vue b/client/components/tables/CollectionBooksTable.vue
index d7d1225e..ce66de11 100644
--- a/client/components/tables/CollectionBooksTable.vue
+++ b/client/components/tables/CollectionBooksTable.vue
@@ -78,7 +78,7 @@ export default {
})
.catch((error) => {
console.error('Failed to update collection', error)
- this.$toast.error('Failed to save collection books order')
+ this.$toast.error(this.$strings.ToastCollectionUpdateFailed)
})
},
editBook(book) {
@@ -110,4 +110,4 @@ export default {
.collection-book-leave-active {
position: absolute;
}
-
\ No newline at end of file
+
diff --git a/client/components/tables/CustomMetadataProviderTable.vue b/client/components/tables/CustomMetadataProviderTable.vue
index 88ac51dc..25418413 100644
--- a/client/components/tables/CustomMetadataProviderTable.vue
+++ b/client/components/tables/CustomMetadataProviderTable.vue
@@ -45,7 +45,7 @@ export default {
methods: {
removeProvider(provider) {
const payload = {
- message: `Are you sure you want remove custom metadata provider "${provider.name}"?`,
+ message: this.$getString('MessageConfirmDeleteMetadataProvider', [provider.name]),
callback: (confirmed) => {
if (confirmed) {
this.$emit('update:processing', true)
@@ -53,12 +53,12 @@ export default {
this.$axios
.$delete(`/api/custom-metadata-providers/${provider.id}`)
.then(() => {
- this.$toast.success('Provider removed')
+ this.$toast.success(this.$strings.ToastProviderRemoveSuccess)
this.$emit('removed', provider.id)
})
.catch((error) => {
console.error('Failed to remove provider', error)
- this.$toast.error('Failed to remove provider')
+ this.$toast.error(this.$strings.ToastRemoveFailed)
})
.finally(() => {
this.$emit('update:processing', false)
diff --git a/client/components/tables/PlaylistItemsTable.vue b/client/components/tables/PlaylistItemsTable.vue
index 3a741bfe..09811d4a 100644
--- a/client/components/tables/PlaylistItemsTable.vue
+++ b/client/components/tables/PlaylistItemsTable.vue
@@ -92,7 +92,7 @@ export default {
})
.catch((error) => {
console.error('Failed to update playlist', error)
- this.$toast.error('Failed to save playlist items order')
+ this.$toast.error(this.$strings.ToastPlaylistUpdateFailed)
})
},
init() {
@@ -119,4 +119,4 @@ export default {
.playlist-item-leave-active {
position: absolute;
}
-
\ No newline at end of file
+
diff --git a/client/components/tables/playlist/ItemTableRow.vue b/client/components/tables/playlist/ItemTableRow.vue
index 61fe1451..f7cc7d7b 100644
--- a/client/components/tables/playlist/ItemTableRow.vue
+++ b/client/components/tables/playlist/ItemTableRow.vue
@@ -218,12 +218,12 @@ export default {
this.$toast.success(this.$strings.ToastPlaylistRemoveSuccess)
} else {
console.log(`Item removed from playlist`, updatedPlaylist)
- this.$toast.success('Item removed from playlist')
+ this.$toast.success(this.$strings.ToastPlaylistUpdateSuccess)
}
})
.catch((error) => {
console.error('Failed to remove item from playlist', error)
- this.$toast.error('Failed to remove item from playlist')
+ this.$toast.error(this.$strings.ToastPlaylistUpdateFailed)
})
.finally(() => {
this.processingRemove = false
diff --git a/client/components/tables/podcast/LazyEpisodesTable.vue b/client/components/tables/podcast/LazyEpisodesTable.vue
index 27b624b7..2dfe4c55 100644
--- a/client/components/tables/podcast/LazyEpisodesTable.vue
+++ b/client/components/tables/podcast/LazyEpisodesTable.vue
@@ -270,7 +270,7 @@ export default {
if (data.numEpisodesUpdated) {
this.$toast.success(`${data.numEpisodesUpdated} episodes updated`)
} else {
- this.$toast.info('No changes were made')
+ this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
}
})
.catch((error) => {
@@ -295,7 +295,7 @@ export default {
episodeId: episode.id,
title: episode.title,
subtitle: this.mediaMetadata.title,
- caption: episode.publishedAt ? `Published ${this.$formatDate(episode.publishedAt, this.dateFormat)}` : 'Unknown publish date',
+ caption: episode.publishedAt ? this.$getString('LabelPublishedDate', [this.$formatDate(episode.publishedAt, this.dateFormat)]) : this.$strings.LabelUnknownPublishDate,
duration: episode.audioFile.duration || null,
coverPath: this.media.coverPath || null
}
@@ -372,7 +372,7 @@ export default {
episodeId: episode.id,
title: episode.title,
subtitle: this.mediaMetadata.title,
- caption: episode.publishedAt ? `Published ${this.$formatDate(episode.publishedAt, this.dateFormat)}` : 'Unknown publish date',
+ caption: episode.publishedAt ? this.$getString('LabelPublishedDate', [this.$formatDate(episode.publishedAt, this.dateFormat)]) : this.$strings.LabelUnknownPublishDate,
duration: episode.audioFile.duration || null,
coverPath: this.media.coverPath || null
})
diff --git a/client/components/ui/LoadingIndicator.vue b/client/components/ui/LoadingIndicator.vue
index 9762fde7..d984bf35 100644
--- a/client/components/ui/LoadingIndicator.vue
+++ b/client/components/ui/LoadingIndicator.vue
@@ -7,7 +7,7 @@
-