@tolgee/i18next
Advanced tools
Comparing version 4.0.0 to 4.1.0
@@ -175,3 +175,3 @@ 'use strict'; | ||
var withTolgee = function (i18n, config) { | ||
var tolgee = core.Tolgee.init(__assign({ wrapperMode: 'invisible' }, config)); | ||
var tolgee = core.Tolgee.init(__assign({ wrapperMode: 'invisible', languageDetect: false, languageStore: false }, config)); | ||
i18n.use(tolgeeBackend(tolgee)); | ||
@@ -178,0 +178,0 @@ i18n.use(tolgeeProcessor(tolgee)); |
@@ -15,3 +15,3 @@ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@tolgee/core"),n=function(){return n=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},n.apply(this,arguments)}; | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */function r(e,n,r,t){return new(r||(r=Promise))((function(o,a){function i(e){try{c(t.next(e))}catch(e){a(e)}}function l(e){try{c(t.throw(e))}catch(e){a(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(i,l)}c((t=t.apply(e,n||[])).next())}))}function t(e,n){var r,t,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,t&&(o=2&a[0]?t.return:a[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,a[1])).done)return o;switch(t=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,t=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=n.call(e,i)}catch(e){a=[6,e],t=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function o(e,n,r){if(r||2===arguments.length)for(var t,o=0,a=n.length;o<a;o++)!t&&o in n||(t||(t=Array.prototype.slice.call(n,0,o)),t[o]=n[o]);return e.concat(t||Array.prototype.slice.call(n))}var a=function(e,n){e.onTranslationChange.subscribe((function(){e.getCachedTranslations().forEach((function(e,r){n.removeResourceBundle(r,"translation"),n.addResources(r,"translation",e)}))})),n.on("languageChanged",(function(n){n&&e.lang!==n&&e.changeLanguage(n)})),n.tolgee=e},i=function(e){return{type:"backend",name:"TolgeeBackend",init:function(){},read:function(n,o,a){return r(this,void 0,void 0,(function(){var r;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e.loadTranslations(n)];case 1:return r=t.sent(),a(null,r),[3,3];case 2:return t.sent(),a(!0),[3,3];case 3:return[2]}}))}))}}},l=function(e,r){var t,a,i;return i="string"==typeof r.postProcess?[r.postProcess,"tolgeeProcessor"]:Array.isArray(r.postProcess)?o(o([],function(e,n){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var t,o,a=r.call(e),i=[];try{for(;(void 0===n||n-- >0)&&!(t=a.next()).done;)i.push(t.value)}catch(e){o={error:e}}finally{try{t&&!t.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}(r.postProcess),!1),["tolgeeProcessor"],!1):["tolgeeProcessor"],n(n({},r),{postProcess:i,i18nFormat:n(n({},null==r?void 0:r.i18nFormat),{bindI18nStore:"added "+(null===(t=r.i18nFormat)||void 0===t?void 0:t.bindI18nStore)||""}),react:n(n({},null==r?void 0:r.react),{bindI18nStore:"added "+(null===(a=r.react)||void 0===a?void 0:a.bindI18nStore)||""})})};exports.tolgeeApply=a,exports.tolgeeBackend=i,exports.tolgeeOptions=l,exports.withTolgee=function(r,t){var o=e.Tolgee.init(n({wrapperMode:"invisible"},t));r.use(i(o)),r.use(function(e){return{type:"postProcessor",name:"tolgeeProcessor",process:function(n,r,t){return e.wrap(r.join("."),void 0,t.defaultValue,n)}}}(o));var c=r.init;return r.init=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];a(o,r);var t={},i=void 0;"object"==typeof e[0]?(t=e[0],i=e[1]):i=e[0];var u=l(0,t),s=c(u,i),f=r.language||t.lng;return f&&(o.lang=f),o.run(),s},r}; | ||
***************************************************************************** */function r(e,n,r,t){return new(r||(r=Promise))((function(o,a){function i(e){try{u(t.next(e))}catch(e){a(e)}}function l(e){try{u(t.throw(e))}catch(e){a(e)}}function u(e){var n;e.done?o(e.value):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(i,l)}u((t=t.apply(e,n||[])).next())}))}function t(e,n){var r,t,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,t&&(o=2&a[0]?t.return:a[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,a[1])).done)return o;switch(t=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,t=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=n.call(e,i)}catch(e){a=[6,e],t=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function o(e,n,r){if(r||2===arguments.length)for(var t,o=0,a=n.length;o<a;o++)!t&&o in n||(t||(t=Array.prototype.slice.call(n,0,o)),t[o]=n[o]);return e.concat(t||Array.prototype.slice.call(n))}var a=function(e,n){e.onTranslationChange.subscribe((function(){e.getCachedTranslations().forEach((function(e,r){n.removeResourceBundle(r,"translation"),n.addResources(r,"translation",e)}))})),n.on("languageChanged",(function(n){n&&e.lang!==n&&e.changeLanguage(n)})),n.tolgee=e},i=function(e){return{type:"backend",name:"TolgeeBackend",init:function(){},read:function(n,o,a){return r(this,void 0,void 0,(function(){var r;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e.loadTranslations(n)];case 1:return r=t.sent(),a(null,r),[3,3];case 2:return t.sent(),a(!0),[3,3];case 3:return[2]}}))}))}}},l=function(e,r){var t,a,i;return i="string"==typeof r.postProcess?[r.postProcess,"tolgeeProcessor"]:Array.isArray(r.postProcess)?o(o([],function(e,n){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var t,o,a=r.call(e),i=[];try{for(;(void 0===n||n-- >0)&&!(t=a.next()).done;)i.push(t.value)}catch(e){o={error:e}}finally{try{t&&!t.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}(r.postProcess),!1),["tolgeeProcessor"],!1):["tolgeeProcessor"],n(n({},r),{postProcess:i,i18nFormat:n(n({},null==r?void 0:r.i18nFormat),{bindI18nStore:"added "+(null===(t=r.i18nFormat)||void 0===t?void 0:t.bindI18nStore)||""}),react:n(n({},null==r?void 0:r.react),{bindI18nStore:"added "+(null===(a=r.react)||void 0===a?void 0:a.bindI18nStore)||""})})};exports.tolgeeApply=a,exports.tolgeeBackend=i,exports.tolgeeOptions=l,exports.withTolgee=function(r,t){var o=e.Tolgee.init(n({wrapperMode:"invisible",languageDetect:!1,languageStore:!1},t));r.use(i(o)),r.use(function(e){return{type:"postProcessor",name:"tolgeeProcessor",process:function(n,r,t){return e.wrap(r.join("."),void 0,t.defaultValue,n)}}}(o));var u=r.init;return r.init=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];a(o,r);var t={},i=void 0;"object"==typeof e[0]?(t=e[0],i=e[1]):i=e[0];var c=l(0,t),s=u(c,i),f=r.language||t.lng;return f&&(o.lang=f),o.run(),s},r}; | ||
//# 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,t=arguments.length;e<t;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o]);return n},r.apply(this,arguments)};function e(n,r,e,t){return new(e||(e=Promise))((function(o,a){function i(n){try{l(t.next(n))}catch(n){a(n)}}function c(n){try{l(t.throw(n))}catch(n){a(n)}}function l(n){var r;n.done?o(n.value):(r=n.value,r instanceof e?r:new e((function(n){n(r)}))).then(i,c)}l((t=t.apply(n,r||[])).next())}))}function t(n,r){var e,t,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(a){return function(c){return function(a){if(e)throw new TypeError("Generator is already executing.");for(;i;)try{if(e=1,t&&(o=2&a[0]?t.return:a[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,a[1])).done)return o;switch(t=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,t=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=r.call(n,i)}catch(n){a=[6,n],t=0}finally{e=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function o(n,r,e){if(e||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 n.concat(t||Array.prototype.slice.call(r))}var a=function(n,r){n.onTranslationChange.subscribe((function(){n.getCachedTranslations().forEach((function(n,e){r.removeResourceBundle(e,"translation"),r.addResources(e,"translation",n)}))})),r.on("languageChanged",(function(r){r&&n.lang!==r&&n.changeLanguage(r)})),r.tolgee=n},i=function(n){return{type:"backend",name:"TolgeeBackend",init:function(){},read:function(r,o,a){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,n.loadTranslations(r)];case 1:return e=t.sent(),a(null,e),[3,3];case 2:return t.sent(),a(!0),[3,3];case 3:return[2]}}))}))}}},c=function(n,e){var t,a,i;return i="string"==typeof e.postProcess?[e.postProcess,"tolgeeProcessor"]:Array.isArray(e.postProcess)?o(o([],function(n,r){var e="function"==typeof Symbol&&n[Symbol.iterator];if(!e)return n;var t,o,a=e.call(n),i=[];try{for(;(void 0===r||r-- >0)&&!(t=a.next()).done;)i.push(t.value)}catch(n){o={error:n}}finally{try{t&&!t.done&&(e=a.return)&&e.call(a)}finally{if(o)throw o.error}}return i}(e.postProcess),!1),["tolgeeProcessor"],!1):["tolgeeProcessor"],r(r({},e),{postProcess:i,i18nFormat:r(r({},null==e?void 0:e.i18nFormat),{bindI18nStore:"added "+(null===(t=e.i18nFormat)||void 0===t?void 0:t.bindI18nStore)||""}),react:r(r({},null==e?void 0:e.react),{bindI18nStore:"added "+(null===(a=e.react)||void 0===a?void 0:a.bindI18nStore)||""})})},l=function(e,t){var o=n.init(r({wrapperMode:"invisible"},t));e.use(i(o)),e.use(function(n){return{type:"postProcessor",name:"tolgeeProcessor",process:function(r,e,t){return n.wrap(e.join("."),void 0,t.defaultValue,r)}}}(o));var l=e.init;return e.init=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];a(o,e);var t={},i=void 0;"object"==typeof n[0]?(t=n[0],i=n[1]):i=n[0];var u=c(0,t),s=l(u,i),f=e.language||t.lng;return f&&(o.lang=f),o.run(),s},e};export{a as tolgeeApply,i as tolgeeBackend,c as tolgeeOptions,l as withTolgee}; | ||
***************************************************************************** */var e=function(){return e=Object.assign||function(n){for(var e,r=1,t=arguments.length;r<t;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n},e.apply(this,arguments)};function r(n,e,r,t){return new(r||(r=Promise))((function(o,a){function i(n){try{l(t.next(n))}catch(n){a(n)}}function c(n){try{l(t.throw(n))}catch(n){a(n)}}function l(n){var e;n.done?o(n.value):(e=n.value,e instanceof r?e:new r((function(n){n(e)}))).then(i,c)}l((t=t.apply(n,e||[])).next())}))}function t(n,e){var r,t,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,t&&(o=2&a[0]?t.return:a[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,a[1])).done)return o;switch(t=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,t=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(n,i)}catch(n){a=[6,n],t=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function o(n,e,r){if(r||2===arguments.length)for(var t,o=0,a=e.length;o<a;o++)!t&&o in e||(t||(t=Array.prototype.slice.call(e,0,o)),t[o]=e[o]);return n.concat(t||Array.prototype.slice.call(e))}var a=function(n,e){n.onTranslationChange.subscribe((function(){n.getCachedTranslations().forEach((function(n,r){e.removeResourceBundle(r,"translation"),e.addResources(r,"translation",n)}))})),e.on("languageChanged",(function(e){e&&n.lang!==e&&n.changeLanguage(e)})),e.tolgee=n},i=function(n){return{type:"backend",name:"TolgeeBackend",init:function(){},read:function(e,o,a){return r(this,void 0,void 0,(function(){var r;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,n.loadTranslations(e)];case 1:return r=t.sent(),a(null,r),[3,3];case 2:return t.sent(),a(!0),[3,3];case 3:return[2]}}))}))}}},c=function(n,r){var t,a,i;return i="string"==typeof r.postProcess?[r.postProcess,"tolgeeProcessor"]:Array.isArray(r.postProcess)?o(o([],function(n,e){var r="function"==typeof Symbol&&n[Symbol.iterator];if(!r)return n;var t,o,a=r.call(n),i=[];try{for(;(void 0===e||e-- >0)&&!(t=a.next()).done;)i.push(t.value)}catch(n){o={error:n}}finally{try{t&&!t.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}(r.postProcess),!1),["tolgeeProcessor"],!1):["tolgeeProcessor"],e(e({},r),{postProcess:i,i18nFormat:e(e({},null==r?void 0:r.i18nFormat),{bindI18nStore:"added "+(null===(t=r.i18nFormat)||void 0===t?void 0:t.bindI18nStore)||""}),react:e(e({},null==r?void 0:r.react),{bindI18nStore:"added "+(null===(a=r.react)||void 0===a?void 0:a.bindI18nStore)||""})})},l=function(r,t){var o=n.init(e({wrapperMode:"invisible",languageDetect:!1,languageStore:!1},t));r.use(i(o)),r.use(function(n){return{type:"postProcessor",name:"tolgeeProcessor",process:function(e,r,t){return n.wrap(r.join("."),void 0,t.defaultValue,e)}}}(o));var l=r.init;return r.init=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];a(o,r);var t={},i=void 0;"object"==typeof n[0]?(t=n[0],i=n[1]):i=n[0];var u=c(0,t),s=l(u,i),f=r.language||t.lng;return f&&(o.lang=f),o.run(),s},r};export{a as tolgeeApply,i as tolgeeBackend,c as tolgeeOptions,l as withTolgee}; | ||
//# sourceMappingURL=tolgee-i18next.esm.js.map |
@@ -175,3 +175,3 @@ (function (global, factory) { | ||
var withTolgee = function (i18n, config) { | ||
var tolgee = core.Tolgee.init(__assign({ wrapperMode: 'invisible' }, config)); | ||
var tolgee = core.Tolgee.init(__assign({ wrapperMode: 'invisible', languageDetect: false, languageStore: false }, config)); | ||
i18n.use(tolgeeBackend(tolgee)); | ||
@@ -178,0 +178,0 @@ i18n.use(tolgeeProcessor(tolgee)); |
@@ -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,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},t.apply(this,arguments)};function r(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function l(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,l)}u((r=r.apply(e,n||[])).next())}))}function o(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=n.call(e,a)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}function i(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}var a=function(e,n){e.onTranslationChange.subscribe((function(){e.getCachedTranslations().forEach((function(e,t){n.removeResourceBundle(t,"translation"),n.addResources(t,"translation",e)}))})),n.on("languageChanged",(function(n){n&&e.lang!==n&&e.changeLanguage(n)})),n.tolgee=e},l=function(e){return{type:"backend",name:"TolgeeBackend",init:function(){},read:function(n,t,i){return r(this,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,e.loadTranslations(n)];case 1:return t=r.sent(),i(null,t),[3,3];case 2:return r.sent(),i(!0),[3,3];case 3:return[2]}}))}))}}},u="tolgeeProcessor",c=function(e,n){var r,o,a;return a="string"==typeof n.postProcess?[n.postProcess,u]:Array.isArray(n.postProcess)?i(i([],function(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,o,i=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}(n.postProcess),!1),[u],!1):[u],t(t({},n),{postProcess:a,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===(o=n.react)||void 0===o?void 0:o.bindI18nStore)||""})})};e.tolgeeApply=a,e.tolgeeBackend=l,e.tolgeeOptions=c,e.withTolgee=function(e,r){var o=n.Tolgee.init(t({wrapperMode:"invisible"},r));e.use(l(o)),e.use(function(e){return{type:"postProcessor",name:"tolgeeProcessor",process:function(n,t,r){return e.wrap(t.join("."),void 0,r.defaultValue,n)}}}(o));var i=e.init;return e.init=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];a(o,e);var r={},l=void 0;"object"==typeof n[0]?(r=n[0],l=n[1]):l=n[0];var u=c(0,r),s=i(u,l),f=e.language||r.lng;return f&&(o.lang=f),o.run(),s},e},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
***************************************************************************** */var t=function(){return t=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},t.apply(this,arguments)};function r(e,n,t,r){return new(t||(t=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function l(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(i,l)}u((r=r.apply(e,n||[])).next())}))}function o(e,n){var t,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;i;)try{if(t=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=n.call(e,i)}catch(e){a=[6,e],r=0}finally{t=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function a(e,n,t){if(t||2===arguments.length)for(var r,o=0,a=n.length;o<a;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}var i=function(e,n){e.onTranslationChange.subscribe((function(){e.getCachedTranslations().forEach((function(e,t){n.removeResourceBundle(t,"translation"),n.addResources(t,"translation",e)}))})),n.on("languageChanged",(function(n){n&&e.lang!==n&&e.changeLanguage(n)})),n.tolgee=e},l=function(e){return{type:"backend",name:"TolgeeBackend",init:function(){},read:function(n,t,a){return r(this,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,e.loadTranslations(n)];case 1:return t=r.sent(),a(null,t),[3,3];case 2:return r.sent(),a(!0),[3,3];case 3:return[2]}}))}))}}},u="tolgeeProcessor",c=function(e,n){var r,o,i;return i="string"==typeof n.postProcess?[n.postProcess,u]:Array.isArray(n.postProcess)?a(a([],function(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,o,a=t.call(e),i=[];try{for(;(void 0===n||n-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(t=a.return)&&t.call(a)}finally{if(o)throw o.error}}return i}(n.postProcess),!1),[u],!1):[u],t(t({},n),{postProcess:i,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===(o=n.react)||void 0===o?void 0:o.bindI18nStore)||""})})};e.tolgeeApply=i,e.tolgeeBackend=l,e.tolgeeOptions=c,e.withTolgee=function(e,r){var o=n.Tolgee.init(t({wrapperMode:"invisible",languageDetect:!1,languageStore:!1},r));e.use(l(o)),e.use(function(e){return{type:"postProcessor",name:"tolgeeProcessor",process:function(n,t,r){return e.wrap(t.join("."),void 0,r.defaultValue,n)}}}(o));var a=e.init;return e.init=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];i(o,e);var r={},l=void 0;"object"==typeof n[0]?(r=n[0],l=n[1]):l=n[0];var u=c(0,r),s=a(u,l),f=e.language||r.lng;return f&&(o.lang=f),o.run(),s},e},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=tolgee-i18next.umd.min.js.map |
{ | ||
"name": "@tolgee/i18next", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"description": "Tolgee i18n integration.", | ||
@@ -61,3 +61,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "3302234c530a50fd20a89ba62e84aa45b880a720", | ||
"gitHead": "a593f31d12feb5c162f6100b92d9ad9850cccfcf", | ||
"publishConfig": { | ||
@@ -70,4 +70,4 @@ "access": "public" | ||
"dependencies": { | ||
"@tolgee/core": "^4.0.0" | ||
"@tolgee/core": "^4.1.0" | ||
} | ||
} |
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
168844
Updated@tolgee/core@^4.1.0