mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-25 15:59:38 +02:00
Add i18n support for transportation, notes, checklist, and collection components
This commit is contained in:
parent
c0aaec1436
commit
3df124b250
11 changed files with 305 additions and 213 deletions
|
@ -4,6 +4,7 @@
|
|||
import FileDocumentEdit from '~icons/mdi/file-document-edit';
|
||||
import type { Collection, Transportation, User } from '$lib/types';
|
||||
import { addToast } from '$lib/toasts';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
import ArrowDownThick from '~icons/mdi/arrow-down-thick';
|
||||
|
||||
|
@ -25,10 +26,9 @@
|
|||
}
|
||||
});
|
||||
if (!res.ok) {
|
||||
console.log('Error deleting transportation');
|
||||
console.log($t('transportation.transportation_delete_error'));
|
||||
} else {
|
||||
console.log('Collection deleted');
|
||||
addToast('info', 'Transportation deleted successfully!');
|
||||
addToast('info', $t('transportation.transportation_deleted'));
|
||||
dispatch('delete', transportation.id);
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@
|
|||
>
|
||||
<div class="card-body">
|
||||
<h2 class="card-title overflow-ellipsis">{transportation.name}</h2>
|
||||
<div class="badge badge-secondary">{transportation.type}</div>
|
||||
<div class="badge badge-secondary">{$t(`transportation.modes.${transportation.type}`)}</div>
|
||||
<div>
|
||||
{#if transportation.from_location}
|
||||
<p class="break-words text-wrap">{transportation.from_location}</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue