Skip to content

Commit

Permalink
Merge pull request ramp4-pcar4#2487 from gordlin/notification-transla…
Browse files Browse the repository at this point in the history
…tion

Implement better notification handling on lang switch (ramp4-pcar4#2487)
  • Loading branch information
james-rae authored Dec 2, 2024
2 parents 3d55815 + 65d5a05 commit 3a9b37f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/api/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,14 @@ export class InstanceAPI {
return;
}
const configStore = useConfigStore(this.$vApp.$pinia);
const notificationStore = useNotificationStore(this.$vApp.$pinia);
const langs = configStore.registeredLangs;

// If monoconfig, clear all notifications (notification language isn't changed on lang change)
if (Object.keys(configStore.registeredConfigs).length === 1) {
notificationStore.clearAll();
}

const old = this.$i18n.locale.value;
this.$i18n.locale.value = language;

Expand Down

0 comments on commit 3a9b37f

Please sign in to comment.