fix(persons): replace hardcoded 'docs'/'Persons'/'Documents' strings with i18n keys
Some checks failed
CI / Unit & Component Tests (push) Has been cancelled
CI / Backend Unit Tests (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
CI / Unit & Component Tests (pull_request) Has been cancelled
CI / Backend Unit Tests (pull_request) Has been cancelled
CI / E2E Tests (pull_request) Has been cancelled

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-29 20:37:51 +02:00
parent 27d7225330
commit f5645d6c32
5 changed files with 34 additions and 3 deletions

View File

@@ -125,7 +125,9 @@ function handleSearch() {
<span
class="mt-1 inline-flex items-center rounded-full border border-line bg-muted px-2.5 py-0.5 font-sans text-[11px] font-semibold text-ink-2"
>
{person.documentCount} docs
{person.documentCount === 1
? m.person_card_doc_count_one()
: m.person_card_doc_count_many({ count: person.documentCount ?? 0 })}
</span>
{/if}
</div>

View File

@@ -1,4 +1,6 @@
<script lang="ts">
import { m } from '$lib/paraglide/messages.js';
let {
totalPersons,
totalDocuments
@@ -6,20 +8,29 @@ let {
totalPersons: number;
totalDocuments: number;
} = $props();
const personsLabel = $derived(
totalPersons === 1 ? m.persons_stats_label_persons_one() : m.persons_stats_label_persons_many()
);
const documentsLabel = $derived(
totalDocuments === 1
? m.persons_stats_label_documents_one()
: m.persons_stats_label_documents_many()
);
</script>
<div class="flex items-baseline gap-4">
<div class="flex items-baseline gap-1.5">
<span class="font-sans text-2xl font-black text-ink">{totalPersons}</span>
<span class="font-sans text-[10px] font-bold tracking-widest text-ink-3 uppercase">
Persons
{personsLabel}
</span>
</div>
<span class="font-sans text-lg text-line">·</span>
<div class="flex items-baseline gap-1.5">
<span class="font-sans text-2xl font-black text-ink">{totalDocuments}</span>
<span class="font-sans text-[10px] font-bold tracking-widest text-ink-3 uppercase">
Documents
{documentsLabel}
</span>
</div>
</div>