fix(i18n): use getLocale() for date formatting in panel header
Replaces hardcoded 'de-DE' with the active Paraglide locale so dates render in the user's language. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { m } from '$lib/paraglide/messages.js';
|
import { m } from '$lib/paraglide/messages.js';
|
||||||
|
import { getLocale } from '$lib/paraglide/runtime.js';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
mode: 'read' | 'edit';
|
mode: 'read' | 'edit';
|
||||||
@@ -14,7 +15,7 @@ let { mode, hasBlocks, blockCount, lastEditedAt, onModeChange, onClose }: Props
|
|||||||
|
|
||||||
const formattedDate = $derived(
|
const formattedDate = $derived(
|
||||||
lastEditedAt
|
lastEditedAt
|
||||||
? new Intl.DateTimeFormat('de-DE', {
|
? new Intl.DateTimeFormat(getLocale(), {
|
||||||
day: 'numeric',
|
day: 'numeric',
|
||||||
month: 'short',
|
month: 'short',
|
||||||
year: 'numeric'
|
year: 'numeric'
|
||||||
|
|||||||
Reference in New Issue
Block a user