From e12a704c2e23bb073682c53ec63d5c946f94e5d4 Mon Sep 17 00:00:00 2001 From: vcoppe Date: Wed, 24 Apr 2024 18:13:01 +0200 Subject: [PATCH] more localization --- .../src/lib/components/toolbar/Toolbar.svelte | 2 +- .../components/toolbar/routing/Routing.svelte | 23 ++++++++----------- website/src/locales/en.json | 10 +++++++- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/website/src/lib/components/toolbar/Toolbar.svelte b/website/src/lib/components/toolbar/Toolbar.svelte index d1ddd63a..58f59d97 100644 --- a/website/src/lib/components/toolbar/Toolbar.svelte +++ b/website/src/lib/components/toolbar/Toolbar.svelte @@ -35,7 +35,7 @@ > - {$_('toolbar.routing_tooltip')} + {$_('toolbar.routing.tooltip')} diff --git a/website/src/lib/components/toolbar/routing/Routing.svelte b/website/src/lib/components/toolbar/routing/Routing.svelte index 8692856f..a0d83edd 100644 --- a/website/src/lib/components/toolbar/routing/Routing.svelte +++ b/website/src/lib/components/toolbar/routing/Routing.svelte @@ -15,6 +15,8 @@ import type { GPXFile } from 'gpx'; + import { _ } from 'svelte-i18n'; + let routingProfile = { value: 'bike', label: 'bike' @@ -139,13 +141,9 @@ - - Routing - - - +
- + @@ -154,18 +152,15 @@ {#each Object.keys(brouterProfiles) as profile} {profile} {/each} -
- +
- +
@@ -173,11 +168,11 @@ {#if $selectedFiles.size > 1} -
Select a single file to use the routing tool
+
{$_('toolbar.routing.help_multiple_files')}
{:else if $selectedFiles.size == 0} -
Select a file to use the routing tool, or create a new file from the menu
+
{$_('toolbar.routing.help_no_file')}
{:else} -
Click on the map to plot a route
+
{$_('toolbar.routing.help')}
{/if}
diff --git a/website/src/locales/en.json b/website/src/locales/en.json index 1cc62330..6c4c59af 100644 --- a/website/src/locales/en.json +++ b/website/src/locales/en.json @@ -26,7 +26,15 @@ "donate": "Donate" }, "toolbar": { - "routing_tooltip": "Edit the route", + "routing": { + "tooltip": "Edit the route", + "activity": "Activity", + "use_routing": "Routing (follow roads)", + "allow_private": "Allow private roads", + "help_no_file": "Select a file to use the routing tool, or create a new file from the menu", + "help_multiple_files": "Select a single file to use the routing tool", + "help": "Click on the map to add a new point, or drag existing points to change the route" + }, "time_tooltip": "Change the time and speed data", "reverse_tooltip": "Reverse the direction", "merge_tooltip": "Merge files together",