diff --git a/package.json b/package.json index 3712369a..c4cc09f0 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "vue": "^v3.5.13", "vue-boring-avatars": "^1.4.0", "vue-debounce": "^3.0.2", + "vue-i18n": "11", "vue-router": "^4.1.3", "vue-template-compiler": "^2.0.0", "vue-virtual-scroller": "^2.0.0-beta.7", diff --git a/src/components/AlbumView/GenreBanner.vue b/src/components/AlbumView/GenreBanner.vue index bdc42957..ea91d7b8 100644 --- a/src/components/AlbumView/GenreBanner.vue +++ b/src/components/AlbumView/GenreBanner.vue @@ -7,7 +7,7 @@ >
- {{ genres.length ? "Genres" : "No genres" }} + {{ genres.length ? t('AlbumView.GenreBanner.GenreExists') : t('AlbumView.GenreBanner.GenreDoesNotExist') }}
- {{ new Date(album.date * 1000).getFullYear() }} {{ !album.is_single ? `• ${album.trackcount} Tracks` : "" }} • + {{ new Date(album.date * 1000).getFullYear() }} {{ !album.is_single ? `• ${album.trackcount} ${$t('AlbumView.TrackCountPlural')}` : "" }} • {{ formatSeconds(album.duration, true) }}
@@ -18,6 +18,7 @@ diff --git a/src/components/ArtistView/HeaderComponents/Info.vue b/src/components/ArtistView/HeaderComponents/Info.vue index 5ccdb8e7..cc4890ee 100644 --- a/src/components/ArtistView/HeaderComponents/Info.vue +++ b/src/components/ArtistView/HeaderComponents/Info.vue @@ -6,16 +6,16 @@ }" >
-
Artist
+
{{ t('ArtistView.Title') }}
{{ artist.name }}
- {{ artist.trackcount.toLocaleString() }} Track{{ `${artist.trackcount == 1 ? '' : 's'} • ` }} + {{ artist.trackcount.toLocaleString() }} {{ `${artist.trackcount == 1 ? t('ArtistView.TrackCount') : t('ArtistView.TrackCountPlural')} • ` }} - {{ artist.albumcount.toLocaleString() }} Album{{ `${artist.albumcount == 1 ? '' : 's'} • ` }} + {{ artist.albumcount.toLocaleString() }} {{ `${artist.albumcount == 1 ? t('ArtistView.AlbumCount') : t('ArtistView.AlbumCountPlural')} • ` }} {{ `${formatSeconds(artist.duration, true)}` }} @@ -32,6 +32,9 @@ import { getTextColor } from '@/utils/colortools/shift' import { Artist } from '@/interfaces' import formatSeconds from '@/utils/useFormatSeconds' import Buttons from './Buttons.vue' +import { useI18n } from "vue-i18n"; + +const { t } = useI18n(); defineProps<{ artist: Artist diff --git a/src/components/ArtistView/TopTracks.vue b/src/components/ArtistView/TopTracks.vue index b716ac6e..8da2b140 100644 --- a/src/components/ArtistView/TopTracks.vue +++ b/src/components/ArtistView/TopTracks.vue @@ -14,7 +14,7 @@ @playThis="playHandler(index)" />
-
No tracks
+
{{ t('ArtistView.NoTracks') }}
@@ -24,6 +24,9 @@ import { Track } from '@/interfaces' import { isMedium, isSmall } from '@/stores/content-width' import SeeAll from '../shared/SeeAll.vue' import SongItem from '../shared/SongItem.vue' +import { useI18n } from "vue-i18n"; + +const { t } = useI18n(); defineProps<{ tracks: Track[] diff --git a/src/components/BottomBar/Left.vue b/src/components/BottomBar/Left.vue index dd0d3ece..e6157f56 100644 --- a/src/components/BottomBar/Left.vue +++ b/src/components/BottomBar/Left.vue @@ -30,14 +30,14 @@ >
- {{ queue.currenttrack?.title || 'Hello there' }} + {{ queue.currenttrack?.title || t('BottomBar.PlaceholderTitle') }}
@@ -55,6 +55,9 @@ import useColorStore from '@/stores/colors' import { isLargerMobile, isMobile } from '@/stores/content-width' import useQStore from '@/stores/queue' import useSettingsStore from '@/stores/settings' +import { useI18n } from "vue-i18n"; + +const { t } = useI18n(); import ExpandSvg from '@/assets/icons/expand.svg' import ArtistName from '@/components/shared/ArtistName.vue' diff --git a/src/components/BottomBar/Right.vue b/src/components/BottomBar/Right.vue index 72f8f310..41d74375 100644 --- a/src/components/BottomBar/Right.vue +++ b/src/components/BottomBar/Right.vue @@ -5,7 +5,7 @@