Update localization for activities and adventures; change links and placeholders
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<table class="table table-compact">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$t('adventures.activity')}</th>
|
||||
<th>{$t('navbar.tag')}</th>
|
||||
<th>{$t('adventures.actions')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -33,6 +33,6 @@
|
||||
</table>
|
||||
|
||||
<svelte:head>
|
||||
<title>My Activities</title>
|
||||
<meta name="description" content="View my activity types." />
|
||||
<title>My Tags</title>
|
||||
<meta name="description" content="View my tags." />
|
||||
</svelte:head>
|
||||
|
||||
@@ -508,7 +508,8 @@
|
||||
] || []}
|
||||
|
||||
<h2 class="text-center font-bold text-3xl mt-4">
|
||||
Day {i + 1}
|
||||
{$t('adventures.day')}
|
||||
{i + 1}
|
||||
</h2>
|
||||
<h3 class="text-center text-xl mb-2">
|
||||
{adjustedDate.toLocaleDateString(undefined, { timeZone: 'UTC' })}
|
||||
|
||||
@@ -63,21 +63,21 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<h1 class="text-center font-bold text-4xl">Adventure Map</h1>
|
||||
<h1 class="text-center font-bold text-4xl">{$t('map.adventure_map')}</h1>
|
||||
|
||||
<div class="m-2 flex flex-col items-center justify-center">
|
||||
<div class="gap-4 border-solid border-2 rounded-lg p-2 mb-4 border-neutral max-w-4xl">
|
||||
<p class="font-semibold text-center text-xl mb-2">Map Options</p>
|
||||
<p class="font-semibold text-center text-xl mb-2">{$t('map.map_options')}</p>
|
||||
<div class="flex flex-wrap items-center justify-center gap-4">
|
||||
<label class="label cursor-pointer">
|
||||
<span class="label-text mr-1">Visited</span>
|
||||
<span class="label-text mr-1">{$t('adventures.visited')}</span>
|
||||
<input type="checkbox" bind:checked={showVisited} class="checkbox checkbox-primary" />
|
||||
</label>
|
||||
<label class="label cursor-pointer">
|
||||
<span class="label-text mr-1">Planned</span>
|
||||
<span class="label-text mr-1">{$t('adventures.planned')}</span>
|
||||
<input type="checkbox" bind:checked={showPlanned} class="checkbox checkbox-primary" />
|
||||
</label>
|
||||
<label for="show-geo">Show Visited Regions</label>
|
||||
<label for="show-geo">{$t('map.show_visited_regions')}</label>
|
||||
<input
|
||||
type="checkbox"
|
||||
id="show-geo"
|
||||
@@ -88,14 +88,14 @@
|
||||
<div class="divider divider-horizontal"></div>
|
||||
{#if newMarker}
|
||||
<button type="button" class="btn btn-primary mb-2" on:click={() => (createModalOpen = true)}
|
||||
>Add New Adventure at Marker</button
|
||||
>{$t('map.add_adventure_at_marker')}</button
|
||||
>
|
||||
<button type="button" class="btn btn-neutral mb-2" on:click={() => (newMarker = null)}
|
||||
>Clear Marker</button
|
||||
>{$t('map.clear_marker')}</button
|
||||
>
|
||||
{:else}
|
||||
<button type="button" class="btn btn-primary mb-2" on:click={() => (createModalOpen = true)}
|
||||
>Add New Adventure</button
|
||||
>{$t('map.add_adventure')}</button
|
||||
>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -160,7 +160,7 @@
|
||||
{/if}
|
||||
<button
|
||||
class="btn btn-neutral btn-wide btn-sm mt-4"
|
||||
on:click={() => goto(`/adventures/${adventure.id}`)}>View Details</button
|
||||
on:click={() => goto(`/adventures/${adventure.id}`)}>{$t('map.view_details')}</button
|
||||
>
|
||||
</Popup>
|
||||
{/if}
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
import type { Adventure, OpenStreetMapPlace } from '$lib/types';
|
||||
import { onMount } from 'svelte';
|
||||
import type { PageData } from './$types';
|
||||
import EditAdventure from '$lib/components/AdventureModal.svelte';
|
||||
import { appVersion } from '$lib/config';
|
||||
import { goto } from '$app/navigation';
|
||||
import AdventureModal from '$lib/components/AdventureModal.svelte';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
export let data: PageData;
|
||||
|
||||
@@ -42,9 +41,7 @@
|
||||
publicAdventures = data.props.adventures;
|
||||
|
||||
if (data.user?.pk != null) {
|
||||
myAdventures = myAdventures.filter(
|
||||
(adventure) => adventure.user_id === data.user?.pk ?? -1
|
||||
);
|
||||
myAdventures = myAdventures.filter((adventure) => adventure.user_id === data.user?.pk);
|
||||
} else {
|
||||
myAdventures = [];
|
||||
}
|
||||
@@ -93,14 +90,14 @@
|
||||
{/if}
|
||||
|
||||
{#if myAdventures.length !== 0}
|
||||
<h2 class="text-center font-bold text-2xl mb-4">AdventureLog Results</h2>
|
||||
<h2 class="text-center font-bold text-2xl mb-4">{$t('search.adventurelog_results')}</h2>
|
||||
<div class="flex items-center justify-center mt-2 mb-2">
|
||||
<div class="join">
|
||||
<input
|
||||
class="join-item btn"
|
||||
type="radio"
|
||||
name="filter"
|
||||
aria-label="All"
|
||||
aria-label={$t('adventures.all')}
|
||||
id="all"
|
||||
checked
|
||||
on:change={() => (property = 'all')}
|
||||
@@ -109,7 +106,7 @@
|
||||
class="join-item btn"
|
||||
type="radio"
|
||||
name="filter"
|
||||
aria-label="Name"
|
||||
aria-label={$t('adventures.name')}
|
||||
id="name"
|
||||
on:change={() => (property = 'name')}
|
||||
/>
|
||||
@@ -117,7 +114,7 @@
|
||||
class="join-item btn"
|
||||
type="radio"
|
||||
name="filter"
|
||||
aria-label="Type"
|
||||
aria-label={$t('transportation.type')}
|
||||
id="type"
|
||||
on:change={() => (property = 'type')}
|
||||
/>
|
||||
@@ -125,7 +122,7 @@
|
||||
class="join-item btn"
|
||||
type="radio"
|
||||
name="filter"
|
||||
aria-label="Location"
|
||||
aria-label={$t('adventures.location')}
|
||||
id="location"
|
||||
on:change={() => (property = 'location')}
|
||||
/>
|
||||
@@ -133,7 +130,7 @@
|
||||
class="join-item btn"
|
||||
type="radio"
|
||||
name="filter"
|
||||
aria-label="Description"
|
||||
aria-label={$t('adventures.description')}
|
||||
id="description"
|
||||
on:change={() => (property = 'description')}
|
||||
/>
|
||||
@@ -141,17 +138,19 @@
|
||||
class="join-item btn"
|
||||
type="radio"
|
||||
name="filter"
|
||||
aria-label="Activity Types"
|
||||
aria-label={$t('adventures.activity_types')}
|
||||
id="activity_types"
|
||||
on:change={() => (property = 'activity_types')}
|
||||
/>
|
||||
</div>
|
||||
<button class="btn btn-primary ml-2" type="button" on:click={filterByProperty}>Filter</button>
|
||||
<button class="btn btn-primary ml-2" type="button" on:click={filterByProperty}
|
||||
>{$t('adventures.filter')}</button
|
||||
>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if myAdventures.length > 0}
|
||||
<h2 class="text-center font-bold text-2xl mb-4">My Adventures</h2>
|
||||
<h2 class="text-center font-bold text-2xl mb-4">{$t('adventures.my_adventures')}</h2>
|
||||
<div class="flex flex-wrap gap-4 mr-4 justify-center content-center">
|
||||
{#each myAdventures as adventure}
|
||||
<AdventureCard
|
||||
@@ -166,7 +165,7 @@
|
||||
{/if}
|
||||
|
||||
{#if publicAdventures.length > 0}
|
||||
<h2 class="text-center font-bold text-2xl mb-4">Public Adventures</h2>
|
||||
<h2 class="text-center font-bold text-2xl mb-4">{$t('search.public_adventures')}</h2>
|
||||
<div class="flex flex-wrap gap-4 mr-4 justify-center content-center">
|
||||
{#each publicAdventures as adventure}
|
||||
<AdventureCard
|
||||
@@ -183,7 +182,7 @@
|
||||
<div class="divider"></div>
|
||||
{/if}
|
||||
{#if osmResults.length > 0}
|
||||
<h2 class="text-center font-bold mt-2 text-2xl mb-4">Online Results</h2>
|
||||
<h2 class="text-center font-bold mt-2 text-2xl mb-4">{$t('search.online_results')}</h2>
|
||||
<div class="flex flex-wrap gap-4 mr-4 justify-center content-center">
|
||||
{#each osmResults as result}
|
||||
<div class="bg-base-300 rounded-lg shadow-md p-4 w-96 mb-2">
|
||||
|
||||
Reference in New Issue
Block a user