mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Add localization for notification descriptions
This commit is contained in:
parent
8a20510cde
commit
df6afc957f
@ -77,7 +77,13 @@ export default {
|
|||||||
return this.notificationData.events || []
|
return this.notificationData.events || []
|
||||||
},
|
},
|
||||||
eventOptions() {
|
eventOptions() {
|
||||||
return this.notificationEvents.map((e) => ({ value: e.name, text: e.name, subtext: e.description }))
|
return this.notificationEvents.map((e) => {
|
||||||
|
return {
|
||||||
|
value: e.name,
|
||||||
|
text: e.name,
|
||||||
|
subtext: this.$strings[e.descriptionKey] || e.description
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
selectedEventData() {
|
selectedEventData() {
|
||||||
return this.notificationEvents.find((e) => e.name === this.newNotification.eventName)
|
return this.notificationEvents.find((e) => e.name === this.newNotification.eventName)
|
||||||
|
@ -852,6 +852,10 @@
|
|||||||
"NoteUploaderFoldersWithMediaFiles": "Folders with media files will be handled as separate library items.",
|
"NoteUploaderFoldersWithMediaFiles": "Folders with media files will be handled as separate library items.",
|
||||||
"NoteUploaderOnlyAudioFiles": "If uploading only audio files then each audio file will be handled as a separate audiobook.",
|
"NoteUploaderOnlyAudioFiles": "If uploading only audio files then each audio file will be handled as a separate audiobook.",
|
||||||
"NoteUploaderUnsupportedFiles": "Unsupported files are ignored. When choosing or dropping a folder, other files that are not in an item folder are ignored.",
|
"NoteUploaderUnsupportedFiles": "Unsupported files are ignored. When choosing or dropping a folder, other files that are not in an item folder are ignored.",
|
||||||
|
"NotificationOnBackupCompletedDescription": "Triggered when a backup is completed",
|
||||||
|
"NotificationOnBackupFailedDescription": "Triggered when a backup fails",
|
||||||
|
"NotificationOnEpisodeDownloadedDescription": "Triggered when a podcast episode is auto-downloaded",
|
||||||
|
"NotificationOnTestDescription": "Event for testing the notification system",
|
||||||
"PlaceholderNewCollection": "New collection name",
|
"PlaceholderNewCollection": "New collection name",
|
||||||
"PlaceholderNewFolderPath": "New folder path",
|
"PlaceholderNewFolderPath": "New folder path",
|
||||||
"PlaceholderNewPlaylist": "New playlist name",
|
"PlaceholderNewPlaylist": "New playlist name",
|
||||||
|
@ -7,6 +7,7 @@ module.exports.notificationData = {
|
|||||||
requiresLibrary: true,
|
requiresLibrary: true,
|
||||||
libraryMediaType: 'podcast',
|
libraryMediaType: 'podcast',
|
||||||
description: 'Triggered when a podcast episode is auto-downloaded',
|
description: 'Triggered when a podcast episode is auto-downloaded',
|
||||||
|
descriptionKey: 'NotificationOnEpisodeDownloadedDescription',
|
||||||
variables: ['libraryItemId', 'libraryId', 'podcastTitle', 'podcastAuthor', 'podcastDescription', 'podcastGenres', 'episodeTitle', 'episodeSubtitle', 'episodeDescription', 'libraryName', 'episodeId', 'mediaTags'],
|
variables: ['libraryItemId', 'libraryId', 'podcastTitle', 'podcastAuthor', 'podcastDescription', 'podcastGenres', 'episodeTitle', 'episodeSubtitle', 'episodeDescription', 'libraryName', 'episodeId', 'mediaTags'],
|
||||||
defaults: {
|
defaults: {
|
||||||
title: 'New {{podcastTitle}} Episode!',
|
title: 'New {{podcastTitle}} Episode!',
|
||||||
@ -31,6 +32,7 @@ module.exports.notificationData = {
|
|||||||
name: 'onBackupCompleted',
|
name: 'onBackupCompleted',
|
||||||
requiresLibrary: false,
|
requiresLibrary: false,
|
||||||
description: 'Triggered when a backup is completed',
|
description: 'Triggered when a backup is completed',
|
||||||
|
descriptionKey: 'NotificationOnBackupCompletedDescription',
|
||||||
variables: ['completionTime', 'backupPath', 'backupSize', 'backupCount', 'removedOldest'],
|
variables: ['completionTime', 'backupPath', 'backupSize', 'backupCount', 'removedOldest'],
|
||||||
defaults: {
|
defaults: {
|
||||||
title: 'Backup Completed',
|
title: 'Backup Completed',
|
||||||
@ -48,6 +50,7 @@ module.exports.notificationData = {
|
|||||||
name: 'onBackupFailed',
|
name: 'onBackupFailed',
|
||||||
requiresLibrary: false,
|
requiresLibrary: false,
|
||||||
description: 'Triggered when a backup fails',
|
description: 'Triggered when a backup fails',
|
||||||
|
descriptionKey: 'NotificationOnBackupFailedDescription',
|
||||||
variables: ['errorMsg'],
|
variables: ['errorMsg'],
|
||||||
defaults: {
|
defaults: {
|
||||||
title: 'Backup Failed',
|
title: 'Backup Failed',
|
||||||
@ -61,6 +64,7 @@ module.exports.notificationData = {
|
|||||||
name: 'onTest',
|
name: 'onTest',
|
||||||
requiresLibrary: false,
|
requiresLibrary: false,
|
||||||
description: 'Event for testing the notification system',
|
description: 'Event for testing the notification system',
|
||||||
|
descriptionKey: 'NotificationOnTestDescription',
|
||||||
variables: ['version'],
|
variables: ['version'],
|
||||||
defaults: {
|
defaults: {
|
||||||
title: 'Test Notification on Abs {{version}}',
|
title: 'Test Notification on Abs {{version}}',
|
||||||
|
Loading…
Reference in New Issue
Block a user