Skip to content

Commit

Permalink
(fix) O3-4134: Translation overrides not being overridden correctly (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher authored Oct 28, 2024
1 parent 6985940 commit 57a4383
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/shell/esm-app-shell/src/locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function setupI18n() {
import(/* webpackMode: "lazy" */ `@openmrs/esm-translations/translations/${language}.json`),
getTranslationOverrides(namespace),
])
.then(([json, overrides]) => {
.then(([json, [overrides]]) => {
let translations = json?.default ?? {};

if (language in overrides) {
Expand Down Expand Up @@ -80,10 +80,7 @@ export function setupI18n() {
}
}

translations = merge(
translations,
overrides.filter((o) => language in o).map((o) => o[language]),
);
translations = merge(translations, ...overrides.filter((o) => language in o).map((o) => o[language]));

callback(null, translations);
})
Expand Down

0 comments on commit 57a4383

Please sign in to comment.