2
0
forked from jmug/cactoide

feat: Add translation support

This commit is contained in:
Levente Orban
2025-09-16 11:05:59 +02:00
parent 8d01000ed4
commit f66fd03d70
12 changed files with 517 additions and 187 deletions

View File

@@ -1,12 +1,13 @@
<script lang="ts">
import { page } from '$app/stores';
import { goto } from '$app/navigation';
import { t } from '$lib/i18n/i18n.js';
$: error = $page.error;
</script>
<svelte:head>
<title>Error - Cactoide</title>
<title>{t('errors.title')}</title>
</svelte:head>
<div class="flex min-h-screen flex-col">
@@ -15,10 +16,10 @@
<div class="mx-auto max-w-md text-center">
<div class="rounded-sm border border-red-500/30 bg-red-900/20 p-8">
<div class="mb-4 text-6xl text-red-400">🚨</div>
<h2 class="mb-4 text-2xl font-bold text-red-400">Error</h2>
<h2 class="mb-4 text-2xl font-bold text-red-400">{t('errors.errorTitle')}</h2>
<p class=" mb-6">
{error?.message || 'An unexpected error occurred.'}
{error?.message || t('errors.anUnexpectedErrorOccurred')}
</p>
<div class="space-y-3">
@@ -26,7 +27,7 @@
on:click={() => goto('/')}
class="border-white-500 bg-white-400/20 mt-2 w-48 rounded-sm border px-6 py-3 font-semibold text-white duration-400 hover:scale-110 hover:bg-white/10"
>
Home
{t('errors.homeButton')}
</button>
</div>
</div>