@fkui/i18next-translate 6.34.1 → 6.36.0
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 +10 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +10 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/types/tsdoc-metadata.json +1 -1
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -3765,6 +3765,14 @@ const bindMemberFunctions = inst => {
|
|
|
3765
3765
|
}
|
|
3766
3766
|
});
|
|
3767
3767
|
};
|
|
3768
|
+
const usesLocize = inst => {
|
|
3769
|
+
if (inst?.modules?.backend?.name?.indexOf('Locize') > 0) return true;
|
|
3770
|
+
if (inst?.modules?.backend?.constructor?.name?.indexOf('Locize') > 0) return true;
|
|
3771
|
+
if (inst?.options?.backend?.backends) {
|
|
3772
|
+
if (inst.options.backend.backends.some(b => b?.name?.indexOf('Locize') > 0 || b?.constructor?.name?.indexOf('Locize') > 0)) return true;
|
|
3773
|
+
}
|
|
3774
|
+
return false;
|
|
3775
|
+
};
|
|
3768
3776
|
class I18n extends EventEmitter {
|
|
3769
3777
|
constructor(options = {}, callback) {
|
|
3770
3778
|
super();
|
|
@@ -3817,8 +3825,8 @@ class I18n extends EventEmitter {
|
|
|
3817
3825
|
if (typeof this.options.overloadTranslationOptionHandler !== 'function') {
|
|
3818
3826
|
this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;
|
|
3819
3827
|
}
|
|
3820
|
-
if (this.options.
|
|
3821
|
-
if (typeof console !== 'undefined') console.
|
|
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 💙');
|
|
3822
3830
|
}
|
|
3823
3831
|
const createClassOnDemand = ClassOrObject => {
|
|
3824
3832
|
if (!ClassOrObject) return null;
|