locale notifications

This commit is contained in:
Core 2022-08-01 14:09:34 +01:00
parent 882de9cb49
commit c501a8ddb1
4 changed files with 10 additions and 12 deletions

View file

@ -525,3 +525,7 @@ Update 03/07/2022 20:00 UTC
Update 25/07/2022 00:22 UTC Update 25/07/2022 00:22 UTC
* `settings.option.visual.compactArtistHeader`: Added to `en_US` * `settings.option.visual.compactArtistHeader`: Added to `en_US`
Update 01/08/2022 13:00 UTC
* `term.skip`: Added to `en_US`

View file

@ -62,6 +62,7 @@
"term.stop": "Stop", "term.stop": "Stop",
"term.previous": "Previous", "term.previous": "Previous",
"term.next": "Next", "term.next": "Next",
"term.skip": "Skip",
"term.shuffle": "Shuffle", "term.shuffle": "Shuffle",
"term.enableShuffle": "Enable shuffle", "term.enableShuffle": "Enable shuffle",
"term.disableShuffle": "Disable shuffle", "term.disableShuffle": "Disable shuffle",

View file

@ -62,6 +62,7 @@
"term.stop": "Stop", "term.stop": "Stop",
"term.previous": "Previous", "term.previous": "Previous",
"term.next": "Next", "term.next": "Next",
"term.skip": "Skip",
"term.shuffle": "Shuffle", "term.shuffle": "Shuffle",
"term.enableShuffle": "Enable shuffle", "term.enableShuffle": "Enable shuffle",
"term.disableShuffle": "Disable shuffle", "term.disableShuffle": "Disable shuffle",

View file

@ -37,11 +37,7 @@ export default class playbackNotifications {
actions: [ actions: [
{ {
'type': 'button', 'type': 'button',
'text': 'Play/Pause' 'text': `${this._utils.getLocale(this._utils.getStoreValue('general.language'), 'term.skip')}`
},
{
'type': 'button',
'text': 'Next'
} }
], ],
toastXml: ` toastXml: `
@ -54,8 +50,8 @@ export default class playbackNotifications {
</binding> </binding>
</visual> </visual>
<actions> <actions>
<action content="Play/Pause" activationType="protocol" arguments="cider://playpause/"/> <action content="${this._utils.getLocale(this._utils.getStoreValue('general.language'), 'term.playpause')}" activationType="protocol" arguments="cider://playpause/"/>
<action content="Next" activationType="protocol" arguments="cider://nextitem/"/> <action content="${this._utils.getLocale(this._utils.getStoreValue('general.language'), 'term.next')}" activationType="protocol" arguments="cider://nextitem/"/>
</actions> </actions>
</toast>` </toast>`
}); });
@ -73,11 +69,7 @@ export default class playbackNotifications {
}) })
this._notification.on('action', (event: any, action: any) => { this._notification.on('action', (event: any, action: any) => {
if (action === 0) { this._utils.playback.next()
this._utils.playback.playPause()
} else if (action === 1) {
this._utils.playback.next()
}
}) })
this._notification.show(); this._notification.show();