From c501a8ddb1ec3c1a15e05357737458f9ab8d2b82 Mon Sep 17 00:00:00 2001 From: Core <64542347+coredev-uk@users.noreply.github.com> Date: Mon, 1 Aug 2022 14:09:34 +0100 Subject: [PATCH] locale notifications --- src/i18n/README.md | 4 ++++ src/i18n/en_US.json | 1 + src/i18n/source/en_US.json | 1 + src/main/plugins/playbackNotifications.ts | 16 ++++------------ 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/i18n/README.md b/src/i18n/README.md index 5ab6cba6..8b2340aa 100644 --- a/src/i18n/README.md +++ b/src/i18n/README.md @@ -525,3 +525,7 @@ Update 03/07/2022 20:00 UTC Update 25/07/2022 00:22 UTC * `settings.option.visual.compactArtistHeader`: Added to `en_US` + +Update 01/08/2022 13:00 UTC + +* `term.skip`: Added to `en_US` \ No newline at end of file diff --git a/src/i18n/en_US.json b/src/i18n/en_US.json index b996e50a..5b88510d 100644 --- a/src/i18n/en_US.json +++ b/src/i18n/en_US.json @@ -62,6 +62,7 @@ "term.stop": "Stop", "term.previous": "Previous", "term.next": "Next", + "term.skip": "Skip", "term.shuffle": "Shuffle", "term.enableShuffle": "Enable shuffle", "term.disableShuffle": "Disable shuffle", diff --git a/src/i18n/source/en_US.json b/src/i18n/source/en_US.json index 122de9ad..a9e8c851 100644 --- a/src/i18n/source/en_US.json +++ b/src/i18n/source/en_US.json @@ -62,6 +62,7 @@ "term.stop": "Stop", "term.previous": "Previous", "term.next": "Next", + "term.skip": "Skip", "term.shuffle": "Shuffle", "term.enableShuffle": "Enable shuffle", "term.disableShuffle": "Disable shuffle", diff --git a/src/main/plugins/playbackNotifications.ts b/src/main/plugins/playbackNotifications.ts index a89b836f..5dbf750d 100644 --- a/src/main/plugins/playbackNotifications.ts +++ b/src/main/plugins/playbackNotifications.ts @@ -37,11 +37,7 @@ export default class playbackNotifications { actions: [ { 'type': 'button', - 'text': 'Play/Pause' - }, - { - 'type': 'button', - 'text': 'Next' + 'text': `${this._utils.getLocale(this._utils.getStoreValue('general.language'), 'term.skip')}` } ], toastXml: ` @@ -54,8 +50,8 @@ export default class playbackNotifications { - - + + ` }); @@ -73,11 +69,7 @@ export default class playbackNotifications { }) this._notification.on('action', (event: any, action: any) => { - if (action === 0) { - this._utils.playback.playPause() - } else if (action === 1) { - this._utils.playback.next() - } + this._utils.playback.next() }) this._notification.show();