2024-07-10 16:05:04 +02:00
|
|
|
<script lang="ts">
|
2024-12-18 15:19:48 +01:00
|
|
|
import type { InterpolationValues } from '$lib/components/i18n/format-message';
|
2024-07-10 16:05:04 +02:00
|
|
|
import FormatMessage from '$lib/components/i18n/format-message.svelte';
|
2024-08-29 14:41:39 +02:00
|
|
|
import type { Translations } from 'svelte-i18n';
|
2024-07-10 16:05:04 +02:00
|
|
|
|
2024-11-14 08:43:25 -06:00
|
|
|
interface Props {
|
|
|
|
|
key: Translations;
|
|
|
|
|
values?: InterpolationValues;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let { key, values = {} }: Props = $props();
|
2024-07-10 16:05:04 +02:00
|
|
|
</script>
|
|
|
|
|
|
2024-11-14 08:43:25 -06:00
|
|
|
<FormatMessage {key} {values}>
|
|
|
|
|
{#snippet children({ message, tag })}
|
|
|
|
|
{#if tag === 'b'}
|
|
|
|
|
<b>{message}</b>
|
|
|
|
|
{/if}
|
|
|
|
|
{/snippet}
|
2024-07-10 16:05:04 +02:00
|
|
|
</FormatMessage>
|