feat(web): translations containing html (#10491)

* feat(web): translations containing html

* add tests and more translations

* more translations

* rename FormatTags --> FormatMessage

* update version_announcement_message
This commit is contained in:
Michel Heusschen 2024-06-21 22:08:36 +02:00 committed by GitHub
parent 1129020159
commit b3252ffdac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 313 additions and 101 deletions

View file

@ -5,7 +5,8 @@
import { serverConfig } from '$lib/stores/server-config.store';
import { createEventDispatcher } from 'svelte';
import Checkbox from '$lib/components/elements/checkbox.svelte';
import { t } from 'svelte-i18n';
import { json, t } from 'svelte-i18n';
import FormatMessage from '$lib/components/i18n/format-message.svelte';
export let user: UserResponseDto;
@ -54,12 +55,19 @@
<div class="flex flex-col gap-4">
{#if forceDelete}
<p>
<b>{user.name}</b>'s account and assets will be queued for permanent deletion <b>immediately</b>.
<FormatMessage message={$json('admin.user_delete_immediately')} values={{ user: user.name }} let:message>
<b>{message}</b>
</FormatMessage>
</p>
{:else}
<p>
<b>{user.name}</b>'s account and assets will be scheduled for permanent deletion in {$serverConfig.userDeleteDelay}
days.
<FormatMessage
message={$json('admin.user_delete_delay')}
values={{ user: user.name, delay: $serverConfig.userDeleteDelay }}
let:message
>
<b>{message}</b>
</FormatMessage>
</p>
{/if}