fix(document): localize PdfViewer render-error message and download link

The error state showed a hardcoded German string ("Fehler beim Laden
der PDF" / "Direkt öffnen") to all users regardless of locale. Use the
localized doc_render_failed and doc_download_link messages so the
recovery path (message + working download link) is honest in de/en/es.

Refs #708

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-06-01 20:12:23 +02:00
committed by marcel
parent 5c8034d298
commit c361b3cd45
2 changed files with 32 additions and 2 deletions

View File

@@ -171,14 +171,14 @@ function handleAnnotationClick(id: string) {
</div>
{:else if renderer.error}
<div class="flex h-full w-full flex-col items-center justify-center gap-3 bg-pdf-bg text-ink-3">
<p class="font-sans text-sm text-red-400">Fehler beim Laden der PDF</p>
<p class="font-sans text-sm text-red-400">{m.doc_render_failed()}</p>
<a
href={url}
target="_blank"
rel="noopener noreferrer"
class="font-sans text-xs text-primary underline hover:text-ink-2"
>
Direkt öffnen
{m.doc_download_link()}
</a>
</div>
{:else}