@fkui/i18next-translate 6.36.0 → 6.36.1

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/dist/cjs/index.js CHANGED
@@ -3096,7 +3096,7 @@ class PluralResolver {
3096
3096
  type
3097
3097
  });
3098
3098
  } catch (err) {
3099
- if (!Intl) {
3099
+ if (typeof Intl === 'undefined') {
3100
3100
  this.logger.error('No Intl support, please use an Intl polyfill!');
3101
3101
  return dummyRule;
3102
3102
  }
@@ -3765,6 +3765,7 @@ const bindMemberFunctions = inst => {
3765
3765
  }
3766
3766
  });
3767
3767
  };
3768
+ let supportNoticeShown = false;
3768
3769
  const usesLocize = inst => {
3769
3770
  if (inst?.modules?.backend?.name?.indexOf('Locize') > 0) return true;
3770
3771
  if (inst?.modules?.backend?.constructor?.name?.indexOf('Locize') > 0) return true;
@@ -3825,8 +3826,9 @@ class I18n extends EventEmitter {
3825
3826
  if (typeof this.options.overloadTranslationOptionHandler !== 'function') {
3826
3827
  this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;
3827
3828
  }
3828
- if (this.options.showSupportNotice !== false && !usesLocize(this)) {
3829
- if (typeof console !== 'undefined' && typeof console.info !== 'undefined') console.info('🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙');
3829
+ if (this.options.showSupportNotice !== false && !usesLocize(this) && !supportNoticeShown) {
3830
+ if (typeof console !== 'undefined' && typeof console.info !== 'undefined') console.info('🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙');
3831
+ supportNoticeShown = true;
3830
3832
  }
3831
3833
  const createClassOnDemand = ClassOrObject => {
3832
3834
  if (!ClassOrObject) return null;