@eui/core 13.0.0-rc.45 → 13.0.0-rc.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/services/i18n/i18n.loader.mjs +3 -1
- package/esm2020/lib/services/i18n/i18n.service.mjs +1 -7
- package/fesm2015/eui-core.mjs +2 -6
- package/fesm2015/eui-core.mjs.map +1 -1
- package/fesm2020/eui-core.mjs +2 -6
- package/fesm2020/eui-core.mjs.map +1 -1
- package/lib/services/i18n/i18n.loader.d.ts.map +1 -1
- package/lib/services/i18n/i18n.service.d.ts.map +1 -1
- package/package.json +1 -1
package/fesm2020/eui-core.mjs
CHANGED
|
@@ -772,6 +772,8 @@ class I18nLoader {
|
|
|
772
772
|
// return the translations
|
|
773
773
|
return translations;
|
|
774
774
|
}), catchError((err) => {
|
|
775
|
+
// remove failed resource from loaded resource array
|
|
776
|
+
this.removeResources([resource]);
|
|
775
777
|
// resource not loaded properly, send a warning message
|
|
776
778
|
if (this.logService) {
|
|
777
779
|
this.logService.warn(`I18n resource NOT loaded from path ${path}`, err);
|
|
@@ -880,9 +882,6 @@ class I18nService extends EuiLazyService {
|
|
|
880
882
|
.pipe(take(1), tap((loadedResources) => {
|
|
881
883
|
// add the new set of translations to the current language
|
|
882
884
|
this.translateService.setTranslation(this.translateService.currentLang, loadedResources.translations, true);
|
|
883
|
-
if (loadedResources.hasError) {
|
|
884
|
-
i18nLoader.removeResources(loadedResources.errors.map(err => err.resource));
|
|
885
|
-
}
|
|
886
885
|
})));
|
|
887
886
|
// if the current language is different than the DEFAULT language
|
|
888
887
|
if (this.translateService.currentLang !== this.translateService.defaultLang) {
|
|
@@ -890,9 +889,6 @@ class I18nService extends EuiLazyService {
|
|
|
890
889
|
langSubscription.push(i18nLoader.loadResources(resources, this.translateService.defaultLang)
|
|
891
890
|
.pipe(take(1), tap((loadedResources) => {
|
|
892
891
|
this.translateService.setTranslation(this.translateService.defaultLang, loadedResources.translations, true);
|
|
893
|
-
if (loadedResources.hasError) {
|
|
894
|
-
i18nLoader.removeResources(loadedResources.errors.map(err => err.resource));
|
|
895
|
-
}
|
|
896
892
|
})));
|
|
897
893
|
}
|
|
898
894
|
return forkJoin(langSubscription).pipe(map((loadedResourcesArr) => {
|