adds i18n

This commit is contained in:
Christian Beutel
2024-02-29 23:26:18 +01:00
parent 528b443aa7
commit 5e19a4e8bb
45 changed files with 1520 additions and 638 deletions

View File

@@ -1,14 +1,15 @@
<script lang="ts">
import Modal from "$lib/components/base/modal.svelte";
import { createEventDispatcher } from "svelte";
import { _ } from "svelte-i18n";
export let openModal: (() => void) | undefined = undefined;
export let closeModal: (() => void) | undefined = undefined;
export let title: string = "Confirm Deletion";
export let text: string;
const dispatch = createEventDispatcher()
const dispatch = createEventDispatcher();
function confirm() {
dispatch("confirm");
@@ -19,11 +20,11 @@
<Modal id="confirm-modal" {title} bind:openModal bind:closeModal>
<p slot="content">{text}</p>
<div slot="footer" class="flex items-center gap-4">
<button class="btn-secondary" on:click={closeModal}>Cancel</button>
<button
class="btn-danger"
type="button"
on:click={confirm}>Delete</button
<button class="btn-secondary" on:click={closeModal}
>{$_("cancel")}</button
>
<button class="btn-danger" type="button" on:click={confirm}
>{$_("delete")}</button
>
</div></Modal
>