Skip to content

Commit

Permalink
fix: shell translations for MFEs and RCs (#564)
Browse files Browse the repository at this point in the history
* fix: portal-integration-angular translations from shell included in mfes

* fix: shell translations for remote components

* fix: fix tests
  • Loading branch information
markuczy authored Oct 28, 2024
1 parent eb78d52 commit f5f3ff6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export function createRemoteComponentTranslateLoader(
Location.joinWithSlash(baseUrl, `onecx-portal-lib/assets/i18n/`),
'.json'
),
// translations of portal-integration-angular of shell
new CachingTranslateLoader(ts, http, `./onecx-portal-lib/assets/i18n/`, '.json'),
// translations of the app
new CachingTranslateLoader(ts, http, Location.joinWithSlash(baseUrl, `assets/i18n/`), '.json')
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('CreateTranslateLoader', () => {
)

translateLoader.getTranslation('en').subscribe(() => {
expect(httpClientMock.get).toHaveBeenCalledTimes(4)
expect(httpClientMock.get).toHaveBeenCalledTimes(5)
done()
})
})
Expand Down Expand Up @@ -70,7 +70,7 @@ describe('CreateTranslateLoader', () => {
)

translateLoader.getTranslation('en').subscribe(() => {
expect(httpClientMock.get).toHaveBeenCalledTimes(4)
expect(httpClientMock.get).toHaveBeenCalledTimes(5)
done()
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export function createTranslateLoader(
Location.joinWithSlash(currentMfe.remoteBaseUrl, `onecx-portal-lib/assets/i18n/`),
'.json'
),
// translations of portal-integration-angular of shell
new CachingTranslateLoader(ts, http, `./onecx-portal-lib/assets/i18n/`, '.json'),
// Primelocale Translations
new CachingTranslateLoader(
ts,
Expand Down

0 comments on commit f5f3ff6

Please sign in to comment.