Allow process notifications in Mopidy middleware to be translated

This commit is contained in:
Matthias Meulien
2020-08-09 20:01:23 +02:00
parent 62f58018c7
commit 2ba5f6ede6
2 changed files with 7 additions and 3 deletions

View File

@ -114,6 +114,9 @@ services:
mopidy:
title: Mopidy
local: Local
adding_uris: 'Adding %{count} URI(s)'
searching_providers: 'Searching %{count} Mopidy providers'
loading_albums: 'Loading %{count} local albums'
spotify:
title: Spotify
pusher:

View File

@ -3,6 +3,7 @@ import ReactGA from 'react-ga';
import Mopidy from 'mopidy';
import { sha256 } from 'js-sha256';
import { sampleSize } from 'lodash';
import { i18n } from '../../locale';
import {
generateGuid,
uriSource,
@ -786,7 +787,7 @@ const MopidyMiddleware = (function () {
// start our processor
store.dispatch(uiActions.startProcess(
'MOPIDY_ENQUEUE_URIS_PROCESSOR',
`Adding ${action.uris.length} URI(s)`,
i18n('services.mopidy.adding_uris', { count: action.uris.length }),
{
batches,
remaining: action.uris.length,
@ -1042,7 +1043,7 @@ const MopidyMiddleware = (function () {
} else {
store.dispatch(uiActions.startProcess(
'MOPIDY_GET_SEARCH_RESULTS_PROCESSOR',
`Searching ${uri_schemes_total} Mopidy providers`,
i18n('services.mopidy.searching_providers', { count: uri_schemes_total }),
{
query: action.query,
limit: action.limit,
@ -1871,7 +1872,7 @@ const MopidyMiddleware = (function () {
// Start our process to load the full album objects
store.dispatch(uiActions.startProcess(
'MOPIDY_LIBRARY_ALBUMS_PROCESSOR',
`Loading ${uris.length} local albums`,
i18n('services.mopidy.loading_albums', { count: uris.length }),
{
uris,
total: uris.length,