mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-23 06:49:37 +02:00
Add additional localization strings for itinerary features in Polish, Swedish, and Chinese
- Added "additional_info", "invalid_date_range", "sunrise_sunset", and "timezone" keys to pl.json, sv.json, and zh.json. - Updated existing strings for consistency across languages.
This commit is contained in:
parent
311e2847cb
commit
3caebd37dd
13 changed files with 771 additions and 707 deletions
|
@ -56,11 +56,20 @@
|
|||
}).localDate;
|
||||
});
|
||||
|
||||
if (collection && collection.start_date && collection.end_date) {
|
||||
// Set the full date range for constraining purposes
|
||||
$: if (collection && collection.start_date && collection.end_date) {
|
||||
fullStartDate = `${collection.start_date}T00:00`;
|
||||
fullEndDate = `${collection.end_date}T23:59`;
|
||||
}
|
||||
|
||||
// Get constraint dates in the right format based on allDay setting
|
||||
$: constraintStartDate = allDay
|
||||
? fullStartDate
|
||||
? fullStartDate.split('T')[0]
|
||||
: ''
|
||||
: fullStartDate;
|
||||
$: constraintEndDate = allDay ? (fullEndDate ? fullEndDate.split('T')[0] : '') : fullEndDate;
|
||||
|
||||
// Update local display dates whenever timezone or UTC dates change
|
||||
$: if (!isEditing) {
|
||||
if (allDay) {
|
||||
|
@ -109,15 +118,20 @@
|
|||
<TimezoneSelector bind:selectedTimezone />
|
||||
</div>
|
||||
|
||||
<span class="label-text">{$t('adventures.all_day')}</span>
|
||||
<div class="rounded-xl border border-base-300 bg-base-100 p-4 space-y-4 shadow-sm">
|
||||
<!-- Group Header -->
|
||||
<h3 class="text-md font-semibold">{$t('navbar.settings')}</h3>
|
||||
|
||||
<!-- All Day Toggle -->
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-sm">{$t('adventures.all_day')}</span>
|
||||
<input
|
||||
type="checkbox"
|
||||
class="toggle toggle-primary"
|
||||
id="constrain_dates"
|
||||
name="constrain_dates"
|
||||
id="all_day"
|
||||
name="all_day"
|
||||
bind:checked={allDay}
|
||||
on:change={() => {
|
||||
// clear local dates when toggling all day
|
||||
if (allDay) {
|
||||
localStartDate = localStartDate.split('T')[0];
|
||||
localEndDate = localEndDate.split('T')[0];
|
||||
|
@ -125,7 +139,6 @@
|
|||
localStartDate = localStartDate + 'T00:00';
|
||||
localEndDate = localEndDate + 'T23:59';
|
||||
}
|
||||
// Update UTC dates when toggling all day
|
||||
utcStartDate = updateUTCDate({
|
||||
localDate: localStartDate,
|
||||
timezone: selectedTimezone,
|
||||
|
@ -136,7 +149,6 @@
|
|||
timezone: selectedTimezone,
|
||||
allDay
|
||||
}).utcDate;
|
||||
// Update local dates when toggling all day
|
||||
localStartDate = updateLocalDate({
|
||||
utcDate: utcStartDate,
|
||||
timezone: selectedTimezone
|
||||
|
@ -147,13 +159,28 @@
|
|||
}).localDate;
|
||||
}}
|
||||
/>
|
||||
<!-- All Day Event Checkbox -->
|
||||
</div>
|
||||
|
||||
<!-- Constrain Dates Toggle -->
|
||||
{#if collection?.start_date && collection?.end_date}
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-sm">{$t('adventures.date_constrain')}</span>
|
||||
<input
|
||||
type="checkbox"
|
||||
id="constrain_dates"
|
||||
name="constrain_dates"
|
||||
class="toggle toggle-primary"
|
||||
on:change={() => (constrainDates = !constrainDates)}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<!-- Dates Input Section -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<!-- Start Date -->
|
||||
<div class="flex flex-col space-y-2">
|
||||
<label for="date" class="font-medium">
|
||||
<div class="space-y-2">
|
||||
<label for="date" class="text-sm font-medium">
|
||||
{$t('adventures.start_date')}
|
||||
</label>
|
||||
|
||||
|
@ -164,8 +191,8 @@
|
|||
name="date"
|
||||
bind:value={localStartDate}
|
||||
on:change={handleLocalDateChange}
|
||||
min={constrainDates ? fullStartDate : ''}
|
||||
max={constrainDates ? fullEndDate : ''}
|
||||
min={constrainDates ? constraintStartDate : ''}
|
||||
max={constrainDates ? constraintEndDate : ''}
|
||||
class="input input-bordered w-full"
|
||||
/>
|
||||
{:else}
|
||||
|
@ -175,30 +202,17 @@
|
|||
name="date"
|
||||
bind:value={localStartDate}
|
||||
on:change={handleLocalDateChange}
|
||||
min={constrainDates ? fullStartDate : ''}
|
||||
max={constrainDates ? fullEndDate : ''}
|
||||
min={constrainDates ? constraintStartDate : ''}
|
||||
max={constrainDates ? constraintEndDate : ''}
|
||||
class="input input-bordered w-full"
|
||||
/>
|
||||
{/if}
|
||||
|
||||
{#if collection && collection.start_date && collection.end_date}
|
||||
<label class="flex items-center gap-2 mt-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="toggle toggle-primary"
|
||||
id="constrain_dates"
|
||||
name="constrain_dates"
|
||||
on:change={() => (constrainDates = !constrainDates)}
|
||||
/>
|
||||
<span class="label-text">{$t('adventures.date_constrain')}</span>
|
||||
</label>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<!-- End Date -->
|
||||
{#if localStartDate}
|
||||
<div class="flex flex-col space-y-2">
|
||||
<label for="end_date" class="font-medium">
|
||||
<div class="space-y-2">
|
||||
<label for="end_date" class="text-sm font-medium">
|
||||
{$t('adventures.end_date')}
|
||||
</label>
|
||||
|
||||
|
@ -210,7 +224,7 @@
|
|||
bind:value={localEndDate}
|
||||
on:change={handleLocalDateChange}
|
||||
min={constrainDates ? localStartDate : ''}
|
||||
max={constrainDates ? fullEndDate : ''}
|
||||
max={constrainDates ? constraintEndDate : ''}
|
||||
class="input input-bordered w-full"
|
||||
/>
|
||||
{:else}
|
||||
|
@ -221,21 +235,26 @@
|
|||
bind:value={localEndDate}
|
||||
on:change={handleLocalDateChange}
|
||||
min={constrainDates ? localStartDate : ''}
|
||||
max={constrainDates ? fullEndDate : ''}
|
||||
max={constrainDates ? constraintEndDate : ''}
|
||||
class="input input-bordered w-full"
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- Notes -->
|
||||
<!-- Notes (for adventures only) -->
|
||||
{#if type === 'adventure'}
|
||||
<div class="flex gap-2 mb-1">
|
||||
<!-- textarea for notes -->
|
||||
<div class="md:col-span-2">
|
||||
<label for="note" class="text-sm font-medium block mb-1">
|
||||
{$t('adventures.add_notes')}
|
||||
</label>
|
||||
<textarea
|
||||
id="note"
|
||||
name="note"
|
||||
class="textarea textarea-bordered w-full"
|
||||
placeholder={$t('adventures.add_notes')}
|
||||
bind:value={note}
|
||||
rows="4"
|
||||
></textarea>
|
||||
</div>
|
||||
{/if}
|
||||
|
@ -269,7 +288,7 @@
|
|||
>
|
||||
<p class="text-sm text-base-content font-medium">
|
||||
{#if isAllDay(visit.start_date)}
|
||||
<span class="badge badge-outline mr-2">All Day</span>
|
||||
<span class="badge badge-outline mr-2">{$t('adventures.all_day')}</span>
|
||||
{visit.start_date.split('T')[0]} – {visit.end_date.split('T')[0]}
|
||||
{:else}
|
||||
{new Date(visit.start_date).toLocaleString()} – {new Date(
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
<div class="form-control w-full max-w-xs relative" id="tz-selector">
|
||||
<label class="label" for="timezone-display">
|
||||
<span class="label-text">Timezone</span>
|
||||
<span class="label-text">{$t('adventures.timezone')}</span>
|
||||
</label>
|
||||
|
||||
<!-- Trigger -->
|
||||
|
|
|
@ -252,7 +252,11 @@
|
|||
"collection_no_start_end_date": "Durch das Hinzufügen eines Start- und Enddatums zur Sammlung werden Reiseroutenplanungsfunktionen auf der Sammlungsseite freigegeben.",
|
||||
"date_itinerary": "Datumstrecke",
|
||||
"no_ordered_items": "Fügen Sie der Sammlung Elemente mit Daten hinzu, um sie hier zu sehen.",
|
||||
"ordered_itinerary": "Reiseroute bestellt"
|
||||
"ordered_itinerary": "Reiseroute bestellt",
|
||||
"additional_info": "Weitere Informationen",
|
||||
"invalid_date_range": "Ungültiger Datumsbereich",
|
||||
"sunrise_sunset": "Sonnenaufgang",
|
||||
"timezone": "Zeitzone"
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "Entdecken, planen und erkunden Sie mühelos",
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
"collection_remove_error": "Error removing adventure from collection",
|
||||
"collection_link_success": "Adventure linked to collection successfully!",
|
||||
"invalid_date_range": "Invalid date range",
|
||||
"timezone": "Timezone",
|
||||
"no_image_found": "No image found",
|
||||
"collection_link_error": "Error linking adventure to collection",
|
||||
"adventure_delete_confirm": "Are you sure you want to delete this adventure? This action cannot be undone.",
|
||||
|
|
|
@ -300,7 +300,11 @@
|
|||
"collection_no_start_end_date": "Agregar una fecha de inicio y finalización a la colección desbloqueará las funciones de planificación del itinerario en la página de colección.",
|
||||
"date_itinerary": "Itinerario de fecha",
|
||||
"no_ordered_items": "Agregue elementos con fechas a la colección para verlos aquí.",
|
||||
"ordered_itinerary": "Itinerario ordenado"
|
||||
"ordered_itinerary": "Itinerario ordenado",
|
||||
"additional_info": "información adicional",
|
||||
"invalid_date_range": "Rango de fechas no válido",
|
||||
"sunrise_sunset": "Amanecer",
|
||||
"timezone": "Zona horaria"
|
||||
},
|
||||
"worldtravel": {
|
||||
"all": "Todo",
|
||||
|
|
|
@ -252,7 +252,11 @@
|
|||
"collection_no_start_end_date": "L'ajout d'une date de début et de fin à la collection débloquera les fonctionnalités de planification de l'itinéraire dans la page de collection.",
|
||||
"date_itinerary": "Itinéraire trié par date",
|
||||
"no_ordered_items": "Ajoutez des éléments avec des dates de visite à la collection pour les voir ici.",
|
||||
"ordered_itinerary": "Itinéraire trié par activité"
|
||||
"ordered_itinerary": "Itinéraire trié par activité",
|
||||
"additional_info": "Informations Complémentaires",
|
||||
"invalid_date_range": "Plage de dates non valide",
|
||||
"sunrise_sunset": "Lever du soleil",
|
||||
"timezone": "Fuseau horaire"
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "Découvrez, planifiez et explorez en toute simplicité",
|
||||
|
|
|
@ -252,7 +252,11 @@
|
|||
"collection_no_start_end_date": "L'aggiunta di una data di inizio e fine alla collezione sbloccherà le funzionalità di pianificazione dell'itinerario nella pagina della collezione.",
|
||||
"date_itinerary": "Data dell'itinerario",
|
||||
"no_ordered_items": "Aggiungi elementi con date alla collezione per vederli qui.",
|
||||
"ordered_itinerary": "Itinerario ordinato"
|
||||
"ordered_itinerary": "Itinerario ordinato",
|
||||
"additional_info": "Ulteriori informazioni",
|
||||
"invalid_date_range": "Intervallo di date non valido",
|
||||
"sunrise_sunset": "Alba",
|
||||
"timezone": "Fuso orario"
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "Scopri, pianifica ed esplora con facilità",
|
||||
|
|
|
@ -252,7 +252,11 @@
|
|||
"collection_no_start_end_date": "컬렉션에 시작 및 종료 날짜를 추가하면 컬렉션 페이지에서 여정 계획 기능이 잠금 해제됩니다.",
|
||||
"date_itinerary": "날짜 일정",
|
||||
"no_ordered_items": "컬렉션에 날짜가있는 항목을 추가하여 여기에서 확인하십시오.",
|
||||
"ordered_itinerary": "주문한 여정"
|
||||
"ordered_itinerary": "주문한 여정",
|
||||
"additional_info": "추가 정보",
|
||||
"invalid_date_range": "잘못된 날짜 범위",
|
||||
"sunrise_sunset": "해돋이",
|
||||
"timezone": "시간대"
|
||||
},
|
||||
"auth": {
|
||||
"both_passwords_required": "두 암호 모두 필요합니다",
|
||||
|
|
|
@ -252,7 +252,11 @@
|
|||
"collection_no_start_end_date": "Als u een start- en einddatum aan de collectie toevoegt, ontgrendelt u de functies van de planning van de route ontgrendelen in de verzamelpagina.",
|
||||
"date_itinerary": "Datumroute",
|
||||
"no_ordered_items": "Voeg items toe met datums aan de collectie om ze hier te zien.",
|
||||
"ordered_itinerary": "Besteld reisschema"
|
||||
"ordered_itinerary": "Besteld reisschema",
|
||||
"additional_info": "Aanvullende informatie",
|
||||
"invalid_date_range": "Ongeldige datumbereik",
|
||||
"sunrise_sunset": "Zonsopgang",
|
||||
"timezone": "Tijdzone"
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "Ontdek, plan en verken met gemak",
|
||||
|
|
|
@ -295,7 +295,16 @@
|
|||
},
|
||||
"lodging_information": "Overnattingsinformasjon",
|
||||
"price": "Pris",
|
||||
"reservation_number": "Reservasjonsnummer"
|
||||
"reservation_number": "Reservasjonsnummer",
|
||||
"additional_info": "Ytterligere informasjon",
|
||||
"all_day": "Hele dagen",
|
||||
"collection_no_start_end_date": "Å legge til en start- og sluttdato til samlingen vil låse opp reiseruteplanleggingsfunksjoner på innsamlingssiden.",
|
||||
"date_itinerary": "Dato reiserute",
|
||||
"invalid_date_range": "Ugyldig datoområde",
|
||||
"no_ordered_items": "Legg til varer med datoer i samlingen for å se dem her.",
|
||||
"ordered_itinerary": "Bestilt reiserute",
|
||||
"sunrise_sunset": "Soloppgang",
|
||||
"timezone": "Tidssone"
|
||||
},
|
||||
"worldtravel": {
|
||||
"country_list": "Liste over land",
|
||||
|
@ -627,5 +636,4 @@
|
|||
"website": "Nettsted",
|
||||
"recommendation": "Anbefaling"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -300,7 +300,11 @@
|
|||
"collection_no_start_end_date": "Dodanie daty rozpoczęcia i końca do kolekcji odblokuje funkcje planowania planu podróży na stronie kolekcji.",
|
||||
"date_itinerary": "Trasa daty",
|
||||
"no_ordered_items": "Dodaj przedmioty z datami do kolekcji, aby je zobaczyć tutaj.",
|
||||
"ordered_itinerary": "Zamówiono trasę"
|
||||
"ordered_itinerary": "Zamówiono trasę",
|
||||
"additional_info": "Dodatkowe informacje",
|
||||
"invalid_date_range": "Niepoprawny zakres dat",
|
||||
"sunrise_sunset": "Wschód słońca",
|
||||
"timezone": "Strefa czasowa"
|
||||
},
|
||||
"worldtravel": {
|
||||
"country_list": "Lista krajów",
|
||||
|
|
|
@ -252,7 +252,11 @@
|
|||
"collection_no_start_end_date": "Att lägga till ett start- och slutdatum till samlingen kommer att låsa upp planeringsfunktioner för resplan på insamlingssidan.",
|
||||
"date_itinerary": "Datum resplan",
|
||||
"no_ordered_items": "Lägg till objekt med datum i samlingen för att se dem här.",
|
||||
"ordered_itinerary": "Beställd resplan"
|
||||
"ordered_itinerary": "Beställd resplan",
|
||||
"additional_info": "Ytterligare information",
|
||||
"invalid_date_range": "Ogiltigt datumintervall",
|
||||
"sunrise_sunset": "Soluppgång",
|
||||
"timezone": "Tidszon"
|
||||
},
|
||||
"home": {
|
||||
"desc_1": "Upptäck, planera och utforska med lätthet",
|
||||
|
|
|
@ -300,7 +300,11 @@
|
|||
"collection_no_start_end_date": "在集合页面中添加开始日期和结束日期将在“收集”页面中解锁行程计划功能。",
|
||||
"date_itinerary": "日期行程",
|
||||
"no_ordered_items": "将带有日期的项目添加到集合中,以便在此处查看它们。",
|
||||
"ordered_itinerary": "订购了行程"
|
||||
"ordered_itinerary": "订购了行程",
|
||||
"additional_info": "附加信息",
|
||||
"invalid_date_range": "无效的日期范围",
|
||||
"sunrise_sunset": "日出",
|
||||
"timezone": "时区"
|
||||
},
|
||||
"auth": {
|
||||
"forgot_password": "忘记密码?",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue