diff --git a/src/components/recordingcreator/recordingfields.js b/src/components/recordingcreator/recordingfields.js index 7ebb2fa9ef..179b472bc3 100644 --- a/src/components/recordingcreator/recordingfields.js +++ b/src/components/recordingcreator/recordingfields.js @@ -225,10 +225,6 @@ function onRecordChange(e) { } } -function sendToast(msg) { - toast(msg); -} - function onRecordSeriesChange(e) { this.changed = true; @@ -252,7 +248,7 @@ function onRecordSeriesChange(e) { } else { if (this.SeriesTimerId) { apiClient.cancelLiveTvSeriesTimer(this.SeriesTimerId).then(function () { - sendToast(globalize.translate('RecordingCancelled')); + toast(globalize.translate('RecordingCancelled')); fetchData(self); }); } diff --git a/src/components/recordingcreator/recordinghelper.js b/src/components/recordingcreator/recordinghelper.js index e837fa1f27..1780668afd 100644 --- a/src/components/recordingcreator/recordinghelper.js +++ b/src/components/recordingcreator/recordinghelper.js @@ -16,7 +16,7 @@ function changeRecordingToSeries(apiClient, timerId, programId, confirmTimerCanc return apiClient.getNewLiveTvTimerDefaults({ programId: programId }).then(function (timerDefaults) { return apiClient.createLiveTvSeriesTimer(timerDefaults).then(function () { loading.hide(); - sendToast(globalize.translate('SeriesRecordingScheduled')); + toast(globalize.translate('SeriesRecordingScheduled')); }); }); } else { @@ -76,7 +76,7 @@ function cancelTimer(apiClient, timerId, hideLoading) { return apiClient.cancelLiveTvTimer(timerId).then(function () { if (hideLoading !== false) { loading.hide(); - sendToast(globalize.translate('RecordingCancelled')); + toast(globalize.translate('RecordingCancelled')); } }); } @@ -90,15 +90,11 @@ function createRecording(apiClient, programId, isSeries) { return promise.then(function () { loading.hide(); - sendToast(globalize.translate('RecordingScheduled')); + toast(globalize.translate('RecordingScheduled')); }); }); } -function sendToast(msg) { - toast(msg); -} - function showMultiCancellationPrompt(serverId, programId, timerId, timerStatus, seriesTimerId) { return new Promise(function (resolve, reject) { const items = []; diff --git a/src/components/remotecontrol/remotecontrol.js b/src/components/remotecontrol/remotecontrol.js index f38a92b293..3c1c8175ca 100644 --- a/src/components/remotecontrol/remotecontrol.js +++ b/src/components/remotecontrol/remotecontrol.js @@ -865,7 +865,7 @@ export default function () { }, currentPlayer); form.querySelector('input').value = ''; - toast('Message sent.'); + toast(globalize.translate('MessageSent')); e.preventDefault(); e.stopPropagation(); @@ -882,7 +882,7 @@ export default function () { }, currentPlayer); form.querySelector('input').value = ''; - toast('Text sent.'); + toast(globalize.translate('TextSent')); e.preventDefault(); e.stopPropagation(); diff --git a/src/components/shortcuts.js b/src/components/shortcuts.js index b3d82c4988..cd1f957d29 100644 --- a/src/components/shortcuts.js +++ b/src/components/shortcuts.js @@ -167,10 +167,6 @@ import toast from './toast/toast'; }); } - function sendToast(text) { - toast(text); - } - function executeAction(card, target, action) { target = target || card; @@ -222,7 +218,7 @@ import toast from './toast/toast'; ids: [playableItemId], serverId: serverId }); - sendToast(globalize.translate('MediaQueued')); + toast(globalize.translate('MediaQueued')); } else { playbackManager.queue({ ids: [playableItemId], diff --git a/src/controllers/dashboard/dlna/profile.js b/src/controllers/dashboard/dlna/profile.js index 7498cc39dd..e54e1e3fc7 100644 --- a/src/controllers/dashboard/dlna/profile.js +++ b/src/controllers/dashboard/dlna/profile.js @@ -635,7 +635,7 @@ import toast from '../../../components/toast/toast'; data: JSON.stringify(profile), contentType: 'application/json' }).then(function () { - toast('Settings saved.'); + toast(globalize.translate('SettingsSaved')); }, Dashboard.processErrorResponse); } else { ApiClient.ajax({ diff --git a/src/strings/en-us.json b/src/strings/en-us.json index bf6d74a0b6..b009f1fe5b 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -1024,6 +1024,7 @@ "MessagePluginInstalled": "The plugin has been successfully installed. The server will need to be restarted for changes to take effect.", "MessagePluginInstallError": "An error occured while installing the plugin.", "MessageReenableUser": "See below to reenable", + "MessageSent": "Message sent.", "MessageSyncPlayCreateGroupDenied": "Permission required to create a group.", "MessageSyncPlayDisabled": "SyncPlay disabled.", "MessageSyncPlayEnabled": "SyncPlay enabled.", @@ -1393,6 +1394,7 @@ "Tags": "Tags", "TagsValue": "Tags: {0}", "TellUsAboutYourself": "Tell us about yourself", + "TextSent": "Text sent.", "ThemeSongs": "Theme songs", "ThemeVideos": "Theme videos", "TheseSettingsAffectSubtitlesOnThisDevice": "These settings affect subtitles on this device",