From 57801e1a81be3578c32f069c29f7fe91cf341c10 Mon Sep 17 00:00:00 2001 From: phoebus-84 <83974413+phoebus-84@users.noreply.github.com> Date: Sat, 17 Feb 2024 03:31:51 +0100 Subject: [PATCH] feat: add language settings (#19) * feat: add settings * fix: add missing translations key * fix: remove old language switcher --- messages/en.json | 8 +++ messages/it.json | 4 ++ src/lib/components/atoms/Header.svelte | 25 --------- src/lib/components/languageSwitcher.svelte | 20 -------- src/lib/components/molecules/Header.svelte | 51 +++++++++++++++++++ src/lib/components/molecules/Settings.svelte | 24 +++++++++ src/routes/+layout.ts | 13 ++--- src/routes/[[lang]]/+page.svelte | 19 +++---- src/routes/[[lang]]/+page.ts | 18 +++++++ .../[id]/credential-detail/+page.svelte | 7 +-- src/routes/[[lang]]/[id]/verify/+page.svelte | 6 +-- 11 files changed, 125 insertions(+), 70 deletions(-) create mode 100644 messages/en.json create mode 100644 messages/it.json delete mode 100644 src/lib/components/atoms/Header.svelte delete mode 100644 src/lib/components/languageSwitcher.svelte create mode 100644 src/lib/components/molecules/Header.svelte create mode 100644 src/lib/components/molecules/Settings.svelte create mode 100644 src/routes/[[lang]]/+page.ts diff --git a/messages/en.json b/messages/en.json new file mode 100644 index 0000000..9433935 --- /dev/null +++ b/messages/en.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://inlang.com/schema/inlang-message-format", + "Verify_credential": "Verify credential", + "VERIFICATION_QR": "VERIFICATION QR", + "Generate_QR": "Generate QR", + "CREDENTIAL_DETAIL": "CREDENTIAL DETAIL", + "VERIFIER": "VERIFIER" +} \ No newline at end of file diff --git a/messages/it.json b/messages/it.json new file mode 100644 index 0000000..e173475 --- /dev/null +++ b/messages/it.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://inlang.com/schema/inlang-message-format", + "Verify_credential": "Verifica credenziali" +} \ No newline at end of file diff --git a/src/lib/components/atoms/Header.svelte b/src/lib/components/atoms/Header.svelte deleted file mode 100644 index 3f0ba78..0000000 --- a/src/lib/components/atoms/Header.svelte +++ /dev/null @@ -1,25 +0,0 @@ - - - - - {#if backButton} - - window.history.back()} on:keydown={() => window.history.back()} aria-hidden> - - - - {/if} - - - - {#if backButton} -