feat(i18n): fix remaining hardcoded strings and add login page switcher
- Add 9 missing translation keys to de/en/es.json: doc_file_error_preview, doc_download_title, doc_tag_filter_title, doc_conversation_title, doc_preview_iframe_title, doc_image_alt, doc_no_date, person_merge_will_be_deleted, admin_user_delete_confirm - documents/[id]/+page.svelte: replace 6 hardcoded strings with m.*() - persons/[id]/+page.svelte: replace "wird gelöscht." and "Kein Datum" - admin/+page.svelte: replace confirm() string with m.admin_user_delete_confirm() - login/+page.svelte: add top-right DE/EN/ES language switcher (Option B) and wire existing login_* keys to the form labels Closes #12 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
error = 'Vorschau konnte nicht geladen werden.';
|
||||
error = m.doc_file_error_preview();
|
||||
} finally {
|
||||
isLoading = false;
|
||||
}
|
||||
@@ -87,7 +87,7 @@
|
||||
href={fileUrl}
|
||||
download={doc.originalFilename}
|
||||
class="text-brand-navy bg-brand-sand/50 hover:bg-brand-mint border border-transparent p-2 rounded transition"
|
||||
title="Download"
|
||||
title={m.doc_download_title()}
|
||||
>
|
||||
<img src="/degruyter-icons/Simple/Medium-24px/SVG/Action/Download-MD.svg" alt="" aria-hidden="true" class="w-5 h-5" />
|
||||
</a>
|
||||
@@ -163,7 +163,7 @@
|
||||
<a
|
||||
href="/?tag={encodeURIComponent(tag.name)}"
|
||||
class="inline-flex items-center px-2 py-0.5 rounded text-xs font-bold uppercase tracking-wide bg-brand-sand/50 text-brand-navy hover:bg-brand-navy hover:text-white transition-colors"
|
||||
title="Nach '{tag.name}' filtern"
|
||||
title={m.doc_tag_filter_title({ name: tag.name })}
|
||||
>
|
||||
{tag.name}
|
||||
</a>
|
||||
@@ -241,7 +241,7 @@
|
||||
<a
|
||||
href="/conversations?senderId={doc.sender.id}&receiverId={receiver.id}"
|
||||
class="text-gray-300 hover:text-brand-mint transition"
|
||||
title="Konversation anzeigen"
|
||||
title={m.doc_conversation_title()}
|
||||
>
|
||||
<img src="/degruyter-icons/Simple/Medium-24px/SVG/Action/Chat-MD.svg" alt="" aria-hidden="true" class="w-5 h-5" />
|
||||
</a>
|
||||
@@ -341,14 +341,14 @@
|
||||
{:else if fileUrl && doc.originalFilename.toLowerCase().endsWith('.pdf')}
|
||||
<iframe
|
||||
src={fileUrl}
|
||||
title="Document Preview"
|
||||
title={m.doc_preview_iframe_title()}
|
||||
class="w-full h-full border-none bg-white"
|
||||
></iframe>
|
||||
{:else if fileUrl}
|
||||
<div class="w-full h-full flex items-center justify-center overflow-auto p-8">
|
||||
<img
|
||||
src={fileUrl}
|
||||
alt="Original Scan"
|
||||
alt={m.doc_image_alt()}
|
||||
class="max-w-full max-h-full object-contain shadow-2xl"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user