more localization

This commit is contained in:
Sean Morley
2024-10-28 15:10:14 -04:00
parent 91c0ec8c07
commit 8068fe93f7
8 changed files with 265 additions and 166 deletions

View File

@@ -49,14 +49,15 @@
<img src={Lost} alt="Lost" class="w-1/2" />
</div>
<h1 class="mt-4 text-3xl font-bold tracking-tight text-foreground sm:text-4xl">
Adventure not Found
{$t('adventures.not_found')}
</h1>
<p class="mt-4 text-muted-foreground">
The adventure you were looking for could not be found. Please try a different adventure or
check back later.
{$t('adventures.not_found_desc')}
</p>
<div class="mt-6">
<button class="btn btn-primary" on:click={() => goto('/')}>Homepage</button>
<button class="btn btn-primary" on:click={() => goto('/')}
>{$t('adventures.homepage')}</button
>
</div>
</div>
</div>
@@ -258,18 +259,18 @@
></div>
<div class="grid gap-8">
<div>
<h2 class="text-2xl font-bold mt-4">Adventure Details</h2>
<h2 class="text-2xl font-bold mt-4">{$t('adventures.adventure_details')}</h2>
<div class="grid gap-4 mt-4">
<div class="grid md:grid-cols-2 gap-4">
<div>
<p class="text-sm text-muted-foreground">Adventure Type</p>
<p class="text-sm text-muted-foreground">{$t('adventures.adventure_type')}</p>
<p class="text-base font-medium">
{$t(`adventures.activities.${adventure.type}`)}
</p>
</div>
{#if data.props.collection}
<div>
<p class="text-sm text-muted-foreground">Collection</p>
<p class="text-sm text-muted-foreground">{$t('adventures.collection')}</p>
<a
class="text-base font-medium link"
href="/collections/{data.props.collection.id}">{data.props.collection.name}</a
@@ -281,7 +282,9 @@
<p class="text-sm text-muted-foreground">Visits</p>
<p class="text-base font-medium">
{adventure.visits.length}
{adventure.visits.length > 1 ? 'visits' : 'visit' + ':'}
{adventure.visits.length > 1
? $t('adventures.visits')
: $t('adventures.visit') + ':'}
</p>
<!-- show each visit start and end date as well as notes -->
{#each adventure.visits as visit}
@@ -310,11 +313,11 @@
{#if adventure.longitude && adventure.latitude}
<div class="grid md:grid-cols-2 gap-4">
<div>
<p class="text-sm text-muted-foreground">Latitude</p>
<p class="text-sm text-muted-foreground">{$t('adventures.latitude')}</p>
<p class="text-base font-medium">{adventure.latitude}° N</p>
</div>
<div>
<p class="text-sm text-muted-foreground">Longitude</p>
<p class="text-sm text-muted-foreground">{$t('adventures.longitude')}</p>
<p class="text-base font-medium">{adventure.longitude}° W</p>
</div>
</div>
@@ -336,13 +339,6 @@
<p class="font-semibold text-black text-md">
{adventure.type.charAt(0).toUpperCase() + adventure.type.slice(1)}
</p>
<p>
<!-- {adventure.date
? new Date(adventure.date).toLocaleDateString(undefined, {
timeZone: 'UTC'
})
: ''} -->
</p>
{#if adventure.visits.length > 0}
<p class="text-black text-sm">
{#each adventure.visits as visit}