Update:More localization strings #1103

This commit is contained in:
advplyr 2022-11-08 17:10:08 -06:00
parent c1b3d7779b
commit 400e34a4c7
63 changed files with 681 additions and 584 deletions

View file

@ -66,22 +66,22 @@ export default {
mobileMenuItems() {
const items = [
{
text: 'Scan',
text: this.$strings.ButtonScan,
value: 'scan'
},
{
text: 'Force Re-Scan',
text: this.$strings.ButtonForceReScan,
value: 'force-scan'
}
]
if (this.isBookLibrary) {
items.push({
text: 'Match Books',
text: this.$strings.ButtonMatchBooks,
value: 'match-books'
})
}
items.push({
text: 'Delete',
text: this.$strings.ButtonDelete,
value: 'delete'
})
return items
@ -122,28 +122,28 @@ export default {
this.$store
.dispatch('libraries/requestLibraryScan', { libraryId: this.library.id })
.then(() => {
this.$toast.success('Library scan started')
this.$toast.success(this.$strings.ToastLibraryScanStarted)
})
.catch((error) => {
console.error('Failed to start scan', error)
this.$toast.error('Failed to start scan')
this.$toast.error(this.$strings.ToastLibraryScanFailedToStart)
})
},
forceScan() {
if (confirm(`Force Re-Scan will scan all files again like a fresh scan. Audio file ID3 tags, OPF files, and text files will be probed/parsed to be used for the library item.\n\nAre you sure you want to force re-scan?`)) {
if (confirm(this.$strings.MessageConfirmForceReScan)) {
this.$store
.dispatch('libraries/requestLibraryScan', { libraryId: this.library.id, force: 1 })
.then(() => {
this.$toast.success('Library scan started')
this.$toast.success(this.$strings.ToastLibraryScanStarted)
})
.catch((error) => {
console.error('Failed to start scan', error)
this.$toast.error('Failed to start scan')
this.$toast.error(this.$strings.ToastLibraryScanFailedToStart)
})
}
},
deleteClick() {
if (confirm(`Are you sure you want to permanently delete library "${this.library.name}"?`)) {
if (confirm(this.$getString('MessageConfirmDeleteLibrary', [this.library.name]))) {
this.isDeleting = true
this.$axios
.$delete(`/api/libraries/${this.library.id}`)
@ -152,12 +152,12 @@ export default {
if (data.error) {
this.$toast.error(data.error)
} else {
this.$toast.success('Library deleted')
this.$toast.success(this.$strings.ToastLibraryDeleteSuccess)
}
})
.catch((error) => {
console.error('Failed to delete library', error)
this.$toast.error('Failed to delete library')
this.$toast.error(this.$strings.ToastLibraryDeleteFailed)
this.isDeleting = false
})
}