fix(i18n): use t('artists.albumCount') in ArtistCardLocal

The album count on local artist cards was rendered with hardcoded German
("Album"/"Alben"). Switched to the existing plural-aware i18n key which
covers all 8 locales (including Russian Slavic plurals).

Co-Authored-By: cucadmuh <cucadmuh@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Psychotoxical
2026-04-18 23:35:01 +02:00
parent cef2db92cb
commit 4ff4ea0df0
+3 -1
View File
@@ -2,6 +2,7 @@ import React, { useMemo } from 'react';
import { SubsonicArtist, buildCoverArtUrl, coverArtCacheKey } from '../api/subsonic'; import { SubsonicArtist, buildCoverArtUrl, coverArtCacheKey } from '../api/subsonic';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
import { Users } from 'lucide-react'; import { Users } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import CachedImage from './CachedImage'; import CachedImage from './CachedImage';
interface Props { interface Props {
@@ -9,6 +10,7 @@ interface Props {
} }
export default function ArtistCardLocal({ artist }: Props) { export default function ArtistCardLocal({ artist }: Props) {
const { t } = useTranslation();
const navigate = useNavigate(); const navigate = useNavigate();
const coverId = artist.coverArt || artist.id; const coverId = artist.coverArt || artist.id;
// buildCoverArtUrl generates a new crypto salt on every call — must be // buildCoverArtUrl generates a new crypto salt on every call — must be
@@ -38,7 +40,7 @@ export default function ArtistCardLocal({ artist }: Props) {
<span className="artist-card-name">{artist.name}</span> <span className="artist-card-name">{artist.name}</span>
{typeof artist.albumCount === 'number' && ( {typeof artist.albumCount === 'number' && (
<span className="artist-card-meta"> <span className="artist-card-meta">
{artist.albumCount} {artist.albumCount === 1 ? 'Album' : 'Alben'} {t('artists.albumCount', { count: artist.albumCount })}
</span> </span>
)} )}
</div> </div>