Merge pull request #579 from orontee/complete_translations

Complete translations
This commit is contained in:
James Barnsley
2020-08-12 20:14:59 +12:00
committed by GitHub
5 changed files with 35 additions and 15 deletions

View File

@ -3,6 +3,7 @@ import React from 'react';
import Link from '../Link';
import Icon from '../Icon';
import { i18n } from '../../locale';
export default class FilterField extends React.Component {
constructor(props) {
@ -68,7 +69,7 @@ export default class FilterField extends React.Component {
<form onSubmit={e => this.handleSubmit(e)}>
<input
type="text"
placeholder="Filter"
placeholder={i18n('fields.filter')}
value={this.state.value}
onFocus={(e) => this.activate()}
onBlur={(e) => this.handleBlur()}

View File

@ -1,20 +1,21 @@
import React, { memo } from 'react';
import Icon from '../Icon';
import { I18n } from '../../locale';
export default memo((props) => {
if (props.mute) {
return (
<button className={`control mute-control ${props.noTooltip ? '' : 'tooltip '}${props.className ? props.className : ''}`} onClick={() => props.onMuteChange(false)}>
<Icon className="red-text" name="volume_off" />
{props.noTooltip ? null : <span className="tooltip__content">Unmute</span>}
{props.noTooltip ? null : <span className="tooltip__content"><I18n path="playback_controls.unmute"/></span>}
</button>
);
}
return (
<button className={`control mute-control ${props.noTooltip ? '' : 'tooltip '}${props.className ? props.className : ''}`} onClick={() => props.onMuteChange(true)}>
<Icon className="muted" name="volume_mute" />
{props.noTooltip ? null : <span className="tooltip__content">Mute</span>}
{props.noTooltip ? null : <span className="tooltip__content"><I18n path="playback_controls.mute"/></span>}
</button>
);
});

View File

@ -57,6 +57,7 @@ fields:
items_to_add:
label: Items to add
placeholder: No items
filter: Filter
filters:
all: All
thumbnails: Thumbnails
@ -113,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:
@ -173,6 +177,8 @@ playback_controls:
shuffle: Shuffle
repeat: Repeat
no_outputs: No outputs
mute: Mute
unmute: Unmute
snapcast:
enabled: Enabled
show_disconnected_clients: Show disconnected clients
@ -232,6 +238,17 @@ artist:
wiki:
published: 'Published: %{date}'
origin: 'Origin: '
albums:
sort:
default: Default
name: Name
release_date: Date
track_count: Tracks
filter:
all: All
albums: Albums
singles: Singles
compilations: Compilations
debug:
title: Debug
ui:

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,
@ -1875,7 +1876,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,

View File

@ -186,38 +186,38 @@ class Artist extends React.Component {
const sort_options = [
{
value: null,
label: 'Default',
label: i18n('artist.albums.sort.default'),
},
{
value: 'name',
label: 'Name',
label: i18n('artist.albums.sort.name'),
},
{
value: 'release_date',
label: 'Date',
label: i18n('artist.albums.sort.release_date'),
},
{
value: 'tracks_uris.length',
label: 'Tracks',
label: i18n('artist.albums.sort.track_count'),
},
];
const filter_options = [
{
value: null,
label: 'All',
label: i18n('artist.albums.filter.all'),
},
{
value: 'album',
label: 'Albums',
label: i18n('artist.albums.filter.albums'),
},
{
value: 'single',
label: 'Singles',
label: i18n('artist.albums.filter.singles'),
},
{
value: 'compilation',
label: 'Compilations',
label: i18n('artist.albums.filter.compilations'),
},
];