From 03bfce5112fad797187a57198a0e4af970c60de7 Mon Sep 17 00:00:00 2001 From: Matthias Meulien Date: Sun, 9 Aug 2020 21:44:59 +0200 Subject: [PATCH] Allow artist albums dropdown fields to be translated --- src/js/locale/en.yaml | 11 +++++++++++ src/js/views/Artist.js | 16 ++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/js/locale/en.yaml b/src/js/locale/en.yaml index 0bf9a79c..6c3aa33d 100755 --- a/src/js/locale/en.yaml +++ b/src/js/locale/en.yaml @@ -238,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: diff --git a/src/js/views/Artist.js b/src/js/views/Artist.js index b43bfdb1..8f13f5ca 100755 --- a/src/js/views/Artist.js +++ b/src/js/views/Artist.js @@ -192,38 +192,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'), }, ];