From 2612eb2e91dbcbde1e7286742aee7b3aaf902b16 Mon Sep 17 00:00:00 2001 From: vcoppe Date: Wed, 4 Sep 2024 13:36:19 +0200 Subject: [PATCH] update selected routing profile label when locale changes --- website/src/lib/components/toolbar/tools/routing/Routing.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/lib/components/toolbar/tools/routing/Routing.ts b/website/src/lib/components/toolbar/tools/routing/Routing.ts index c6754a61..8eac7ef4 100644 --- a/website/src/lib/components/toolbar/tools/routing/Routing.ts +++ b/website/src/lib/components/toolbar/tools/routing/Routing.ts @@ -24,7 +24,7 @@ export const routingProfileSelectItem = writable({ }); derived([routingProfile, locale, isLoading], ([profile, l, i]) => [profile, l, i]).subscribe(([profile, l, i]) => { - if (!i && profile !== '' && profile !== get(routingProfileSelectItem).value && l !== null) { + if (!i && profile !== '' && (profile !== get(routingProfileSelectItem).value || get(_)(`toolbar.routing.activities.${profile}`) !== get(routingProfileSelectItem).label) && l !== null) { routingProfileSelectItem.update((item) => { item.value = profile; item.label = get(_)(`toolbar.routing.activities.${profile}`);