1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-28 01:09:37 +02:00

Refactor localization strings and add missing translations

This commit is contained in:
Sean Morley 2024-10-29 10:29:03 -04:00
parent fcd2d27221
commit 05076a6732
15 changed files with 1245 additions and 441 deletions

View file

@ -1,5 +1,6 @@
<script lang="ts">
import { onMount } from 'svelte';
import { t } from 'svelte-i18n';
export let activities: string[] | undefined | null;
@ -53,7 +54,7 @@
<input
type="text"
class="input input-bordered w-full"
placeholder="Add an activity"
placeholder={$t('adventures.add_an_activity')}
bind:value={inputVal}
on:keydown={(e) => {
if (e.key === 'Enter') {
@ -62,7 +63,9 @@
}
}}
/>
<button type="button" class="btn btn-neutral" on:click={addActivity}>Add</button>
<button type="button" class="btn btn-neutral" on:click={addActivity}
>{$t('adventures.add')}</button
>
</div>
{#if inputVal && filteredItems.length > 0}
<ul class="absolute z-10 w-full bg-base-100 shadow-lg max-h-60 overflow-auto">
@ -95,7 +98,7 @@
class="btn btn-sm btn-error"
on:click={() => removeActivity(activity)}
>
Remove
{$t('adventures.remove')}
</button>
</li>
{/each}