diff --git a/web-src/src/components/TabsSettings.vue b/web-src/src/components/TabsSettings.vue index 0ea5b396..0db28c19 100644 --- a/web-src/src/components/TabsSettings.vue +++ b/web-src/src/components/TabsSettings.vue @@ -24,9 +24,7 @@
  • @@ -49,9 +47,7 @@ >
  • - +
  • diff --git a/web-src/src/i18n.js b/web-src/src/i18n.js index 2bb17f80..9b544336 100644 --- a/web-src/src/i18n.js +++ b/web-src/src/i18n.js @@ -9,7 +9,9 @@ import messages from '@intlify/vite-plugin-vue-i18n/messages' export default createI18n({ legacy: false, globalInjection: true, - locale: 'en', + locale: navigator.language, fallbackLocale: 'en', + fallbackWarn: false, + missingWarn: false, messages }) diff --git a/web-src/src/locales/fr.json b/web-src/src/locales/fr.json index 81ea2566..9cd750bd 100644 --- a/web-src/src/locales/fr.json +++ b/web-src/src/locales/fr.json @@ -311,14 +311,14 @@ "browse": { "albums": "albums", "show-more": "Afficher plus", - "pistes": "pistes", + "tracks": "pistes", "recently-added": { "albums": "albums", "title": "Ajouts récents" }, "recently-played": { "title": "Lectures récentes", - "pistes": "pistes" + "tracks": "pistes" }, "tabs": { "albums": "Albums", diff --git a/web-src/src/pages/PageAbout.vue b/web-src/src/pages/PageAbout.vue index 6f2acfbb..74b1f032 100644 --- a/web-src/src/pages/PageAbout.vue +++ b/web-src/src/pages/PageAbout.vue @@ -41,28 +41,40 @@ - - - -
    +
    +
    +
    + + +
    -

    +

     | 

    diff --git a/web-src/src/pages/PageGenreTracks.vue b/web-src/src/pages/PageGenreTracks.vue index 0db2dbc1..dcf930a0 100644 --- a/web-src/src/pages/PageGenreTracks.vue +++ b/web-src/src/pages/PageGenreTracks.vue @@ -26,9 +26,7 @@  |  @@ -82,7 +82,7 @@ @click="open_search_artists" v-text=" $t('page.search.show-artists', { - count: artists.total.toLocaleString() + count: artists.total.toLocaleString(i18n.locale) }) " /> @@ -111,7 +111,7 @@ @click="open_search_albums" v-text=" $t('page.search.show-albums', { - count: albums.total.toLocaleString() + count: albums.total.toLocaleString($i18n.locale) }) " /> @@ -140,7 +140,7 @@ @click="open_search_composers" v-text=" $t('page.search.show-composers', { - count: composers.total.toLocaleString() + count: composers.total.toLocaleString($i18n.locale) }) " /> @@ -169,7 +169,7 @@ @click="open_search_playlists" v-text=" $t('page.search.show-playlists', { - count: playlists.total.toLocaleString() + count: playlists.total.toLocaleString($i18n.locale) }) " /> @@ -198,7 +198,7 @@ @click="open_search_podcasts" v-text=" $t('page.search.show-podcasts', { - count: podcasts.total.toLocaleString() + count: podcasts.total.toLocaleString($i18n.locale) }) " /> @@ -228,7 +228,7 @@ @click="open_search_audiobooks" v-text=" $t('page.search.show-audiobooks', { - count: audiobooks.total.toLocaleString() + count: audiobooks.total.toLocaleString($i18n.locale) }) " /> diff --git a/web-src/src/pages/SettingsPageWebinterface.vue b/web-src/src/pages/SettingsPageWebinterface.vue index fe9d2bac..58886d1a 100644 --- a/web-src/src/pages/SettingsPageWebinterface.vue +++ b/web-src/src/pages/SettingsPageWebinterface.vue @@ -194,7 +194,16 @@ export default { }, locale: { get() { - return this.$i18n.locale + let languages = this.$i18n.availableLocales + let locale = languages.find(lang => lang === this.$i18n.locale) + let partial = this.$i18n.locale.split('-')[0] + if (!locale) { + locale = languages.find(lang => lang === partial) + } + if (!locale) { + locale = languages.forEach(lang => lang.split('-')[0] === partial) + } + return locale }, set(locale) { this.$i18n.locale = locale diff --git a/web-src/src/pages/SpotifyPageSearch.vue b/web-src/src/pages/SpotifyPageSearch.vue index 35a0f157..527c4382 100644 --- a/web-src/src/pages/SpotifyPageSearch.vue +++ b/web-src/src/pages/SpotifyPageSearch.vue @@ -79,7 +79,7 @@ @click="open_search_tracks" v-text=" $t('page.spotify.search.show-all-tracks', { - count: tracks.total.toLocaleString() + count: tracks.total.toLocaleString($i18n.locale) }) " /> @@ -133,7 +133,7 @@ @click="open_search_artists" v-text=" $t('page.spotify.search.show-all-artists', { - count: artists.total.toLocaleString() + count: artists.total.toLocaleString($i18n.locale) }) " /> @@ -199,7 +199,7 @@ @click="open_search_albums" v-text=" $t('page.spotify.search.show-all-albums', { - count: albums.total.toLocaleString() + count: albums.total.toLocaleString($i18n.locale) }) " /> @@ -253,7 +253,7 @@ @click="open_search_playlists" v-text=" $t('page.spotify.search.show-all-playlists', { - count: playlists.total.toLocaleString() + count: playlists.total.toLocaleString($i18n.locale) }) " />