monkey-front-core 21.0.12 → 21.0.14

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.
@@ -5566,15 +5566,14 @@ class MonkeyEcxI18nResolver {
5566
5566
  this._injector = inject(Injector);
5567
5567
  this._localeId = injectTokenWithWarning(LOCALE_ID, 'LOCALE_ID');
5568
5568
  this._bootstrapService = injectTokenWithWarning(MECX_BOOTSTRAP_SERVICE, 'MECX_BOOTSTRAP_SERVICE');
5569
- this._i18nPath = injectTokenWithWarning(MECX_I18N_PATH, 'MECX_I18N_PATH');
5570
- this._i18nAlias = injectTokenWithWarning(MECX_I18N_ALIAS, 'MECX_I18N_ALIAS');
5571
5569
  this._tokenStorageService = inject(MonkeyEcxTokenStorageService);
5572
5570
  // not to do
5573
5571
  }
5574
5572
  resolve() {
5575
5573
  const service = this._injector.get(MonkeyEcxService);
5574
+ const path = this._injector.get(MECX_I18N_PATH).toString();
5575
+ const alias = this._injector.get(MECX_I18N_ALIAS).toString();
5576
5576
  const locale = this._tokenStorageService.getMe()?.locale || this._localeId;
5577
- const path = this._i18nPath;
5578
5577
  const host = this.getHost();
5579
5578
  const url = [host || '', `assets/${path}/i18n/${locale}.json`].join(host ? '/' : '');
5580
5579
  const cacheKey = `${path}/${locale}`;
@@ -5585,7 +5584,7 @@ class MonkeyEcxI18nResolver {
5585
5584
  }
5586
5585
  return service.get(url).pipe(map((translations) => {
5587
5586
  this._bootstrapService.handleI18N(locale, {
5588
- [this._i18nAlias]: translations.data
5587
+ [alias]: translations.data
5589
5588
  });
5590
5589
  MonkeyEcxI18nResolver._loadedPaths.set(cacheKey, now);
5591
5590
  return true;