@tolgee/i18next
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -63,3 +63,3 @@ 'use strict'; | ||
tolgee.translationService | ||
.getChachedTranslations() | ||
.getCachedTranslations() | ||
.forEach(function (translations, lang) { | ||
@@ -92,3 +92,3 @@ i18n.removeResourceBundle(lang, 'translation'); | ||
var translations = tolgee.translationService | ||
.getChachedTranslations() | ||
.getCachedTranslations() | ||
.get(language); | ||
@@ -95,0 +95,0 @@ callback(null, translations); |
@@ -15,3 +15,3 @@ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@tolgee/core"),r=function(){return r=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},r.apply(this,arguments)}; | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */function n(e,r,n){if(n||2===arguments.length)for(var t,o=0,a=r.length;o<a;o++)!t&&o in r||(t||(t=Array.prototype.slice.call(r,0,o)),t[o]=r[o]);return e.concat(t||Array.prototype.slice.call(r))}var t=function(e,r){e.onTranslationChange.subscribe((function(){e.translationService.getChachedTranslations().forEach((function(e,n){r.removeResourceBundle(n,"translation"),r.addResources(n,"translation",e)}))})),r.on("languageChanged",(function(r){r&&e.lang!==r&&(e.lang=r)})),r.tolgee=e},o=function(e){return{type:"backend",name:"TolgeeBackend",init:function(){},read:function(r,n,t){r!==e.lang&&(e.lang=r),e.translate("random").then((function(){var n=e.translationService.getChachedTranslations().get(r);t(null,n)})).catch((function(){return t(!0)}))}}},a=function(e,t){var o,a,i;return i="string"==typeof t.postProcess?[t.postProcess,"tolgeeProcessor"]:Array.isArray(t.postProcess)?n(n([],function(e,r){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var t,o,a=n.call(e),i=[];try{for(;(void 0===r||r-- >0)&&!(t=a.next()).done;)i.push(t.value)}catch(e){o={error:e}}finally{try{t&&!t.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}(t.postProcess),!1),["tolgeeProcessor"],!1):["tolgeeProcessor"],r(r({},t),{postProcess:i,i18nFormat:r(r({},null==t?void 0:t.i18nFormat),{bindI18nStore:"added "+(null===(o=t.i18nFormat)||void 0===o?void 0:o.bindI18nStore)||""}),react:r(r({},null==t?void 0:t.react),{bindI18nStore:"added "+(null===(a=t.react)||void 0===a?void 0:a.bindI18nStore)||""})})};exports.tolgeeApply=t,exports.tolgeeBackend=o,exports.tolgeeOptions=a,exports.withTolgee=function(n,i){var l=e.Tolgee.init(r({wrapperMode:"invisible"},i));n.use(o(l)),n.use(function(e){return{type:"postProcessor",name:"tolgeeProcessor",process:function(r,n,t){return e.wrap(n.join("."),void 0,t.defaultValue,r)}}}(l));var s=n.init;return n.init=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t(l,n);var o={},i=void 0;"object"==typeof e[0]?(o=e[0],i=e[1]):i=e[0];var c=a(0,o),u=s(c,i),d=n.language||o.lng;return d&&(l.lang=d),l.run(),u},n}; | ||
***************************************************************************** */function n(e,r,n){if(n||2===arguments.length)for(var t,o=0,a=r.length;o<a;o++)!t&&o in r||(t||(t=Array.prototype.slice.call(r,0,o)),t[o]=r[o]);return e.concat(t||Array.prototype.slice.call(r))}var t=function(e,r){e.onTranslationChange.subscribe((function(){e.translationService.getCachedTranslations().forEach((function(e,n){r.removeResourceBundle(n,"translation"),r.addResources(n,"translation",e)}))})),r.on("languageChanged",(function(r){r&&e.lang!==r&&(e.lang=r)})),r.tolgee=e},o=function(e){return{type:"backend",name:"TolgeeBackend",init:function(){},read:function(r,n,t){r!==e.lang&&(e.lang=r),e.translate("random").then((function(){var n=e.translationService.getCachedTranslations().get(r);t(null,n)})).catch((function(){return t(!0)}))}}},a=function(e,t){var o,a,i;return i="string"==typeof t.postProcess?[t.postProcess,"tolgeeProcessor"]:Array.isArray(t.postProcess)?n(n([],function(e,r){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var t,o,a=n.call(e),i=[];try{for(;(void 0===r||r-- >0)&&!(t=a.next()).done;)i.push(t.value)}catch(e){o={error:e}}finally{try{t&&!t.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}(t.postProcess),!1),["tolgeeProcessor"],!1):["tolgeeProcessor"],r(r({},t),{postProcess:i,i18nFormat:r(r({},null==t?void 0:t.i18nFormat),{bindI18nStore:"added "+(null===(o=t.i18nFormat)||void 0===o?void 0:o.bindI18nStore)||""}),react:r(r({},null==t?void 0:t.react),{bindI18nStore:"added "+(null===(a=t.react)||void 0===a?void 0:a.bindI18nStore)||""})})};exports.tolgeeApply=t,exports.tolgeeBackend=o,exports.tolgeeOptions=a,exports.withTolgee=function(n,i){var l=e.Tolgee.init(r({wrapperMode:"invisible"},i));n.use(o(l)),n.use(function(e){return{type:"postProcessor",name:"tolgeeProcessor",process:function(r,n,t){return e.wrap(n.join("."),void 0,t.defaultValue,r)}}}(l));var s=n.init;return n.init=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t(l,n);var o={},i=void 0;"object"==typeof e[0]?(o=e[0],i=e[1]):i=e[0];var c=a(0,o),u=s(c,i),d=n.language||o.lng;return d&&(l.lang=d),l.run(),u},n}; | ||
//# sourceMappingURL=tolgee-i18next.cjs.min.js.map |
@@ -15,3 +15,3 @@ import{Tolgee as n}from"@tolgee/core"; | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */var r=function(){return r=Object.assign||function(n){for(var r,e=1,o=arguments.length;e<o;e++)for(var t in r=arguments[e])Object.prototype.hasOwnProperty.call(r,t)&&(n[t]=r[t]);return n},r.apply(this,arguments)};function e(n,r,e){if(e||2===arguments.length)for(var o,t=0,a=r.length;t<a;t++)!o&&t in r||(o||(o=Array.prototype.slice.call(r,0,t)),o[t]=r[t]);return n.concat(o||Array.prototype.slice.call(r))}var o=function(n,r){n.onTranslationChange.subscribe((function(){n.translationService.getChachedTranslations().forEach((function(n,e){r.removeResourceBundle(e,"translation"),r.addResources(e,"translation",n)}))})),r.on("languageChanged",(function(r){r&&n.lang!==r&&(n.lang=r)})),r.tolgee=n},t=function(n){return{type:"backend",name:"TolgeeBackend",init:function(){},read:function(r,e,o){r!==n.lang&&(n.lang=r),n.translate("random").then((function(){var e=n.translationService.getChachedTranslations().get(r);o(null,e)})).catch((function(){return o(!0)}))}}},a=function(n,o){var t,a,i;return i="string"==typeof o.postProcess?[o.postProcess,"tolgeeProcessor"]:Array.isArray(o.postProcess)?e(e([],function(n,r){var e="function"==typeof Symbol&&n[Symbol.iterator];if(!e)return n;var o,t,a=e.call(n),i=[];try{for(;(void 0===r||r-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(n){t={error:n}}finally{try{o&&!o.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}return i}(o.postProcess),!1),["tolgeeProcessor"],!1):["tolgeeProcessor"],r(r({},o),{postProcess:i,i18nFormat:r(r({},null==o?void 0:o.i18nFormat),{bindI18nStore:"added "+(null===(t=o.i18nFormat)||void 0===t?void 0:t.bindI18nStore)||""}),react:r(r({},null==o?void 0:o.react),{bindI18nStore:"added "+(null===(a=o.react)||void 0===a?void 0:a.bindI18nStore)||""})})},i=function(e,i){var l=n.init(r({wrapperMode:"invisible"},i));e.use(t(l)),e.use(function(n){return{type:"postProcessor",name:"tolgeeProcessor",process:function(r,e,o){return n.wrap(e.join("."),void 0,o.defaultValue,r)}}}(l));var c=e.init;return e.init=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];o(l,e);var t={},i=void 0;"object"==typeof n[0]?(t=n[0],i=n[1]):i=n[0];var s=a(0,t),u=c(s,i),f=e.language||t.lng;return f&&(l.lang=f),l.run(),u},e};export{o as tolgeeApply,t as tolgeeBackend,a as tolgeeOptions,i as withTolgee}; | ||
***************************************************************************** */var r=function(){return r=Object.assign||function(n){for(var r,e=1,o=arguments.length;e<o;e++)for(var t in r=arguments[e])Object.prototype.hasOwnProperty.call(r,t)&&(n[t]=r[t]);return n},r.apply(this,arguments)};function e(n,r,e){if(e||2===arguments.length)for(var o,t=0,a=r.length;t<a;t++)!o&&t in r||(o||(o=Array.prototype.slice.call(r,0,t)),o[t]=r[t]);return n.concat(o||Array.prototype.slice.call(r))}var o=function(n,r){n.onTranslationChange.subscribe((function(){n.translationService.getCachedTranslations().forEach((function(n,e){r.removeResourceBundle(e,"translation"),r.addResources(e,"translation",n)}))})),r.on("languageChanged",(function(r){r&&n.lang!==r&&(n.lang=r)})),r.tolgee=n},t=function(n){return{type:"backend",name:"TolgeeBackend",init:function(){},read:function(r,e,o){r!==n.lang&&(n.lang=r),n.translate("random").then((function(){var e=n.translationService.getCachedTranslations().get(r);o(null,e)})).catch((function(){return o(!0)}))}}},a=function(n,o){var t,a,i;return i="string"==typeof o.postProcess?[o.postProcess,"tolgeeProcessor"]:Array.isArray(o.postProcess)?e(e([],function(n,r){var e="function"==typeof Symbol&&n[Symbol.iterator];if(!e)return n;var o,t,a=e.call(n),i=[];try{for(;(void 0===r||r-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(n){t={error:n}}finally{try{o&&!o.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}return i}(o.postProcess),!1),["tolgeeProcessor"],!1):["tolgeeProcessor"],r(r({},o),{postProcess:i,i18nFormat:r(r({},null==o?void 0:o.i18nFormat),{bindI18nStore:"added "+(null===(t=o.i18nFormat)||void 0===t?void 0:t.bindI18nStore)||""}),react:r(r({},null==o?void 0:o.react),{bindI18nStore:"added "+(null===(a=o.react)||void 0===a?void 0:a.bindI18nStore)||""})})},i=function(e,i){var l=n.init(r({wrapperMode:"invisible"},i));e.use(t(l)),e.use(function(n){return{type:"postProcessor",name:"tolgeeProcessor",process:function(r,e,o){return n.wrap(e.join("."),void 0,o.defaultValue,r)}}}(l));var c=e.init;return e.init=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];o(l,e);var t={},i=void 0;"object"==typeof n[0]?(t=n[0],i=n[1]):i=n[0];var s=a(0,t),u=c(s,i),f=e.language||t.lng;return f&&(l.lang=f),l.run(),u},e};export{o as tolgeeApply,t as tolgeeBackend,a as tolgeeOptions,i as withTolgee}; | ||
//# sourceMappingURL=tolgee-i18next.esm.js.map |
@@ -63,3 +63,3 @@ (function (global, factory) { | ||
tolgee.translationService | ||
.getChachedTranslations() | ||
.getCachedTranslations() | ||
.forEach(function (translations, lang) { | ||
@@ -92,3 +92,3 @@ i18n.removeResourceBundle(lang, 'translation'); | ||
var translations = tolgee.translationService | ||
.getChachedTranslations() | ||
.getCachedTranslations() | ||
.get(language); | ||
@@ -95,0 +95,0 @@ callback(null, translations); |
@@ -15,3 +15,3 @@ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@tolgee/core")):"function"==typeof define&&define.amd?define(["exports","@tolgee/core"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self)["@tolgee/i18next"]={},e["@tolgee/core"])}(this,(function(e,n){"use strict"; | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */var t=function(){return t=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},t.apply(this,arguments)};function o(e,n,t){if(t||2===arguments.length)for(var o,r=0,i=n.length;r<i;r++)!o&&r in n||(o||(o=Array.prototype.slice.call(n,0,r)),o[r]=n[r]);return e.concat(o||Array.prototype.slice.call(n))}var r=function(e,n){e.onTranslationChange.subscribe((function(){e.translationService.getChachedTranslations().forEach((function(e,t){n.removeResourceBundle(t,"translation"),n.addResources(t,"translation",e)}))})),n.on("languageChanged",(function(n){n&&e.lang!==n&&(e.lang=n)})),n.tolgee=e},i=function(e){return{type:"backend",name:"TolgeeBackend",init:function(){},read:function(n,t,o){n!==e.lang&&(e.lang=n),e.translate("random").then((function(){var t=e.translationService.getChachedTranslations().get(n);o(null,t)})).catch((function(){return o(!0)}))}}},a="tolgeeProcessor",l=function(e,n){var r,i,l;return l="string"==typeof n.postProcess?[n.postProcess,a]:Array.isArray(n.postProcess)?o(o([],function(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var o,r,i=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(r)throw r.error}}return a}(n.postProcess),!1),[a],!1):[a],t(t({},n),{postProcess:l,i18nFormat:t(t({},null==n?void 0:n.i18nFormat),{bindI18nStore:"added "+(null===(r=n.i18nFormat)||void 0===r?void 0:r.bindI18nStore)||""}),react:t(t({},null==n?void 0:n.react),{bindI18nStore:"added "+(null===(i=n.react)||void 0===i?void 0:i.bindI18nStore)||""})})};e.tolgeeApply=r,e.tolgeeBackend=i,e.tolgeeOptions=l,e.withTolgee=function(e,o){var a=n.Tolgee.init(t({wrapperMode:"invisible"},o));e.use(i(a)),e.use(function(e){return{type:"postProcessor",name:"tolgeeProcessor",process:function(n,t,o){return e.wrap(t.join("."),void 0,o.defaultValue,n)}}}(a));var c=e.init;return e.init=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];r(a,e);var o={},i=void 0;"object"==typeof n[0]?(o=n[0],i=n[1]):i=n[0];var s=l(0,o),u=c(s,i),f=e.language||o.lng;return f&&(a.lang=f),a.run(),u},e},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
***************************************************************************** */var t=function(){return t=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},t.apply(this,arguments)};function o(e,n,t){if(t||2===arguments.length)for(var o,r=0,i=n.length;r<i;r++)!o&&r in n||(o||(o=Array.prototype.slice.call(n,0,r)),o[r]=n[r]);return e.concat(o||Array.prototype.slice.call(n))}var r=function(e,n){e.onTranslationChange.subscribe((function(){e.translationService.getCachedTranslations().forEach((function(e,t){n.removeResourceBundle(t,"translation"),n.addResources(t,"translation",e)}))})),n.on("languageChanged",(function(n){n&&e.lang!==n&&(e.lang=n)})),n.tolgee=e},i=function(e){return{type:"backend",name:"TolgeeBackend",init:function(){},read:function(n,t,o){n!==e.lang&&(e.lang=n),e.translate("random").then((function(){var t=e.translationService.getCachedTranslations().get(n);o(null,t)})).catch((function(){return o(!0)}))}}},a="tolgeeProcessor",l=function(e,n){var r,i,l;return l="string"==typeof n.postProcess?[n.postProcess,a]:Array.isArray(n.postProcess)?o(o([],function(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var o,r,i=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(r)throw r.error}}return a}(n.postProcess),!1),[a],!1):[a],t(t({},n),{postProcess:l,i18nFormat:t(t({},null==n?void 0:n.i18nFormat),{bindI18nStore:"added "+(null===(r=n.i18nFormat)||void 0===r?void 0:r.bindI18nStore)||""}),react:t(t({},null==n?void 0:n.react),{bindI18nStore:"added "+(null===(i=n.react)||void 0===i?void 0:i.bindI18nStore)||""})})};e.tolgeeApply=r,e.tolgeeBackend=i,e.tolgeeOptions=l,e.withTolgee=function(e,o){var a=n.Tolgee.init(t({wrapperMode:"invisible"},o));e.use(i(a)),e.use(function(e){return{type:"postProcessor",name:"tolgeeProcessor",process:function(n,t,o){return e.wrap(t.join("."),void 0,o.defaultValue,n)}}}(a));var c=e.init;return e.init=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];r(a,e);var o={},i=void 0;"object"==typeof n[0]?(o=n[0],i=n[1]):i=n[0];var s=l(0,o),u=c(s,i),f=e.language||o.lng;return f&&(a.lang=f),a.run(),u},e},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=tolgee-i18next.umd.min.js.map |
{ | ||
"name": "@tolgee/i18next", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Tolgee i18n integration.", | ||
@@ -60,3 +60,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "ef08fb08a98f2240a1bd42e9ae4bdcc0a3872262", | ||
"gitHead": "75cfb86c92818ea172ad7544dcade53e285e1162", | ||
"publishConfig": { | ||
@@ -69,4 +69,4 @@ "access": "public" | ||
"dependencies": { | ||
"@tolgee/core": "^3.0.0" | ||
"@tolgee/core": "^3.0.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
139463
Updated@tolgee/core@^3.0.1