From afe1bb5f4c2f4971f372c1aa5374417c905261e4 Mon Sep 17 00:00:00 2001 From: Mawoka Date: Sat, 17 Sep 2022 14:41:41 +0200 Subject: [PATCH] :bug: Closes #117 --- frontend/src/lib/i18n/locales/de.json | 7 ++++++- frontend/src/lib/i18n/locales/en.json | 7 ++++++- frontend/src/routes/+error.svelte | 9 +++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/i18n/locales/de.json b/frontend/src/lib/i18n/locales/de.json index ffafbdd..7f99835 100644 --- a/frontend/src/lib/i18n/locales/de.json +++ b/frontend/src/lib/i18n/locales/de.json @@ -143,7 +143,8 @@ "other_plural": "anderen", "donating": "Spende", "find": "Finden", - "practice": "Üben" + "practice": "Üben", + "error": "Fehler" }, "editor": { "time_in_seconds": "Zeit in Sekunden", @@ -215,5 +216,9 @@ "more_details_here": "Mehr Details sind hier", "donate": "Wenn ClassQuiz hilfreich ist, würde eine {{donate_link}} helfen.", "self_ads": "Gemacht mit ❤️ von {{mawoka_link}} und mit der Hilfe von {{others_link}}." + }, + "error_page": { + "404_text": "Die Seite nach der du suchst existiert nicht mehr oder hat nie existiert. Wer weiß?", + "unknown_error_text": "Das sollte nicht passieren. Es ist wahrscheinlich meine Schuld, oder du hast eine magische Fähigkeit, Fehler zu erschaffen..." } } diff --git a/frontend/src/lib/i18n/locales/en.json b/frontend/src/lib/i18n/locales/en.json index 3ea07f3..b2cb423 100644 --- a/frontend/src/lib/i18n/locales/en.json +++ b/frontend/src/lib/i18n/locales/en.json @@ -143,7 +143,8 @@ "other_plural": "others", "donating": "donating", "find": "Find", - "practice": "Practice" + "practice": "Practice", + "error": "Error" }, "editor": { "time_in_seconds": "Time in seconds", @@ -208,5 +209,9 @@ "self_ads": "Made with ❤️ by {{mawoka_link}} and with the help of {{others_link}}.", "more_details_here": "More details are here", "donate": "If you find this useful, please consider {{donate_link}}." + }, + "error_page": { + "404_text": "The page you were looking for is gone or never even existed. Who knows?", + "unknown_error_text": "That shouldn't happen. It's probably my fault, not yours, but maybe you have a magical power to break stuff..." } } diff --git a/frontend/src/routes/+error.svelte b/frontend/src/routes/+error.svelte index 4d7837c..315c1d1 100644 --- a/frontend/src/routes/+error.svelte +++ b/frontend/src/routes/+error.svelte @@ -6,9 +6,11 @@ - Error - {status} + {$t('words.error')} - {status}

{status}

{#if status === 404}

- The page you were looking for is gone or never even existed. Who knows? + {$t('error_page.404_text')}

{:else}

- That shouldn't happen. It's probably my fault, not yours, but maybe you have a magical power - to break stuff... + {$t('error_page.unknown_error_text')}

{/if}