refactor: every count in the web app is said by one plural(), with the viewer's thousands separator; a source guard names any hand-written copy (M505 #5642)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 16:18:04 -04:00
co-authored by Claude Opus 5.5
parent af2d4f9859
commit 9e24b2b4fc
34 changed files with 144 additions and 75 deletions
@@ -1,4 +1,5 @@
<script lang="ts">
import { plural } from '#lib/utils/plural.js';
import { pageTitle } from '#lib/branding.js';
import { ChevronDown, FolderX, Music2, Search, X } from 'lucide-svelte';
import { useQueryClient } from '@tanstack/svelte-query';
@@ -40,10 +41,6 @@
const shown = $derived(groups.reduce((n, g) => n + g.tracks.length, 0));
const hasMore = $derived(offset + shown < total);
function trackCountLabel(n: number): string {
return n === 1 ? '1 track' : `${n} tracks`;
}
// What happens to these is set under Acquisition (#5607); the line above
// the list says what it is now, since this is where the question comes up.
let policy = $state<ReacquisitionSettings | null>(null);
@@ -158,7 +155,7 @@
{group.directory}
</h3>
<span class="shrink-0 text-xs text-text-secondary">
{trackCountLabel(group.tracks.length)} · gone {relativeTime(group.missing_since)}
{plural(group.tracks.length, 'track', 'tracks')} · gone {relativeTime(group.missing_since)}
</span>
</div>