update selected routing profile label when locale changes

This commit is contained in:
vcoppe
2024-09-04 13:36:19 +02:00
parent 2996f047d3
commit 2612eb2e91

View File

@@ -24,7 +24,7 @@ export const routingProfileSelectItem = writable({
}); });
derived([routingProfile, locale, isLoading], ([profile, l, i]) => [profile, l, i]).subscribe(([profile, l, i]) => { 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) => { routingProfileSelectItem.update((item) => {
item.value = profile; item.value = profile;
item.label = get(_)(`toolbar.routing.activities.${profile}`); item.label = get(_)(`toolbar.routing.activities.${profile}`);