chore: a brand pass, one wording for the same thing

- the provider settings are named where they are (Admin → Providers), not 'the server settings'
- EN: deleting duplicates says delete, 'song' everywhere, 'at least once' for the forgotten songs, 'email', 'photos' for artist pictures, singular and plural for the history months
- IT: impersonal like the rest of the text, 'niente' not 'nulla', 'mandato' for what is sent to Lidarr, 'playlist smart', 'importazione'
- type: nothing under 13px, the federation pages use the scale, dialog titles are bold like every heading
- no shadow on the update notice
- web manifest colours are the ones of the current theme
- README: 'turned on', 'email'
This commit is contained in:
tgiachi 2026-11-15 17:09:37 +01:00
commit 32dd307535
20 changed files with 95 additions and 88 deletions

View file

@ -7,8 +7,8 @@
"scope": "/",
"display": "standalone",
"orientation": "any",
"background_color": "#041d3a",
"theme_color": "#041d3a",
"background_color": "#08161d",
"theme_color": "#08161d",
"icons": [
{
"src": "/icon-192.png",

View file

@ -22,5 +22,5 @@ export function ExternalLink({ href, children }: { href: string; children: React
/** The credit that has to be shown wherever provider data is shown (a text, a picture, tags). */
export default function Attribution({ children }: { children: ReactNode }) {
return <p className="text-xs text-muted-foreground">{children}</p>
return <p className="text-[13px] text-muted-foreground">{children}</p>
}

View file

@ -65,7 +65,7 @@ test.each([
})
test.each([
['disabled', 'Lidarr is off. An admin can turn it on in the server settings.'],
['disabled', 'Lidarr is off. An admin can turn it on in Admin → Providers.'],
['not_configured', 'Lidarr has no address or key yet.'],
['no_id', 'This artist has no MusicBrainz id, so Lidarr cannot be asked.'],
])('when Lidarr cannot be asked (%s) it says why and offers no button', async (status, text) => {
@ -125,7 +125,7 @@ test('an artist Lidarr already had is not an error', async () => {
test.each([
[409, 'lidarr_disabled', 'x', 'Lidarr is off.'],
[409, 'lidarr_not_configured', 'x', 'Lidarr is not set up yet: choose its profiles and root folder in the server settings.'],
[409, 'lidarr_not_configured', 'x', 'Lidarr is not set up yet: choose its profiles and root folder in Admin → Providers.'],
[422, 'no_musicbrainz_id', 'x', 'This artist has no MusicBrainz id.'],
[422, 'lidarr_unknown_artist', 'x', 'Lidarr does not know this artist.'],
[422, 'lidarr_rejected', 'Path is not writable', 'Lidarr refused the artist: Path is not writable'],

View file

@ -120,7 +120,7 @@ function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
<DialogPrimitive.Title
data-slot="dialog-title"
className={cn(
"font-heading text-base leading-none font-medium",
"font-heading text-lg leading-tight font-bold",
className
)}
{...props}

View file

@ -70,7 +70,7 @@
"friendNote": "The audio passes through your server. {{name}} does not see who listens."
},
"mastodon": {
"intro": "Share what you listen to on your own Mastodon account. Each track that counts as a listen is posted as an unlisted status: title, artists and album, with #NowPlaying and no link. Music of a friend is never posted, and at most one post goes out a minute. Nothing is posted until you connect an account.",
"intro": "Share what you listen to on your own Mastodon account. Each song that counts as a listen is posted as an unlisted status: title, artists and album, with #NowPlaying and no link. Music of a friend is never posted, and at most one post goes out a minute. Nothing is posted until you connect an account.",
"instance": "Instance",
"instancePlaceholder": "mastodon.social",
"token": "Access token",
@ -80,7 +80,7 @@
"refused": "Mastodon no longer accepts the token for {{handle}}, so nothing is posted. Make a new token as described below and paste it here.",
"connectAgain": "Connect again",
"connected": "Your listens are posted to {{handle}}.",
"connectedHelp": "Each track that counts as a listen is posted as an unlisted status with #NowPlaying. Music of a friend is never posted.",
"connectedHelp": "Each song that counts as a listen is posted as an unlisted status with #NowPlaying. Music of a friend is never posted.",
"disconnect": "Disconnect"
},
"settings": {
@ -177,8 +177,8 @@
"sendsArchive": "The release group id of every album with no picture in your files goes to the Cover Art Archive, one after the other."
},
"artistImages": {
"title": "Artist pictures",
"what": "Looks for a free picture of every artist that has a MusicBrainz id and no answer that is still good.",
"title": "Artist photos",
"what": "Looks for a free photo of every artist that has a MusicBrainz id and no answer that is still good.",
"sends": "The MusicBrainz id of every artist goes to MusicBrainz, Wikidata and Wikimedia Commons, one after the other."
},
"descriptions": {
@ -228,7 +228,7 @@
"summary_one": "{{count}} song is in more than one file. Keeping the chosen copies frees {{size}}.",
"summary_other": "{{count}} songs are in more than one file. Keeping the chosen copies frees {{size}}.",
"partial": "Showing {{shown}} of {{total}} groups.",
"cleanAll": "Clean all suggestions",
"cleanAll": "Delete all the extra copies",
"keep": "Keep",
"album": "Album",
"format": "Format",
@ -245,8 +245,8 @@
"different": "Read by the check: the files differ",
"notCompared": "Not compared yet",
"confirmOneTitle": "Delete the other copies?",
"confirmAllTitle_one": "Clean {{count}} song?",
"confirmAllTitle_other": "Clean {{count}} songs?",
"confirmAllTitle_one": "Delete the extra copies of {{count}} song?",
"confirmAllTitle_other": "Delete the extra copies of {{count}} songs?",
"confirmBody": "These files are deleted from your music folder and cannot be brought back. It frees {{size}}. The plays of a deleted copy move to the copy that stays.",
"confirmList": "Files",
"willKeep": "Keep:",
@ -292,7 +292,7 @@
"save": "Save",
"contact": "Contact",
"saveContactOne": "Save contact for {{name}}",
"contactHint": "A web address or an e-mail address, sent to the provider in the User-Agent. Empty uses the project address.",
"contactHint": "A web address or an email address, sent to the provider in the User-Agent. Empty uses the project address.",
"address": "Address",
"saveAddressOne": "Save address for {{name}}",
"addressHint": "Where your own {{name}} is, like http://lidarr.lan:8686. Clearing the address turns {{name}} off.",
@ -335,7 +335,7 @@
"invalid_input": "That key is not valid. A {{name}} key is 32 hexadecimal characters."
},
"contactErrors": {
"invalid_input": "Check the contact: a web address or an e-mail address, without parentheses."
"invalid_input": "Check the contact: a web address or an email address, without parentheses."
},
"addressErrors": {
"invalid_input": "Check the address: it starts with http:// or https://, with no user, password, query or fragment."
@ -443,7 +443,7 @@
"remove": "Remove",
"removeOne": "Remove {{name}}",
"removeTitle": "Remove {{name}}?",
"removeBody": "Sonda stops listing this library. Tracks and listening history stay, and the music on disk is never touched.",
"removeBody": "Sonda stops listing this library. Songs and listening history stay, and the music on disk is never touched.",
"removeConfirm": "Remove library",
"errors": {
"invalid_input": "The folder must be an existing directory on the server, not the root, and not inside or around another library.",
@ -566,7 +566,7 @@
"inLidarrNotMonitored": "In Lidarr, not monitored",
"sent": "Sent to Lidarr.",
"alreadyThere": "Lidarr already has this artist.",
"disabled": "Lidarr is off. An admin can turn it on in the server settings.",
"disabled": "Lidarr is off. An admin can turn it on in Admin → Providers.",
"notConfigured": "Lidarr has no address or key yet.",
"noId": "This artist has no MusicBrainz id, so Lidarr cannot be asked.",
"error": "Lidarr could not be asked right now.",
@ -576,7 +576,7 @@
"send": "Send to Lidarr",
"errors": {
"lidarr_disabled": "Lidarr is off.",
"lidarr_not_configured": "Lidarr is not set up yet: choose its profiles and root folder in the server settings.",
"lidarr_not_configured": "Lidarr is not set up yet: choose its profiles and root folder in Admin → Providers.",
"no_musicbrainz_id": "This artist has no MusicBrainz id.",
"lidarr_unknown_artist": "Lidarr does not know this artist.",
"lidarr_rejected": "Lidarr refused the artist: {{reason}}",
@ -712,7 +712,7 @@
"label": "Search your library",
"placeholder": "Artists, albums and songs",
"hint": "Type to search artists, albums and songs.",
"nothingFound": "Nothing found for “{{q}}”."
"nothingFound": "Nothing matches “{{q}}”."
},
"provider": {
"wikipedia": "Wikipedia",
@ -731,7 +731,7 @@
"noMatch": "Nothing matches “{{q}}”.",
"nothingFound": "Nothing was found.",
"nothingOfArtist": "Nothing of this artist is in your library.",
"providerDisabled": "Turn on {{provider}} in the server settings to see this.",
"providerDisabled": "Turn on {{provider}} in Admin → Providers to see this.",
"providerError": "{{provider}} could not be reached. Try again later.",
"noId": "This artist has no MusicBrainz id, so Sonda cannot look it up.",
"stale": "This may be out of date: the provider could not be reached."
@ -786,7 +786,7 @@
"error": {
"invalid_credentials": "Wrong email or password.",
"registration_closed": "An account already exists. Ask an admin to create yours.",
"email_taken": "That email is already registered.",
"email_taken": "That email address is already used.",
"invalid_input": "Check what you typed and try again.",
"unauthorized": "Your session has ended. Sign in again.",
"network": "Cannot reach the server. Check your connection and try again.",
@ -800,7 +800,7 @@
"import_running": "An import of yours is still running. Wait for it to end.",
"unknown": "Something went wrong. Try again.",
"playlist_not_found": "This playlist does not exist.",
"limit_reached": "Limit reached: a user can have 1000 playlists, and a playlist up to 10000 songs.",
"limit_reached": "Limit reached: you can have 1000 playlists, and a playlist up to 10000 songs.",
"track_not_found": "This song no longer exists.",
"invalid_position": "That place no longer exists. Reload the playlist.",
"mix_not_found": "This mix is not available now.",
@ -861,7 +861,8 @@
"history": {
"years": "Years",
"months": "Months of {{year}}",
"monthButton": "{{month}}: {{count}} plays",
"monthButton_one": "{{month}}: {{count}} listen",
"monthButton_other": "{{month}}: {{count}} listens",
"plays_one": "{{count}} listen",
"plays_other": "{{count}} listens",
"none": "You have no listens yet. What you play here, and what you import from Spotify, will be listed by year and month.",
@ -951,14 +952,14 @@
},
"forgotten": {
"name": "Not heard in a while",
"description": "Songs you played once, but not in the last 90 days."
"description": "Songs you have played at least once, but not in the last 90 days."
},
"high-quality": {
"name": "High quality",
"description": "Files of 900 kbps or more."
},
"long-tracks": {
"name": "Long tracks",
"name": "Long songs",
"description": "Songs of 6 minutes or more."
}
},

View file

@ -76,7 +76,7 @@
"token": "Token di accesso",
"tokenHelp": "Nella tua istanza apri Preferenze, Sviluppo, Nuova applicazione, e dalle solo il permesso write:statuses. Incolla qui il suo token di accesso. Il server lo tiene e non lo mostra più.",
"connect": "Collega",
"connecting": "Collego…",
"connecting": "Collegamento…",
"refused": "Mastodon non accetta più il token di {{handle}}, quindi non si pubblica niente. Crea un nuovo token come descritto sotto e incollalo qui.",
"connectAgain": "Collega di nuovo",
"connected": "I tuoi ascolti vengono pubblicati su {{handle}}.",
@ -177,8 +177,8 @@
"sendsArchive": "L'id del release group di ogni album senza immagine nei tuoi file va al Cover Art Archive, uno dopo l'altro."
},
"artistImages": {
"title": "Immagini degli artisti",
"what": "Cerca un'immagine libera per ogni artista che ha un id MusicBrainz e nessuna risposta ancora valida.",
"title": "Foto degli artisti",
"what": "Cerca una foto libera per ogni artista che ha un id MusicBrainz e nessuna risposta ancora valida.",
"sends": "L'id MusicBrainz di ogni artista va a MusicBrainz, Wikidata e Wikimedia Commons, uno dopo l'altro."
},
"descriptions": {
@ -227,7 +227,7 @@
"none": "Nessun brano sta in più di un file.",
"summary_one": "{{count}} brano sta in più di un file. Tenendo le copie scelte si liberano {{size}}.",
"summary_other": "{{count}} brani stanno in più di un file. Tenendo le copie scelte si liberano {{size}}.",
"partial": "Mostro {{shown}} gruppi su {{total}}.",
"partial": "Mostrati {{shown}} gruppi su {{total}}.",
"cleanAll": "Elimina tutte le copie in più",
"keep": "Tieni",
"album": "Album",
@ -453,7 +453,7 @@
"shared": "Condivisa con gli amici",
"notShared": "Non condivisa con gli amici",
"shareTitle": "Condividere {{name}} con gli amici?",
"shareBody": "Gli ascoltatori dei server dei tuoi amici potranno sfogliare questa libreria, riprodurla e, in pratica, copiarne i file. Non viene inviato nulla finché il server di un amico non lo chiede, e puoi smettere di condividere quando vuoi.",
"shareBody": "Gli ascoltatori dei server dei tuoi amici potranno sfogliare questa libreria, riprodurla e, in pratica, copiarne i file. Non viene inviato niente finché il server di un amico non lo chiede, e puoi smettere di condividere quando vuoi.",
"shareConfirm": "Condividi"
},
"scan": {
@ -532,7 +532,7 @@
"invalid_input": "Controlla il nome e l'indirizzo: l'indirizzo comincia con https:// (http:// solo sulla tua rete), senza utente, query o frammento.",
"invalid_invite": "Questo non è un invito di un server Sonda.",
"invite_refused": "Quel server ha rifiutato l'invito: forse è già stato usato, è scaduto, oppure lì la federazione è disattivata.",
"key_mismatch": "La chiave di quel server non è quella dell'invito. Non è stato aggiunto nulla.",
"key_mismatch": "La chiave di quel server non è quella dell'invito. Non è stato aggiunto niente.",
"friend_unreachable": "Quel server non ha risposto come un server Sonda.",
"already_friends": "Quel server è già un amico.",
"too_many_requests": "Troppi tentativi. Riprova tra un minuto.",
@ -551,7 +551,7 @@
"saveLimits": "Salva i limiti",
"requests": "Richieste recenti",
"requestsHint": "Le ultime richieste degli amici, tenute per 7 giorni. Si tiene solo il percorso, mai ciò che è stato cercato.",
"noRequests": "Nessun amico ha ancora chiesto nulla.",
"noRequests": "Nessun amico ha ancora chiesto niente.",
"when": "Quando",
"friendCol": "Amico",
"route": "Percorso",
@ -566,7 +566,7 @@
"inLidarrNotMonitored": "In Lidarr, non monitorato",
"sent": "Mandato a Lidarr.",
"alreadyThere": "Lidarr ha già questo artista.",
"disabled": "Lidarr è disattivato. Un admin può attivarlo nelle impostazioni del server.",
"disabled": "Lidarr è disattivato. Un admin può attivarlo in Admin → Provider.",
"notConfigured": "Lidarr non ha ancora indirizzo o chiave.",
"noId": "Questo artista non ha un id MusicBrainz, quindi non si può chiedere a Lidarr.",
"error": "Ora non si riesce a interrogare Lidarr.",
@ -576,7 +576,7 @@
"send": "Manda a Lidarr",
"errors": {
"lidarr_disabled": "Lidarr è disattivato.",
"lidarr_not_configured": "Lidarr non è ancora configurato: scegli profili e cartella radice nelle impostazioni del server.",
"lidarr_not_configured": "Lidarr non è ancora configurato: scegli profili e cartella radice in Admin → Provider.",
"no_musicbrainz_id": "Questo artista non ha un id MusicBrainz.",
"lidarr_unknown_artist": "Lidarr non conosce questo artista.",
"lidarr_rejected": "Lidarr ha rifiutato l'artista: {{reason}}",
@ -671,7 +671,7 @@
},
"friends": {
"title": "Amici",
"intro": "Musica che l'admin di un altro server Sonda condivide con questo. Viene chiesta al suo server quando apri una pagina, e qui non si copia nulla.",
"intro": "Musica che l'admin di un altro server Sonda condivide con questo. Viene chiesta al suo server quando apri una pagina, e qui non si copia niente.",
"noneYet": "Non hai ancora amici. Un admin li aggiunge in Admin → Federazione.",
"musicOf": "Musica di {{name}}",
"whose": "Questa musica la condivide il server di {{name}}. Viene chiesta quando apri una pagina e qui non viene mai copiata.",
@ -690,11 +690,11 @@
"albumsOf": "Album di {{name}}",
"songsOf": "Brani di {{name}}",
"showAll": "Mostra tutto",
"nothing": "{{name}} non ha ancora condiviso nulla.",
"nothing": "{{name}} non ha ancora condiviso niente.",
"errors": {
"friend_unreachable": "{{name}} non è raggiungibile. Riprova più tardi.",
"friend_gone": "{{name}} non considera più questo server un amico. Un admin può dirti di più.",
"friend_busy": "{{name}} è occupato. Riprova tra un momento.",
"friend_busy": "{{name}} è occupato. Riprova tra poco.",
"friend_not_found": "Questo amico non c'è più."
}
},
@ -712,7 +712,7 @@
"label": "Cerca nella libreria",
"placeholder": "Artisti, album e brani",
"hint": "Scrivi per cercare artisti, album e brani.",
"nothingFound": "Non ho trovato niente per «{{q}}»."
"nothingFound": "Nessun risultato per «{{q}}»."
},
"provider": {
"wikipedia": "Wikipedia",
@ -731,7 +731,7 @@
"noMatch": "Nessun risultato per «{{q}}».",
"nothingFound": "Non è stato trovato niente.",
"nothingOfArtist": "Di questo artista non c'è niente nella tua libreria.",
"providerDisabled": "Attiva {{provider}} nelle impostazioni del server per vederlo.",
"providerDisabled": "Attiva {{provider}} in Admin → Provider per vederlo.",
"providerError": "{{provider}} non risponde. Riprova più tardi.",
"noId": "Questo artista non ha un id MusicBrainz, quindi Sonda non può cercarlo.",
"stale": "Potrebbe non essere aggiornato: il provider non ha risposto."
@ -786,21 +786,21 @@
"error": {
"invalid_credentials": "Email o password sbagliate.",
"registration_closed": "Esiste già un account. Chiedi a un admin di creare il tuo.",
"email_taken": "Questa email è già registrata.",
"email_taken": "Questo indirizzo email è già usato.",
"invalid_input": "Controlla quello che hai scritto e riprova.",
"unauthorized": "La sessione è terminata. Accedi di nuovo.",
"network": "Il server non risponde. Controlla la connessione e riprova.",
"invalid_instance": "L'istanza deve essere un nome di dominio, come mastodon.social.",
"invalid_token": "Il token è vuoto o troppo lungo.",
"mastodon_refused": "L'istanza ha rifiutato il token. Controlla che abbia il permesso write:statuses.",
"mastodon_unreachable": "Non riesco a raggiungere quell'istanza. Controlla l'indirizzo e riprova.",
"mastodon_unreachable": "Quell'istanza non è raggiungibile. Controlla l'indirizzo e riprova.",
"no_spotify_data": "Questi file non contengono una cronologia di streaming né playlist di Spotify. Scegli lo zip che Spotify ti ha mandato, oppure i file che si chiamano Streaming_History_Audio… e Playlist….",
"unreadable_file": "Uno dei file è danneggiato o tagliato. Scarica di nuovo i tuoi dati da Spotify.",
"too_large": "Questi file sono troppo grandi da importare (il limite è 512 MB). Scegli solo i file che si chiamano Streaming_History_Audio… e Playlist….",
"import_running": "Un tuo import è ancora in corso. Aspetta che finisca.",
"import_running": "Una tua importazione è ancora in corso. Aspetta che finisca.",
"unknown": "Qualcosa è andato storto. Riprova.",
"playlist_not_found": "Questa playlist non esiste.",
"limit_reached": "Limite raggiunto: un utente può avere 1000 playlist e una playlist fino a 10000 brani.",
"limit_reached": "Limite raggiunto: puoi avere 1000 playlist, e una playlist fino a 10000 brani.",
"track_not_found": "Questo brano non esiste più.",
"invalid_position": "Quella posizione non esiste più. Ricarica la playlist.",
"mix_not_found": "Questo mix ora non è disponibile.",
@ -810,7 +810,7 @@
"smart_playlist_empty": "Con queste regole non ci sono brani da salvare."
},
"spotify": {
"intro": "Porta qui la cronologia di ascolto e le playlist di Spotify, così i tuoi mix, Discover e le smart playlist sanno cosa ascoltavi prima. Chiedi a Spotify i tuoi dati (Account, Privacy, «Cronologia di streaming estesa» e «Dati dell'account»), poi scegli lo zip che ti manda, oppure i file JSON che contiene.",
"intro": "Porta qui la cronologia di ascolto e le playlist di Spotify, così i tuoi mix, Discover e le playlist smart sanno cosa ascoltavi prima. Chiedi a Spotify i tuoi dati (Account, Privacy, «Cronologia di streaming estesa» e «Dati dell'account»), poi scegli lo zip che ti manda, oppure i file JSON che contiene.",
"privacy": "Tutto viene letto sul tuo server. Non viene inviato niente a nessuno e i file non vengono conservati. I brani si abbinano alla tua libreria per artista e titolo. Degli ascolti dei brani che non hai si conservano solo artista e orario, per imparare cosa ascolti insieme.",
"files": "File di Spotify",
"chosen_one": "{{count}} file scelto",
@ -846,22 +846,23 @@
"missingMore": "e altri {{count}}"
},
"requests": {
"intro": "Gli artisti che hai inviato a Lidarr da Sonda. Lidarr cerca la musica e la scarica coi suoi tempi: un artista resta in attesa finché la sua musica non è nella tua libreria.",
"intro": "Gli artisti che hai mandato a Lidarr da Sonda. Lidarr cerca la musica e la scarica coi suoi tempi: un artista resta in attesa finché la sua musica non è nella tua libreria.",
"filter": "Mostra",
"filterAll_one": "Tutti ({{count}})",
"filterAll_other": "Tutti ({{count}})",
"filterWaiting": "In attesa ({{count}})",
"filterArrived": "Arrivati ({{count}})",
"sent": "Inviato il {{when}}",
"sent": "Mandato il {{when}}",
"waiting": "In attesa della musica",
"arrived": "Musica in libreria dal {{when}}",
"none": "Non hai ancora inviato nessun artista a Lidarr. Fallo dalla pagina di un artista che non hai.",
"none": "Non hai ancora mandato nessun artista a Lidarr. Fallo dalla pagina di un artista che non hai.",
"noneFiltered": "Nessun artista qui."
},
"history": {
"years": "Anni",
"months": "Mesi del {{year}}",
"monthButton": "{{month}}: {{count}} ascolti",
"monthButton_one": "{{month}}: {{count}} ascolto",
"monthButton_other": "{{month}}: {{count}} ascolti",
"plays_one": "{{count}} ascolto",
"plays_other": "{{count}} ascolti",
"none": "Non hai ancora ascolti. Quello che ascolti qui, e quello che importi da Spotify, sarà elencato per anno e mese.",
@ -871,7 +872,7 @@
"import": {
"spotify": "Spotify",
"past": "Importazioni passate",
"none": "Nessuna importazione, per ora. Quando porti qui un export di Spotify, cosa ha fatto resta salvato qui."
"none": "Nessuna importazione, per ora. Quando porti qui i tuoi dati di Spotify, cosa ha fatto resta salvato qui."
},
"playlists": {
"empty": "Non hai ancora nessuna playlist. Creane una qui sotto, oppure metti un brano in una nuova con il pulsante accanto al brano.",

View file

@ -63,7 +63,7 @@ export function Similar({ artistId }: { artistId: number }) {
className="flex min-h-11 items-center gap-2 rounded-md bg-secondary px-4 font-semibold hover:bg-accent"
>
{item.artist.name}
{item.in_library && <span className="text-xs font-normal text-primary">{t('artist.inLibrary')}</span>}
{item.in_library && <span className="text-[13px] font-normal text-primary">{t('artist.inLibrary')}</span>}
</Link>
</li>
))}

View file

@ -84,16 +84,21 @@ test('it opens on the latest month, with a button for each year and its listens
test('the months of the year are buttons, and one with no listens is off', async () => {
setup()
const group = await screen.findByRole('group', { name: 'Months of 2026' })
expect(within(group).getByRole('button', { name: 'Mar: 5 plays' })).toHaveAttribute('aria-pressed', 'true')
expect(within(group).getByRole('button', { name: 'Feb: 0 plays' })).toBeDisabled()
expect(within(group).getByRole('button', { name: 'Mar: 5 listens' })).toHaveAttribute('aria-pressed', 'true')
expect(within(group).getByRole('button', { name: 'Feb: 0 listens' })).toBeDisabled()
expect(within(group).getAllByRole('button')).toHaveLength(12)
})
test('a month with one listen says listen, not listens', async () => {
setup({ 'GET /api/v1/listens/months': () => ({ months: [{ year: 2026, month: 3, plays: 1 }] }) })
expect(await screen.findByRole('button', { name: 'Mar: 1 listen' })).toBeInTheDocument()
})
test('choosing a month or a year changes the address and reads its listens', async () => {
const { calls } = setup({
'GET /api/v1/listens': ({ url }) => (url.searchParams.get('from') === new Date(2026, 0, 1).toISOString() ? page([listen(9, '2026-01-15T12:00:00Z', 'Nancy Boy', [[5, 'Placebo']])]) : page(march)),
})
await userEvent.click(await screen.findByRole('button', { name: 'Jan: 2 plays' }))
await userEvent.click(await screen.findByRole('button', { name: 'Jan: 2 listens' }))
expect(screen.getByTestId('where')).toHaveTextContent('/history?year=2026&month=1')
expect(await screen.findByText('Nancy Boy')).toBeInTheDocument()
expect(calls.filter((c) => c.key === 'GET /api/v1/listens')).toHaveLength(2)

View file

@ -140,7 +140,7 @@ export default function HistoryPage() {
found ? 'hover:border-primary' : 'opacity-40',
)}
>
<span aria-hidden="true" className="text-xs tabular-nums text-muted-foreground">
<span aria-hidden="true" className="text-[13px] tabular-nums text-muted-foreground">
{plays}
</span>
<span aria-hidden="true" className="w-full rounded-sm bg-primary" style={{ height: `${Math.max(plays > 0 ? 4 : 0, (plays / biggest) * 56)}px` }} />

View file

@ -164,7 +164,7 @@ test('when nothing matches it says so', async () => {
}))
renderSearch()
await userEvent.type(box(), 'zzz')
expect(await screen.findByText('Nothing found for “zzz”.')).toBeInTheDocument()
expect(await screen.findByText('Nothing matches “zzz”.')).toBeInTheDocument()
})
test('a group with no results is left out', async () => {

View file

@ -83,7 +83,7 @@ test('with no duplicates the page says so', async () => {
mockFetch(routes({}, []))
renderPage()
expect(await screen.findByText('No song is in more than one file.')).toBeInTheDocument()
expect(screen.queryByRole('button', { name: 'Clean all suggestions' })).not.toBeInTheDocument()
expect(screen.queryByRole('button', { name: 'Delete all the extra copies' })).not.toBeInTheDocument()
})
test('with deleting off everything is visible and the delete buttons are disabled, with the reason', async () => {
@ -92,7 +92,7 @@ test('with deleting off everything is visible and the delete buttons are disable
const group = await screen.findByRole('region', { name: 'Airbag' })
expect(screen.getByText(/Deleting is turned off on this server/)).toBeInTheDocument()
expect(within(group).getByRole('button', { name: 'Delete the other copies of Airbag' })).toBeDisabled()
expect(screen.getByRole('button', { name: 'Clean all suggestions' })).toBeDisabled()
expect(screen.getByRole('button', { name: 'Delete all the extra copies' })).toBeDisabled()
})
test('the copy to keep can be changed, and what is deleted follows', async () => {
@ -123,16 +123,16 @@ test('deleting asks first, and Cancel sends nothing', async () => {
expect(calls.filter((c) => c.key === 'POST /api/v1/library/duplicates/clean')).toHaveLength(0)
})
test('Clean all suggestions lists everything and the space freed, then removes group after group', async () => {
test('Delete all the extra copies lists everything and the space freed, then removes group after group', async () => {
const { calls } = mockFetch(
routes({ 'POST /api/v1/library/duplicates/clean': () => ({ removed: 1, freed_bytes: 1_000_000 }) }),
)
renderPage()
await screen.findByRole('region', { name: 'Airbag' })
expect(screen.getByText(/2 songs are in more than one file. Keeping the chosen copies frees 13.4 MB./)).toBeInTheDocument()
await userEvent.click(screen.getByRole('button', { name: 'Clean all suggestions' }))
await userEvent.click(screen.getByRole('button', { name: 'Delete all the extra copies' }))
const dialog = await screen.findByRole('dialog')
expect(within(dialog).getByText('Clean 2 songs?')).toBeInTheDocument()
expect(within(dialog).getByText('Delete the extra copies of 2 songs?')).toBeInTheDocument()
expect(within(dialog).getByText(/It frees 13.4 MB/)).toBeInTheDocument()
const list = within(dialog).getByRole('list', { name: 'Files' })
expect(within(list).getByText('Airbag')).toBeInTheDocument()
@ -155,7 +155,7 @@ test('when a file is not what the last scan saw, it says so, and keeps what was
)
renderPage()
await screen.findByRole('region', { name: 'Airbag' })
await userEvent.click(screen.getByRole('button', { name: 'Clean all suggestions' }))
await userEvent.click(screen.getByRole('button', { name: 'Delete all the extra copies' }))
await userEvent.click(within(await screen.findByRole('dialog')).getByRole('button', { name: 'Delete files' }))
expect(await screen.findByRole('alert')).toHaveTextContent('A file is not what the last scan saw. Scan the library again, then try again.')
expect(screen.getByText('1 file deleted, 4.8 MB freed.')).toBeInTheDocument()

View file

@ -4,7 +4,7 @@ import type { ReactNode } from 'react'
export default function FederationBlock({ title, children }: { title: string; children: ReactNode }) {
return (
<section aria-label={title} className="flex flex-col gap-5 border-t border-border pt-10">
<h2 className="text-[28px] leading-none font-extrabold tracking-tight">{title}</h2>
<h2 className="text-3xl leading-none font-extrabold tracking-tight">{title}</h2>
{children}
</section>
)

View file

@ -28,7 +28,7 @@ export default function FederationFriends({ friends }: { friends: FederationFrie
<li key={friend.id} className="flex flex-wrap items-center justify-between gap-3 border-b border-border py-4">
<div className="flex min-w-0 flex-col gap-1">
<span className="flex flex-wrap items-center gap-3">
<span className="text-[22px] font-bold">{friend.name}</span>
<span className="text-xl font-bold">{friend.name}</span>
<span className="rounded-full border border-friend px-3 text-[13px] font-semibold text-friend">
{t(`admin.federation.state.${friend.state}`)}
</span>

View file

@ -29,7 +29,7 @@ export default function FederationPage() {
<section aria-label={label} className="flex max-w-[920px] flex-col gap-10">
<div className="flex flex-col gap-5">
<h2 className="text-4xl leading-none font-extrabold tracking-tight">{label}</h2>
<p className="max-w-[680px] text-[17px] text-pretty">{t('admin.federation.intro')}</p>
<p className="max-w-[680px] text-lg text-pretty">{t('admin.federation.intro')}</p>
{federation.isError ? (
<ErrorMessage error={federation.error} onRetry={() => void federation.refetch()} />
) : federation.isPending ? (
@ -43,7 +43,7 @@ export default function FederationPage() {
disabled={update.isPending}
onClick={() => (federation.data.enabled ? update.mutate({ enabled: false }) : setAsking(true))}
/>
<span className="text-[17px] font-bold">{t(federation.data.enabled ? 'admin.federation.on' : 'admin.federation.off')}</span>
<span className="text-lg font-bold">{t(federation.data.enabled ? 'admin.federation.on' : 'admin.federation.off')}</span>
</div>
<p className="max-w-[680px] text-muted-foreground text-pretty">{federation.data.sends}</p>
{update.isError && (

View file

@ -9,7 +9,7 @@ import { apiError, mockFetch, type MockRoutes, type RecordedCall } from '@/test/
import JobCard from './JobCard'
const PATH = { covers: '/api/v1/library/covers', 'artist-images': '/api/v1/library/artist-images', descriptions: '/api/v1/library/descriptions' }
const TITLE = { covers: 'Album covers', 'artist-images': 'Artist pictures', descriptions: 'Artist descriptions' }
const TITLE = { covers: 'Album covers', 'artist-images': 'Artist photos', descriptions: 'Artist descriptions' }
const started = () => new Response(JSON.stringify({ status: 'started' }), { status: 202, headers: { 'Content-Type': 'application/json' } })
const none = () => new Response(null, { status: 204 })
@ -70,7 +70,7 @@ test.each([
test('while the providers are not known yet nothing blocks the job', async () => {
mockFetch(routes('artist-images', { running: false }))
renderCard('artist-images', {})
expect(within(await card('artist-images')).getByRole('button', { name: 'Start Artist pictures' })).toBeEnabled()
expect(within(await card('artist-images')).getByRole('button', { name: 'Start Artist photos' })).toBeEnabled()
})
// --- starting ----------------------------------------------------------------------------------
@ -79,9 +79,9 @@ test('starting asks first, says it goes through the whole library, and sends not
const all = mockFetch(routes('artist-images', { running: false }, { [`POST ${PATH['artist-images']}`]: started })).calls
renderCard('artist-images')
const c = await card('artist-images')
await userEvent.click(within(c).getByRole('button', { name: 'Start Artist pictures' }))
await userEvent.click(within(c).getByRole('button', { name: 'Start Artist photos' }))
const dialog = await screen.findByRole('dialog')
expect(dialog).toHaveTextContent('Start Artist pictures?')
expect(dialog).toHaveTextContent('Start Artist photos?')
expect(dialog).toHaveTextContent('This goes through the whole library.')
expect(dialog).toHaveTextContent('The MusicBrainz id of every artist goes to MusicBrainz, Wikidata and Wikimedia Commons')
expect(calls(all, `POST ${PATH['artist-images']}`)).toHaveLength(0)
@ -141,8 +141,8 @@ test('while it runs the card shows how far it is, cannot be started again, and c
expect(bar).toHaveAttribute('aria-valuenow', '30')
expect(bar).toHaveAttribute('aria-valuemax', '120')
expect(c).toHaveTextContent('30 of 120')
expect(within(c).getByRole('button', { name: 'Start Artist pictures' })).toBeDisabled()
await userEvent.click(within(c).getByRole('button', { name: 'Stop Artist pictures' }))
expect(within(c).getByRole('button', { name: 'Start Artist photos' })).toBeDisabled()
await userEvent.click(within(c).getByRole('button', { name: 'Stop Artist photos' }))
await waitFor(() => expect(calls(all, `DELETE ${PATH['artist-images']}`)).toHaveLength(1))
})

View file

@ -49,14 +49,14 @@ test('it says what the jobs are and shows the three of them', async () => {
renderPage()
expect(await screen.findByText(/These jobs go through the whole library in the background/)).toBeInTheDocument()
const names = (await screen.findAllByRole('heading', { level: 3 })).map((h) => h.textContent)
expect(names).toEqual(['Album covers', 'Artist pictures', 'Artist descriptions'])
expect(names).toEqual(['Album covers', 'Artist photos', 'Artist descriptions'])
})
test('a provider that is off blocks the jobs that need it, read from the server', async () => {
mockFetch(routes({ musicbrainz: true, commons: false, wikipedia: true, coverartarchive: false }))
renderPage()
const pictures = await screen.findByRole('region', { name: 'Artist pictures' })
await waitFor(() => expect(within(pictures).getByRole('button', { name: 'Start Artist pictures' })).toBeDisabled())
const pictures = await screen.findByRole('region', { name: 'Artist photos' })
await waitFor(() => expect(within(pictures).getByRole('button', { name: 'Start Artist photos' })).toBeDisabled())
expect(pictures).toHaveTextContent('Needs Wikimedia Commons turned on')
const descriptions = screen.getByRole('region', { name: 'Artist descriptions' })
expect(within(descriptions).getByRole('button', { name: 'Start Artist descriptions' })).toBeEnabled()
@ -65,6 +65,6 @@ test('a provider that is off blocks the jobs that need it, read from the server'
test('the jobs still show, and are not blocked, when the providers cannot be read', async () => {
mockFetch(routes({}, { 'GET /api/v1/providers': () => apiError(500, 'internal') }))
renderPage()
const pictures = await screen.findByRole('region', { name: 'Artist pictures' })
expect(within(pictures).getByRole('button', { name: 'Start Artist pictures' })).toBeEnabled()
const pictures = await screen.findByRole('region', { name: 'Artist photos' })
expect(within(pictures).getByRole('button', { name: 'Start Artist photos' })).toBeEnabled()
})

View file

@ -96,7 +96,7 @@ test('removing asks first, and says the music on disk is never touched', async (
await userEvent.click(within(await row('Music')).getByRole('button', { name: 'Remove Music' }))
const dialog = await screen.findByRole('dialog')
expect(dialog).toHaveTextContent('Remove Music?')
expect(dialog).toHaveTextContent('Tracks and listening history stay, and the music on disk is never touched.')
expect(dialog).toHaveTextContent('Songs and listening history stay, and the music on disk is never touched.')
expect(calls.map((c) => c.key)).not.toContain('DELETE /api/v1/libraries/1')
await userEvent.click(within(dialog).getByRole('button', { name: 'Cancel' }))

View file

@ -134,7 +134,7 @@ test('when Last.fm is off it says so, and what was stored is still shown', async
mockFetch(routes(true, { 'GET /api/v1/discover': () => answer({ provider_status: 'disabled' }) }))
renderTab()
expect(await screen.findByRole('link', { name: 'Portishead' })).toBeInTheDocument()
expect(screen.getByText('Turn on Last.fm in the server settings to see this.')).toBeInTheDocument()
expect(screen.getByText('Turn on Last.fm in Admin → Providers to see this.')).toBeInTheDocument()
})
test('when Last.fm failed for some artists the rest is shown with a warning', async () => {

View file

@ -200,7 +200,7 @@ test('with Wikipedia off the description says how to turn it on and has no link
mockFetch(artistRoutes())
renderPage(<ArtistPage />, '/artists/5', '/artists/:id')
const about = await screen.findByRole('region', { name: 'About' })
expect(await within(about).findByText('Turn on Wikipedia in the server settings to see this.')).toBeInTheDocument()
expect(await within(about).findByText('Turn on Wikipedia in Admin → Providers to see this.')).toBeInTheDocument()
expect(within(about).queryByRole('link')).not.toBeInTheDocument()
})
@ -298,7 +298,7 @@ test('tags show with their credit when a provider gave some, and say how to turn
mockFetch(artistRoutes())
renderPage(<ArtistPage />, '/artists/5', '/artists/:id')
const off = await screen.findByRole('region', { name: 'Tags' })
expect(await within(off).findByText('Turn on Last.fm in the server settings to see this.')).toBeInTheDocument()
expect(await within(off).findByText('Turn on Last.fm in Admin → Providers to see this.')).toBeInTheDocument()
})
test('only the ten heaviest tags are shown', async () => {

View file

@ -18,7 +18,7 @@ export default function UpdateNotice() {
}
return (
<div role="status" className="fixed inset-x-0 bottom-24 z-20 mx-auto flex w-fit max-w-[calc(100%-1rem)] flex-wrap items-center gap-3 rounded-xl bg-secondary px-4 py-2 text-secondary-foreground shadow-lg">
<div role="status" className="fixed inset-x-0 bottom-24 z-20 mx-auto flex w-fit max-w-[calc(100%-1rem)] flex-wrap items-center gap-3 rounded-xl bg-secondary px-4 py-2 text-secondary-foreground">
<span className="font-semibold">{t('pwa.updateReady')}</span>
<Button onClick={reload}>{t('pwa.reload')}</Button>
<Button variant="ghost" onClick={dismiss}>