1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-24 07:19:36 +02:00

Add localization strings for visited regions feature and update UI components

This commit is contained in:
Sean Morley 2024-11-01 20:12:43 -04:00
parent b60455b50a
commit e6c5bc9ca8
2 changed files with 14 additions and 7 deletions

View file

@ -177,6 +177,12 @@
"no_adventures_found": "No adventures found",
"mark_region_as_visited": "Mark region {region}, {country} as visited?",
"mark_visited": "Mark Visited",
"error_updating_regions": "Error updating regions",
"regions_updated": "regions updated",
"visited_region_check": "Visited Region Check",
"visited_region_check_desc": "By selecting this, the server will check all of your visited adventures and mark the regions they are located in as visited in world travel.",
"update_visited_regions": "Update Visited Regions",
"update_visited_regions_disclaimer": "This may take a while depending on the number of adventures you have visited.",
"activities": {
"general": "General 🌍",
"outdoor": "Outdoor 🏞️",

View file

@ -53,9 +53,9 @@
});
let data = await res.json();
if (res.ok) {
addToast('success', `${data.new_regions} regions updated`);
addToast('success', `${data.new_regions} ${$t('adventures.regions_updated')}`);
} else {
addToast('error', 'Error updating visited regions');
addToast('error', $t('adventures.error_updating_regions'));
}
}
</script>
@ -183,15 +183,16 @@
</div>
<div class="flex flex-col items-center mt-4">
<h1 class="text-center font-extrabold text-xl mt-4 mb-2">Visited Region Check</h1>
<h1 class="text-center font-extrabold text-xl mt-4 mb-2">
{$t('adventures.visited_region_check')}
</h1>
<p>
By selecting this, the server will check all of your visited adventures and mark the regions
they are located in as "visited" in world travel.
{$t('adventures.visited_region_check_desc')}
</p>
<button class="btn btn-neutral mt-2 mb-2" on:click={checkVisitedRegions}
>Update Visited Regions</button
>{$t('adventures.update_visited_regions')}</button
>
<p>This may take longer depending on the number of adventures you have.</p>
<p>{$t('adventures.update_visited_regions_disclaimer')}</p>
</div>
<!--
<div class="flex flex-col items-center mt-4">