diff --git a/client/components/modals/notification/NotificationEditModal.vue b/client/components/modals/notification/NotificationEditModal.vue index 32fa20ea..83b5a9d0 100644 --- a/client/components/modals/notification/NotificationEditModal.vue +++ b/client/components/modals/notification/NotificationEditModal.vue @@ -77,7 +77,13 @@ export default { return this.notificationData.events || [] }, 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() { return this.notificationEvents.find((e) => e.name === this.newNotification.eventName) diff --git a/client/strings/en-us.json b/client/strings/en-us.json index 4370851d..edad1672 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -852,6 +852,10 @@ "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.", "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", "PlaceholderNewFolderPath": "New folder path", "PlaceholderNewPlaylist": "New playlist name", diff --git a/server/utils/notifications.js b/server/utils/notifications.js index 96e8ddf8..7a3e1198 100644 --- a/server/utils/notifications.js +++ b/server/utils/notifications.js @@ -7,6 +7,7 @@ module.exports.notificationData = { requiresLibrary: true, libraryMediaType: 'podcast', description: 'Triggered when a podcast episode is auto-downloaded', + descriptionKey: 'NotificationOnEpisodeDownloadedDescription', variables: ['libraryItemId', 'libraryId', 'podcastTitle', 'podcastAuthor', 'podcastDescription', 'podcastGenres', 'episodeTitle', 'episodeSubtitle', 'episodeDescription', 'libraryName', 'episodeId', 'mediaTags'], defaults: { title: 'New {{podcastTitle}} Episode!', @@ -31,6 +32,7 @@ module.exports.notificationData = { name: 'onBackupCompleted', requiresLibrary: false, description: 'Triggered when a backup is completed', + descriptionKey: 'NotificationOnBackupCompletedDescription', variables: ['completionTime', 'backupPath', 'backupSize', 'backupCount', 'removedOldest'], defaults: { title: 'Backup Completed', @@ -48,6 +50,7 @@ module.exports.notificationData = { name: 'onBackupFailed', requiresLibrary: false, description: 'Triggered when a backup fails', + descriptionKey: 'NotificationOnBackupFailedDescription', variables: ['errorMsg'], defaults: { title: 'Backup Failed', @@ -61,6 +64,7 @@ module.exports.notificationData = { name: 'onTest', requiresLibrary: false, description: 'Event for testing the notification system', + descriptionKey: 'NotificationOnTestDescription', variables: ['version'], defaults: { title: 'Test Notification on Abs {{version}}',