🐛 Closes #117

This commit is contained in:
Mawoka
2022-09-17 14:41:41 +02:00
parent fa0db5c259
commit afe1bb5f4c
3 changed files with 17 additions and 6 deletions
+6 -1
View File
@@ -143,7 +143,8 @@
"other_plural": "anderen", "other_plural": "anderen",
"donating": "Spende", "donating": "Spende",
"find": "Finden", "find": "Finden",
"practice": "Üben" "practice": "Üben",
"error": "Fehler"
}, },
"editor": { "editor": {
"time_in_seconds": "Zeit in Sekunden", "time_in_seconds": "Zeit in Sekunden",
@@ -215,5 +216,9 @@
"more_details_here": "Mehr Details sind hier", "more_details_here": "Mehr Details sind hier",
"donate": "Wenn ClassQuiz hilfreich ist, würde eine {{donate_link}} helfen.", "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}}." "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..."
} }
} }
+6 -1
View File
@@ -143,7 +143,8 @@
"other_plural": "others", "other_plural": "others",
"donating": "donating", "donating": "donating",
"find": "Find", "find": "Find",
"practice": "Practice" "practice": "Practice",
"error": "Error"
}, },
"editor": { "editor": {
"time_in_seconds": "Time in seconds", "time_in_seconds": "Time in seconds",
@@ -208,5 +209,9 @@
"self_ads": "Made with ❤️ by {{mawoka_link}} and with the help of {{others_link}}.", "self_ads": "Made with ❤️ by {{mawoka_link}} and with the help of {{others_link}}.",
"more_details_here": "More details are here", "more_details_here": "More details are here",
"donate": "If you find this useful, please consider {{donate_link}}." "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..."
} }
} }
+5 -4
View File
@@ -6,9 +6,11 @@
<script lang="ts"> <script lang="ts">
import { navbarVisible } from '$lib/stores'; import { navbarVisible } from '$lib/stores';
import { page } from '$app/stores'; import { page } from '$app/stores';
import { getLocalization } from '$lib/i18n';
navbarVisible.set(true); navbarVisible.set(true);
let status = $page.status; let status = $page.status;
const { t } = getLocalization();
</script> </script>
<!-- <!--
@@ -18,18 +20,17 @@
--> -->
<svelte:head> <svelte:head>
<title>Error - {status}</title> <title>{$t('words.error')} - {status}</title>
</svelte:head> </svelte:head>
<h1 class="text-6xl text-center">{status}</h1> <h1 class="text-6xl text-center">{status}</h1>
{#if status === 404} {#if status === 404}
<p class="text-center"> <p class="text-center">
The page you were looking for is gone or never even existed. Who knows? {$t('error_page.404_text')}
</p> </p>
{:else} {:else}
<p> <p>
That shouldn't happen. It's probably my fault, not yours, but maybe you have a magical power {$t('error_page.unknown_error_text')}
to break stuff...
</p> </p>
{/if} {/if}