From b0e8000cf803019b6e861e307ab2beab0c7ad4f6 Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Sat, 14 Jun 2025 18:55:59 -0400 Subject: [PATCH] Refactor UI components for improved localization and styling - Updated various headings and text elements to utilize localization functions for better internationalization support. - Simplified gradient styles in headings to enhance readability. - Adjusted adventure and travel statistics sections to reflect localized titles and descriptions. - Enhanced filter options and buttons with localized text for clarity. - Modified Tailwind CSS configuration to include a new color 'dim' for future styling needs. --- .vscode/settings.json | 13 +- frontend/src/lib/components/Navbar.svelte | 2 +- frontend/src/lib/index.ts | 4 +- frontend/src/locales/de.json | 95 +- frontend/src/locales/en.json | 1286 +++++++++-------- frontend/src/locales/es.json | 95 +- frontend/src/locales/fr.json | 95 +- frontend/src/locales/it.json | 95 +- frontend/src/locales/ko.json | 95 +- frontend/src/locales/nl.json | 95 +- frontend/src/locales/no.json | 95 +- frontend/src/locales/pl.json | 95 +- frontend/src/locales/ru.json | 95 +- frontend/src/locales/sv.json | 95 +- frontend/src/locales/zh.json | 95 +- frontend/src/routes/+page.svelte | 132 +- frontend/src/routes/adventures/+page.svelte | 28 +- frontend/src/routes/collections/+page.svelte | 48 +- frontend/src/routes/dashboard/+page.svelte | 80 +- frontend/src/routes/map/+page.svelte | 36 +- .../src/routes/profile/[uuid]/+page.svelte | 24 +- frontend/src/routes/settings/+page.svelte | 4 +- frontend/src/routes/worldtravel/+page.svelte | 69 +- .../src/routes/worldtravel/[id]/+page.svelte | 70 +- .../routes/worldtravel/[id]/[id]/+page.svelte | 69 +- frontend/tailwind.config.js | 1 + 26 files changed, 1814 insertions(+), 1097 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 11f6a2d..80fe952 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -25,5 +25,16 @@ "backend/server/backend/lib/python3.12/site-packages/django/contrib/sites/locale", "backend/server/backend/lib/python3.12/site-packages/rest_framework/templates/rest_framework/docs/langs" ], - "i18n-ally.keystyle": "nested" + "i18n-ally.keystyle": "nested", + "i18n-ally.keysInUse": [ + "navbar.themes.dim", + "navbar.themes.northernLights", + "navbar.themes.aqua", + "navbar.themes.aestheticDark", + "navbar.themes.aestheticLight", + "navbar.themes.forest", + "navbar.themes.night", + "navbar.themes.dark", + "navbar.themes.light" + ] } diff --git a/frontend/src/lib/components/Navbar.svelte b/frontend/src/lib/components/Navbar.svelte index d80b59f..b69aaf5 100644 --- a/frontend/src/lib/components/Navbar.svelte +++ b/frontend/src/lib/components/Navbar.svelte @@ -263,7 +263,7 @@ diff --git a/frontend/src/routes/adventures/+page.svelte b/frontend/src/routes/adventures/+page.svelte index e9ae840..2813573 100644 --- a/frontend/src/routes/adventures/+page.svelte +++ b/frontend/src/routes/adventures/+page.svelte @@ -197,13 +197,14 @@
-

+

{$t('navbar.my_adventures')}

- {count} adventures • {getVisitedCount()} visited • {getPlannedCount()} planned + {count} + {$t('navbar.adventures')} • {getVisitedCount()} + {$t('adventures.visited')} • {getPlannedCount()} + {$t('adventures.planned')}

@@ -216,14 +217,14 @@
-
Visited
+
{$t('adventures.visited')}
{getVisitedCount()}
-
Planned
+
{$t('adventures.planned')}
{getPlannedCount()}
@@ -239,10 +240,11 @@
-

No adventures yet

+

+ {$t('adventures.no_adventures_found')} +

- Start documenting your adventures and planning new ones. Every journey has a story - worth telling. + {$t('adventures.no_adventures_message')}

{:else} @@ -301,7 +303,7 @@
-

Filters & Sort

+

{$t('adventures.filters_and_sort')}

@@ -332,6 +334,7 @@
+ @@ -358,6 +361,7 @@
+ @@ -491,12 +495,10 @@
-

+

{$t(`adventures.my_collections`)}

{currentCount} {activeView === 'owned' - ? 'collections' + ? $t('navbar.collections') : activeView === 'shared' - ? 'shared collections' - : 'archived collections'} + ? $t('collection.shared_collections') + : $t('adventures.archived_collections')}

@@ -225,7 +223,7 @@ on:click={() => switchView('owned')} > - +
@@ -237,7 +235,7 @@ on:click={() => switchView('shared')} > - +
@@ -249,7 +247,7 @@ on:click={() => switchView('archived')} > - +
{activeView === 'owned' - ? 'No collections yet' + ? $t('collection.no_collections_yet') : activeView === 'shared' - ? 'No shared collections.' - : 'No archived collections'} + ? $t('collection.no_shared_collections') + : $t('collection.no_archived_collections')}

{activeView === 'owned' - ? 'Create your first collection to organize your adventures and memories.' + ? $t('collection.create_first') : activeView === 'shared' - ? 'Make sure your profile is public so others can share with you.' - : 'Archived collections will appear here.'} + ? $t('collection.make_sure_public') + : $t('collection.archived_appear_here')}

{#if activeView === 'owned'} {/if}
@@ -353,7 +351,7 @@
-

Filters & Sort

+

{$t('adventures.filters_and_sort')}

@@ -365,6 +363,7 @@
+ @@ -389,6 +388,7 @@
+ @@ -427,18 +427,6 @@
- - - @@ -456,12 +444,10 @@