From a3e60f58759ab5b9e2e557cf9648eec07255f2ac Mon Sep 17 00:00:00 2001 From: bbeaulant Date: Wed, 7 Dec 2016 23:13:14 +0100 Subject: [PATCH] + 0.3.2 --- dist/ladb_toolbox.rbz | Bin 365926 -> 367592 bytes src/ladb_toolbox/js/lib/i18next.js | 2261 ----------------- src/ladb_toolbox/js/lib/i18next.min.js | 2 - .../js/plugins/jquery.ladb.toolbox.js | 1 - .../js/templates/twig-templates.js | 2 +- src/ladb_toolbox/twig/tabs/cutlist/_list.twig | 56 +- 6 files changed, 30 insertions(+), 2292 deletions(-) delete mode 100644 src/ladb_toolbox/js/lib/i18next.js delete mode 100644 src/ladb_toolbox/js/lib/i18next.min.js diff --git a/dist/ladb_toolbox.rbz b/dist/ladb_toolbox.rbz index 7c329af67a50eadb3ddb41ce38d2fafc86bf39e9..ea96dc36211a0a19c78f429ff73dc87f77366116 100644 GIT binary patch delta 13289 zcmZX*1ymi)wl%tujk~)`a3>I4g9dkZ*Wk8sciXtT28ZD85InfMyOWpi+EDsYZkaDGrjLN1gC(L#pNLPE6ALPFMxU@nx0NxS^P|CIm%0E9yW z0K@b%qlMkp7vEl0zJJ`Wxkj$nc3am+|uT&*v5mDX)WxZaeW zgA9VoXujK8eDHSD-yQGWny|*&kfQx++YK zVbn$4s)X!EZfC73J&`eQF{M|KIP=y7se&5!oZx-H%p1Eh08;8sS;Lc*)Ey;UK)NQ28@Pf-Uu1lTJk#WO)H(Yy~U_agB&2rLDsK0S6KM%@& zE%xL?LF06={eY{a0RF}tWerEP{gc8wp6Lb4HkM1(jJ%i|iJOFOo$KV6x`KzkXXuth z3CJL1sNmKxFrEq|3#42dSXu?r7V@?k+@b=>3u)K%k4*~B4FMvC5vfA{ouU5D&@Du& zKocPP=-+2O0%MC`DDmb!Y{&vFr)D5J~kcipztGNsh!y8^@E6dMsS5@sH;9_;~ce`tVHW)>G2orm|$$AXOQOT zRJ1JVfCRoZX%U(ky&w{*>t1;o6tb|xJNCvV-xn-MBFx21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EpVVZj{S4mmFeHp!E4FrtRha8q1p;Yblx9Bu%g=Nc}&y)h5MQ$SuPE@~f&OKn&pGVHF7wB`}pDtTF-e8m6xZMuCwhLeT#& z*CcBqgai%^Hl6rauNGAYBcj8BMdAN(Xn;U}y_AlL5K=hd|CIh!vyowii4bNuw|@Yp ze>|2?f6L*^)WI;5^uK(zB*?3O9GCyF;P?K662X8Z2s1pX#{XTXD+$5{->L(Kt?GcO zV1&tk!_~pWlOd|`?wMd1EE7x%YxxVpJN1mgVr;QxE%2YSFJVGtG=mH`CyjSBR?o%{c{pZpIC-vl=G_e!v5 zGYI;>X#XFj|G%8S=lnndbJ%$bM2PY~+RA^W6%dH!U$q`>VG5}bZE)^KSWP+vAGQ_( zL4)P>s)c3{wY?eB0xgS|_KFoWGg{)0?J{Y66lK~zKkL6|VvKx`mZ%)b%BAb(^0 EAF{p4UH||9 diff --git a/src/ladb_toolbox/js/lib/i18next.js b/src/ladb_toolbox/js/lib/i18next.js deleted file mode 100644 index 78fa7a3af..000000000 --- a/src/ladb_toolbox/js/lib/i18next.js +++ /dev/null @@ -1,2261 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global.i18next = factory()); -}(this, (function () { 'use strict'; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; -} : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; -}; - - - - - -var asyncGenerator = function () { - function AwaitValue(value) { - this.value = value; - } - - function AsyncGenerator(gen) { - var front, back; - - function send(key, arg) { - return new Promise(function (resolve, reject) { - var request = { - key: key, - arg: arg, - resolve: resolve, - reject: reject, - next: null - }; - - if (back) { - back = back.next = request; - } else { - front = back = request; - resume(key, arg); - } - }); - } - - function resume(key, arg) { - try { - var result = gen[key](arg); - var value = result.value; - - if (value instanceof AwaitValue) { - Promise.resolve(value.value).then(function (arg) { - resume("next", arg); - }, function (arg) { - resume("throw", arg); - }); - } else { - settle(result.done ? "return" : "normal", result.value); - } - } catch (err) { - settle("throw", err); - } - } - - function settle(type, value) { - switch (type) { - case "return": - front.resolve({ - value: value, - done: true - }); - break; - - case "throw": - front.reject(value); - break; - - default: - front.resolve({ - value: value, - done: false - }); - break; - } - - front = front.next; - - if (front) { - resume(front.key, front.arg); - } else { - back = null; - } - } - - this._invoke = send; - - if (typeof gen.return !== "function") { - this.return = undefined; - } - } - - if (typeof Symbol === "function" && Symbol.asyncIterator) { - AsyncGenerator.prototype[Symbol.asyncIterator] = function () { - return this; - }; - } - - AsyncGenerator.prototype.next = function (arg) { - return this._invoke("next", arg); - }; - - AsyncGenerator.prototype.throw = function (arg) { - return this._invoke("throw", arg); - }; - - AsyncGenerator.prototype.return = function (arg) { - return this._invoke("return", arg); - }; - - return { - wrap: function (fn) { - return function () { - return new AsyncGenerator(fn.apply(this, arguments)); - }; - }, - await: function (value) { - return new AwaitValue(value); - } - }; -}(); - - - - - -var classCallCheck = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -}; - - - - - - - - - -var _extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; -}; - -var get = function get(object, property, receiver) { - if (object === null) object = Function.prototype; - var desc = Object.getOwnPropertyDescriptor(object, property); - - if (desc === undefined) { - var parent = Object.getPrototypeOf(object); - - if (parent === null) { - return undefined; - } else { - return get(parent, property, receiver); - } - } else if ("value" in desc) { - return desc.value; - } else { - var getter = desc.get; - - if (getter === undefined) { - return undefined; - } - - return getter.call(receiver); - } -}; - -var inherits = function (subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; -}; - - - - - - - - - - - -var possibleConstructorReturn = function (self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && (typeof call === "object" || typeof call === "function") ? call : self; -}; - - - -var set = function set(object, property, value, receiver) { - var desc = Object.getOwnPropertyDescriptor(object, property); - - if (desc === undefined) { - var parent = Object.getPrototypeOf(object); - - if (parent !== null) { - set(parent, property, value, receiver); - } - } else if ("value" in desc && desc.writable) { - desc.value = value; - } else { - var setter = desc.set; - - if (setter !== undefined) { - setter.call(receiver, value); - } - } - - return value; -}; - -var slicedToArray = function () { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - return function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (Symbol.iterator in Object(arr)) { - return sliceIterator(arr, i); - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; -}(); - -var consoleLogger = { - type: 'logger', - - log: function log(args) { - this._output('log', args); - }, - warn: function warn(args) { - this._output('warn', args); - }, - error: function error(args) { - this._output('error', args); - }, - _output: function _output(type, args) { - if (console && console[type]) console[type].apply(console, Array.prototype.slice.call(args)); - } -}; - -var Logger = function () { - function Logger(concreteLogger) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - classCallCheck(this, Logger); - - this.init(concreteLogger, options); - } - - Logger.prototype.init = function init(concreteLogger) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - this.prefix = options.prefix || 'i18next:'; - this.logger = concreteLogger || consoleLogger; - this.options = options; - this.debug = options.debug === false ? false : true; - }; - - Logger.prototype.setDebug = function setDebug(bool) { - this.debug = bool; - }; - - Logger.prototype.log = function log() { - this.forward(arguments, 'log', '', true); - }; - - Logger.prototype.warn = function warn() { - this.forward(arguments, 'warn', '', true); - }; - - Logger.prototype.error = function error() { - this.forward(arguments, 'error', ''); - }; - - Logger.prototype.deprecate = function deprecate() { - this.forward(arguments, 'warn', 'WARNING DEPRECATED: ', true); - }; - - Logger.prototype.forward = function forward(args, lvl, prefix, debugOnly) { - if (debugOnly && !this.debug) return; - if (typeof args[0] === 'string') args[0] = prefix + this.prefix + ' ' + args[0]; - this.logger[lvl](args); - }; - - Logger.prototype.create = function create(moduleName) { - var sub = new Logger(this.logger, _extends({ prefix: this.prefix + ':' + moduleName + ':' }, this.options)); - - return sub; - }; - - // createInstance(options = {}) { - // return new Logger(options, callback); - // } - - return Logger; -}(); - - - -var baseLogger = new Logger(); - -var EventEmitter = function () { - function EventEmitter() { - classCallCheck(this, EventEmitter); - - this.observers = {}; - } - - EventEmitter.prototype.on = function on(events, listener) { - var _this = this; - - events.split(' ').forEach(function (event) { - _this.observers[event] = _this.observers[event] || []; - _this.observers[event].push(listener); - }); - }; - - EventEmitter.prototype.off = function off(event, listener) { - var _this2 = this; - - if (!this.observers[event]) { - return; - } - - this.observers[event].forEach(function () { - if (!listener) { - delete _this2.observers[event]; - } else { - var index = _this2.observers[event].indexOf(listener); - if (index > -1) { - _this2.observers[event].splice(index, 1); - } - } - }); - }; - - EventEmitter.prototype.emit = function emit(event) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - if (this.observers[event]) { - this.observers[event].forEach(function (observer) { - observer.apply(undefined, args); - }); - } - - if (this.observers['*']) { - this.observers['*'].forEach(function (observer) { - var _ref; - - observer.apply(observer, (_ref = [event]).concat.apply(_ref, args)); - }); - } - }; - - return EventEmitter; -}(); - -function makeString(object) { - if (object == null) return ''; - return '' + object; -} - -function copy(a, s, t) { - a.forEach(function (m) { - if (s[m]) t[m] = s[m]; - }); -} - -function getLastOfPath(object, path, Empty) { - function cleanKey(key) { - return key && key.indexOf('###') > -1 ? key.replace(/###/g, '.') : key; - } - - var stack = typeof path !== 'string' ? [].concat(path) : path.split('.'); - while (stack.length > 1) { - if (!object) return {}; - - var key = cleanKey(stack.shift()); - if (!object[key] && Empty) object[key] = new Empty(); - object = object[key]; - } - - if (!object) return {}; - return { - obj: object, - k: cleanKey(stack.shift()) - }; -} - -function setPath(object, path, newValue) { - var _getLastOfPath = getLastOfPath(object, path, Object), - obj = _getLastOfPath.obj, - k = _getLastOfPath.k; - - obj[k] = newValue; -} - -function pushPath(object, path, newValue, concat) { - var _getLastOfPath2 = getLastOfPath(object, path, Object), - obj = _getLastOfPath2.obj, - k = _getLastOfPath2.k; - - obj[k] = obj[k] || []; - if (concat) obj[k] = obj[k].concat(newValue); - if (!concat) obj[k].push(newValue); -} - -function getPath(object, path) { - var _getLastOfPath3 = getLastOfPath(object, path), - obj = _getLastOfPath3.obj, - k = _getLastOfPath3.k; - - if (!obj) return undefined; - return obj[k]; -} - -function deepExtend(target, source, overwrite) { - for (var prop in source) { - if (prop in target) { - // If we reached a leaf string in target or source then replace with source or skip depending on the 'overwrite' switch - if (typeof target[prop] === 'string' || target[prop] instanceof String || typeof source[prop] === 'string' || source[prop] instanceof String) { - if (overwrite) target[prop] = source[prop]; - } else { - deepExtend(target[prop], source[prop], overwrite); - } - } else { - target[prop] = source[prop]; - } - }return target; -} - -function regexEscape(str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); -} - -/* eslint-disable */ -var _entityMap = { - "&": "&", - "<": "<", - ">": ">", - '"': '"', - "'": ''', - "/": '/' -}; -/* eslint-enable */ - -function escape(data) { - if (typeof data === 'string') { - return data.replace(/[&<>"'\/]/g, function (s) { - return _entityMap[s]; - }); - } else { - return data; - } -} - -var ResourceStore = function (_EventEmitter) { - inherits(ResourceStore, _EventEmitter); - - function ResourceStore() { - var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { ns: ['translation'], defaultNS: 'translation' }; - classCallCheck(this, ResourceStore); - - var _this = possibleConstructorReturn(this, _EventEmitter.call(this)); - - _this.data = data; - _this.options = options; - return _this; - } - - ResourceStore.prototype.addNamespaces = function addNamespaces(ns) { - if (this.options.ns.indexOf(ns) < 0) { - this.options.ns.push(ns); - } - }; - - ResourceStore.prototype.removeNamespaces = function removeNamespaces(ns) { - var index = this.options.ns.indexOf(ns); - if (index > -1) { - this.options.ns.splice(index, 1); - } - }; - - ResourceStore.prototype.getResource = function getResource(lng, ns, key) { - var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - - var keySeparator = options.keySeparator || this.options.keySeparator; - if (keySeparator === undefined) keySeparator = '.'; - - var path = [lng, ns]; - if (key && typeof key !== 'string') path = path.concat(key); - if (key && typeof key === 'string') path = path.concat(keySeparator ? key.split(keySeparator) : key); - - if (lng.indexOf('.') > -1) { - path = lng.split('.'); - } - - return getPath(this.data, path); - }; - - ResourceStore.prototype.addResource = function addResource(lng, ns, key, value) { - var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : { silent: false }; - - var keySeparator = this.options.keySeparator; - if (keySeparator === undefined) keySeparator = '.'; - - var path = [lng, ns]; - if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key); - - if (lng.indexOf('.') > -1) { - path = lng.split('.'); - value = ns; - ns = path[1]; - } - - this.addNamespaces(ns); - - setPath(this.data, path, value); - - if (!options.silent) this.emit('added', lng, ns, key, value); - }; - - ResourceStore.prototype.addResources = function addResources(lng, ns, resources) { - for (var m in resources) { - if (typeof resources[m] === 'string') this.addResource(lng, ns, m, resources[m], { silent: true }); - } - this.emit('added', lng, ns, resources); - }; - - ResourceStore.prototype.addResourceBundle = function addResourceBundle(lng, ns, resources, deep, overwrite) { - var path = [lng, ns]; - if (lng.indexOf('.') > -1) { - path = lng.split('.'); - deep = resources; - resources = ns; - ns = path[1]; - } - - this.addNamespaces(ns); - - var pack = getPath(this.data, path) || {}; - - if (deep) { - deepExtend(pack, resources, overwrite); - } else { - pack = _extends({}, pack, resources); - } - - setPath(this.data, path, pack); - - this.emit('added', lng, ns, resources); - }; - - ResourceStore.prototype.removeResourceBundle = function removeResourceBundle(lng, ns) { - if (this.hasResourceBundle(lng, ns)) { - delete this.data[lng][ns]; - } - this.removeNamespaces(ns); - - this.emit('removed', lng, ns); - }; - - ResourceStore.prototype.hasResourceBundle = function hasResourceBundle(lng, ns) { - return this.getResource(lng, ns) !== undefined; - }; - - ResourceStore.prototype.getResourceBundle = function getResourceBundle(lng, ns) { - if (!ns) ns = this.options.defaultNS; - - // TODO: COMPATIBILITY remove extend in v2.1.0 - if (this.options.compatibilityAPI === 'v1') return _extends({}, this.getResource(lng, ns)); - - return this.getResource(lng, ns); - }; - - ResourceStore.prototype.toJSON = function toJSON() { - return this.data; - }; - - return ResourceStore; -}(EventEmitter); - -var postProcessor = { - - processors: {}, - - addPostProcessor: function addPostProcessor(module) { - this.processors[module.name] = module; - }, - handle: function handle(processors, value, key, options, translator) { - var _this = this; - - processors.forEach(function (processor) { - if (_this.processors[processor]) value = _this.processors[processor].process(value, key, options, translator); - }); - - return value; - } -}; - -function convertInterpolation(options) { - - options.interpolation = { - unescapeSuffix: 'HTML' - }; - - options.interpolation.prefix = options.interpolationPrefix || '__'; - options.interpolation.suffix = options.interpolationSuffix || '__'; - options.interpolation.escapeValue = options.escapeInterpolation || false; - - options.interpolation.nestingPrefix = options.reusePrefix || '$t('; - options.interpolation.nestingSuffix = options.reuseSuffix || ')'; - - return options; -} - -function convertAPIOptions(options) { - if (options.resStore) options.resources = options.resStore; - - if (options.ns && options.ns.defaultNs) { - options.defaultNS = options.ns.defaultNs; - options.ns = options.ns.namespaces; - } else { - options.defaultNS = options.ns || 'translation'; - } - - if (options.fallbackToDefaultNS && options.defaultNS) options.fallbackNS = options.defaultNS; - - options.saveMissing = options.sendMissing; - options.saveMissingTo = options.sendMissingTo || 'current'; - options.returnNull = options.fallbackOnNull ? false : true; - options.returnEmptyString = options.fallbackOnEmpty ? false : true; - options.returnObjects = options.returnObjectTrees; - options.joinArrays = '\n'; - - options.returnedObjectHandler = options.objectTreeKeyHandler; - options.parseMissingKeyHandler = options.parseMissingKey; - options.appendNamespaceToMissingKey = true; - - options.nsSeparator = options.nsseparator; - options.keySeparator = options.keyseparator; - - if (options.shortcutFunction === 'sprintf') { - options.overloadTranslationOptionHandler = function (args) { - var values = []; - - for (var i = 1; i < args.length; i++) { - values.push(args[i]); - } - - return { - postProcess: 'sprintf', - sprintf: values - }; - }; - } - - options.whitelist = options.lngWhitelist; - options.preload = options.preload; - if (options.load === 'current') options.load = 'currentOnly'; - if (options.load === 'unspecific') options.load = 'languageOnly'; - - // backend - options.backend = options.backend || {}; - options.backend.loadPath = options.resGetPath || 'locales/__lng__/__ns__.json'; - options.backend.addPath = options.resPostPath || 'locales/add/__lng__/__ns__'; - options.backend.allowMultiLoading = options.dynamicLoad; - - // cache - options.cache = options.cache || {}; - options.cache.prefix = 'res_'; - options.cache.expirationTime = 7 * 24 * 60 * 60 * 1000; - options.cache.enabled = options.useLocalStorage ? true : false; - - options = convertInterpolation(options); - if (options.defaultVariables) options.interpolation.defaultVariables = options.defaultVariables; - - // TODO: deprecation - // if (options.getAsync === false) throw deprecation error - - return options; -} - -function convertJSONOptions(options) { - options = convertInterpolation(options); - options.joinArrays = '\n'; - - return options; -} - -function convertTOptions(options) { - if (options.interpolationPrefix || options.interpolationSuffix || options.escapeInterpolation) { - options = convertInterpolation(options); - } - - options.nsSeparator = options.nsseparator; - options.keySeparator = options.keyseparator; - - options.returnObjects = options.returnObjectTrees; - - return options; -} - -function appendBackwardsAPI(i18n) { - i18n.lng = function () { - baseLogger.deprecate('i18next.lng() can be replaced by i18next.language for detected language or i18next.languages for languages ordered by translation lookup.'); - return i18n.services.languageUtils.toResolveHierarchy(i18n.language)[0]; - }; - - i18n.preload = function (lngs, cb) { - baseLogger.deprecate('i18next.preload() can be replaced with i18next.loadLanguages()'); - i18n.loadLanguages(lngs, cb); - }; - - i18n.setLng = function (lng, options, callback) { - baseLogger.deprecate('i18next.setLng() can be replaced with i18next.changeLanguage() or i18next.getFixedT() to get a translation function with fixed language or namespace.'); - if (typeof options === 'function') { - callback = options; - options = {}; - } - if (!options) options = {}; - - if (options.fixLng === true) { - if (callback) return callback(null, i18n.getFixedT(lng)); - } - - i18n.changeLanguage(lng, callback); - }; - - i18n.addPostProcessor = function (name, fc) { - baseLogger.deprecate('i18next.addPostProcessor() can be replaced by i18next.use({ type: \'postProcessor\', name: \'name\', process: fc })'); - i18n.use({ - type: 'postProcessor', - name: name, - process: fc - }); - }; -} - -var Translator = function (_EventEmitter) { - inherits(Translator, _EventEmitter); - - function Translator(services) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - classCallCheck(this, Translator); - - var _this = possibleConstructorReturn(this, _EventEmitter.call(this)); - - copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector'], services, _this); - - _this.options = options; - _this.logger = baseLogger.create('translator'); - return _this; - } - - Translator.prototype.changeLanguage = function changeLanguage(lng) { - if (lng) this.language = lng; - }; - - Translator.prototype.exists = function exists(key) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { interpolation: {} }; - - if (this.options.compatibilityAPI === 'v1') { - options = convertTOptions(options); - } - - return this.resolve(key, options) !== undefined; - }; - - Translator.prototype.extractFromKey = function extractFromKey(key, options) { - var nsSeparator = options.nsSeparator || this.options.nsSeparator; - if (nsSeparator === undefined) nsSeparator = ':'; - - var namespaces = options.ns || this.options.defaultNS; - if (nsSeparator && key.indexOf(nsSeparator) > -1) { - var parts = key.split(nsSeparator); - namespaces = parts[0]; - key = parts[1]; - } - if (typeof namespaces === 'string') namespaces = [namespaces]; - - return { - key: key, - namespaces: namespaces - }; - }; - - Translator.prototype.translate = function translate(keys) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') { - options = this.options.overloadTranslationOptionHandler(arguments); - } else if (this.options.compatibilityAPI === 'v1') { - options = convertTOptions(options); - } - - // non valid keys handling - if (keys === undefined || keys === null || keys === '') return ''; - if (typeof keys === 'number') keys = String(keys); - if (typeof keys === 'string') keys = [keys]; - - // return key on CIMode - var lng = options.lng || this.language; - if (lng && lng.toLowerCase() === 'cimode') return keys[keys.length - 1]; - - // separators - var keySeparator = options.keySeparator || this.options.keySeparator || '.'; - - // get namespace(s) - - var _extractFromKey = this.extractFromKey(keys[keys.length - 1], options), - key = _extractFromKey.key, - namespaces = _extractFromKey.namespaces; - - var namespace = namespaces[namespaces.length - 1]; - - // resolve from store - var res = this.resolve(keys, options); - - var resType = Object.prototype.toString.apply(res); - var noObject = ['[object Number]', '[object Function]', '[object RegExp]']; - var joinArrays = options.joinArrays !== undefined ? options.joinArrays : this.options.joinArrays; - - // object - if (res && typeof res !== 'string' && noObject.indexOf(resType) < 0 && !(joinArrays && resType === '[object Array]')) { - if (!options.returnObjects && !this.options.returnObjects) { - this.logger.warn('accessing an object - but returnObjects options is not enabled!'); - return this.options.returnedObjectHandler ? this.options.returnedObjectHandler(key, res, options) : 'key \'' + key + ' (' + this.language + ')\' returned an object instead of string.'; - } - - var copy$$1 = resType === '[object Array]' ? [] : {}; // apply child translation on a copy - - for (var m in res) { - copy$$1[m] = this.translate('' + key + keySeparator + m, _extends({ joinArrays: false, ns: namespaces }, options)); - } - res = copy$$1; - } - // array special treatment - else if (joinArrays && resType === '[object Array]') { - res = res.join(joinArrays); - if (res) res = this.extendTranslation(res, key, options); - } - // string, empty or null - else { - var usedDefault = false, - usedKey = false; - - // fallback value - if (!this.isValidLookup(res) && options.defaultValue !== undefined) { - usedDefault = true; - res = options.defaultValue; - } - if (!this.isValidLookup(res)) { - usedKey = true; - res = key; - } - - // save missing - if (usedKey || usedDefault) { - this.logger.log('missingKey', lng, namespace, key, res); - - var lngs = []; - var fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, options.lng || this.language); - if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) { - for (var i = 0; i < fallbackLngs.length; i++) { - lngs.push(fallbackLngs[i]); - } - } else if (this.options.saveMissingTo === 'all') { - lngs = this.languageUtils.toResolveHierarchy(options.lng || this.language); - } else { - //(this.options.saveMissingTo === 'current' || (this.options.saveMissingTo === 'fallback' && this.options.fallbackLng[0] === false) ) { - lngs.push(options.lng || this.language); - } - - if (this.options.saveMissing) { - if (this.options.missingKeyHandler) { - this.options.missingKeyHandler(lngs, namespace, key, res); - } else if (this.backendConnector && this.backendConnector.saveMissing) { - this.backendConnector.saveMissing(lngs, namespace, key, res); - } - } - - this.emit('missingKey', lngs, namespace, key, res); - } - - // extend - res = this.extendTranslation(res, key, options); - - // append namespace if still key - if (usedKey && res === key && this.options.appendNamespaceToMissingKey) res = namespace + ':' + key; - - // parseMissingKeyHandler - if (usedKey && this.options.parseMissingKeyHandler) res = this.options.parseMissingKeyHandler(res); - } - - // return - return res; - }; - - Translator.prototype.extendTranslation = function extendTranslation(res, key, options) { - var _this2 = this; - - if (options.interpolation) this.interpolator.init(_extends({}, options, { interpolation: _extends({}, this.options.interpolation, options.interpolation) })); - - // interpolate - var data = options.replace && typeof options.replace !== 'string' ? options.replace : options; - if (this.options.interpolation.defaultVariables) data = _extends({}, this.options.interpolation.defaultVariables, data); - res = this.interpolator.interpolate(res, data, this.language); - - // nesting - res = this.interpolator.nest(res, function () { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _this2.translate.apply(_this2, args); - }, options); - - if (options.interpolation) this.interpolator.reset(); - - // post process - var postProcess = options.postProcess || this.options.postProcess; - var postProcessorNames = typeof postProcess === 'string' ? [postProcess] : postProcess; - - if (res !== undefined && postProcessorNames && postProcessorNames.length && options.applyPostProcessor !== false) { - res = postProcessor.handle(postProcessorNames, res, key, options, this); - } - - return res; - }; - - Translator.prototype.resolve = function resolve(keys) { - var _this3 = this; - - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var found = void 0; - - if (typeof keys === 'string') keys = [keys]; - - // forEach possible key - keys.forEach(function (k) { - if (_this3.isValidLookup(found)) return; - - var _extractFromKey2 = _this3.extractFromKey(k, options), - key = _extractFromKey2.key, - namespaces = _extractFromKey2.namespaces; - - if (_this3.options.fallbackNS) namespaces = namespaces.concat(_this3.options.fallbackNS); - - var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string'; - var needsContextHandling = options.context !== undefined && typeof options.context === 'string' && options.context !== ''; - - var codes = options.lngs ? options.lngs : _this3.languageUtils.toResolveHierarchy(options.lng || _this3.language); - - namespaces.forEach(function (ns) { - if (_this3.isValidLookup(found)) return; - - codes.forEach(function (code) { - if (_this3.isValidLookup(found)) return; - - var finalKey = key; - var finalKeys = [finalKey]; - - var pluralSuffix = void 0; - if (needsPluralHandling) pluralSuffix = _this3.pluralResolver.getSuffix(code, options.count); - - // fallback for plural if context not found - if (needsPluralHandling && needsContextHandling) finalKeys.push(finalKey + pluralSuffix); - - // get key for context if needed - if (needsContextHandling) finalKeys.push(finalKey += '' + _this3.options.contextSeparator + options.context); - - // get key for plural if needed - if (needsPluralHandling) finalKeys.push(finalKey += pluralSuffix); - - // iterate over finalKeys starting with most specific pluralkey (-> contextkey only) -> singularkey only - var possibleKey = void 0; - while (possibleKey = finalKeys.pop()) { - if (_this3.isValidLookup(found)) continue; - found = _this3.getResource(code, ns, possibleKey, options); - } - }); - }); - }); - - return found; - }; - - Translator.prototype.isValidLookup = function isValidLookup(res) { - return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === ''); - }; - - Translator.prototype.getResource = function getResource(code, ns, key) { - var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - - return this.resourceStore.getResource(code, ns, key, options); - }; - - return Translator; -}(EventEmitter); - -function capitalize(string) { - return string.charAt(0).toUpperCase() + string.slice(1); -} - -var LanguageUtil = function () { - function LanguageUtil(options) { - classCallCheck(this, LanguageUtil); - - this.options = options; - - this.whitelist = this.options.whitelist || false; - this.logger = baseLogger.create('languageUtils'); - } - - LanguageUtil.prototype.getLanguagePartFromCode = function getLanguagePartFromCode(code) { - if (code.indexOf('-') < 0) return code; - - var specialCases = ['NB-NO', 'NN-NO', 'nb-NO', 'nn-NO', 'nb-no', 'nn-no']; - var p = code.split('-'); - return this.formatLanguageCode(specialCases.indexOf(code) > -1 ? p[1].toLowerCase() : p[0]); - }; - - LanguageUtil.prototype.getScriptPartFromCode = function getScriptPartFromCode(code) { - if (code.indexOf('-') < 0) return null; - - var p = code.split('-'); - if (p.length === 2) return null; - p.pop(); - return this.formatLanguageCode(p.join('-')); - }; - - LanguageUtil.prototype.getLanguagePartFromCode = function getLanguagePartFromCode(code) { - if (code.indexOf('-') < 0) return code; - - var specialCases = ['NB-NO', 'NN-NO', 'nb-NO', 'nn-NO', 'nb-no', 'nn-no']; - var p = code.split('-'); - return this.formatLanguageCode(specialCases.indexOf(code) > -1 ? p[1].toLowerCase() : p[0]); - }; - - LanguageUtil.prototype.formatLanguageCode = function formatLanguageCode(code) { - // http://www.iana.org/assignments/language-tags/language-tags.xhtml - if (typeof code === 'string' && code.indexOf('-') > -1) { - var specialCases = ['hans', 'hant', 'latn', 'cyrl', 'cans', 'mong', 'arab']; - var p = code.split('-'); - - if (this.options.lowerCaseLng) { - p = p.map(function (part) { - return part.toLowerCase(); - }); - } else if (p.length === 2) { - p[0] = p[0].toLowerCase(); - p[1] = p[1].toUpperCase(); - - if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase()); - } else if (p.length === 3) { - p[0] = p[0].toLowerCase(); - - // if lenght 2 guess it's a country - if (p[1].length === 2) p[1] = p[1].toUpperCase(); - if (p[0] !== 'sgn' && p[2].length === 2) p[2] = p[2].toUpperCase(); - - if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase()); - if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize(p[2].toLowerCase()); - } - - return p.join('-'); - } else { - return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code; - } - }; - - LanguageUtil.prototype.isWhitelisted = function isWhitelisted(code, exactMatch) { - if (this.options.load === 'languageOnly' || this.options.nonExplicitWhitelist && !exactMatch) { - code = this.getLanguagePartFromCode(code); - } - return !this.whitelist || !this.whitelist.length || this.whitelist.indexOf(code) > -1 ? true : false; - }; - - LanguageUtil.prototype.getFallbackCodes = function getFallbackCodes(fallbacks, code) { - if (!fallbacks) return []; - if (typeof fallbacks === 'string') fallbacks = [fallbacks]; - if (Object.prototype.toString.apply(fallbacks) === '[object Array]') return fallbacks; - - // asume we have an object defining fallbacks - var found = fallbacks[code]; - if (!found) found = fallbacks[this.getScriptPartFromCode(code)]; - if (!found) found = fallbacks[this.formatLanguageCode(code)]; - if (!found) found = fallbacks.default; - - return found || []; - }; - - LanguageUtil.prototype.toResolveHierarchy = function toResolveHierarchy(code, fallbackCode) { - var _this = this; - - var fallbackCodes = this.getFallbackCodes(fallbackCode || this.options.fallbackLng || [], code); - - var codes = []; - var addCode = function addCode(code) { - var exactMatch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (!code) return; - if (_this.isWhitelisted(code, exactMatch)) { - codes.push(code); - } else { - _this.logger.warn('rejecting non-whitelisted language code: ' + code); - } - }; - - if (typeof code === 'string' && code.indexOf('-') > -1) { - if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code), true); - if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code), true); - if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code)); - } else if (typeof code === 'string') { - addCode(this.formatLanguageCode(code)); - } - - fallbackCodes.forEach(function (fc) { - if (codes.indexOf(fc) < 0) addCode(_this.formatLanguageCode(fc)); - }); - - return codes; - }; - - return LanguageUtil; -}(); - -// definition http://translate.sourceforge.net/wiki/l10n/pluralforms -/* eslint-disable */ -var sets = [{ lngs: ['ach', 'ak', 'am', 'arn', 'br', 'fil', 'gun', 'ln', 'mfe', 'mg', 'mi', 'oc', 'tg', 'ti', 'tr', 'uz', 'wa'], nr: [1, 2], fc: 1 }, { lngs: ['af', 'an', 'ast', 'az', 'bg', 'bn', 'ca', 'da', 'de', 'dev', 'el', 'en', 'eo', 'es', 'es_ar', 'et', 'eu', 'fi', 'fo', 'fur', 'fy', 'gl', 'gu', 'ha', 'he', 'hi', 'hu', 'hy', 'ia', 'it', 'kn', 'ku', 'lb', 'mai', 'ml', 'mn', 'mr', 'nah', 'nap', 'nb', 'ne', 'nl', 'nn', 'no', 'nso', 'pa', 'pap', 'pms', 'ps', 'pt', 'pt_br', 'rm', 'sco', 'se', 'si', 'so', 'son', 'sq', 'sv', 'sw', 'ta', 'te', 'tk', 'ur', 'yo'], nr: [1, 2], fc: 2 }, { lngs: ['ay', 'bo', 'cgg', 'fa', 'id', 'ja', 'jbo', 'ka', 'kk', 'km', 'ko', 'ky', 'lo', 'ms', 'sah', 'su', 'th', 'tt', 'ug', 'vi', 'wo', 'zh'], nr: [1], fc: 3 }, { lngs: ['be', 'bs', 'dz', 'hr', 'ru', 'sr', 'uk'], nr: [1, 2, 5], fc: 4 }, { lngs: ['ar'], nr: [0, 1, 2, 3, 11, 100], fc: 5 }, { lngs: ['cs', 'sk'], nr: [1, 2, 5], fc: 6 }, { lngs: ['csb', 'pl'], nr: [1, 2, 5], fc: 7 }, { lngs: ['cy'], nr: [1, 2, 3, 8], fc: 8 }, { lngs: ['fr'], nr: [1, 2], fc: 9 }, { lngs: ['ga'], nr: [1, 2, 3, 7, 11], fc: 10 }, { lngs: ['gd'], nr: [1, 2, 3, 20], fc: 11 }, { lngs: ['is'], nr: [1, 2], fc: 12 }, { lngs: ['jv'], nr: [0, 1], fc: 13 }, { lngs: ['kw'], nr: [1, 2, 3, 4], fc: 14 }, { lngs: ['lt'], nr: [1, 2, 10], fc: 15 }, { lngs: ['lv'], nr: [1, 2, 0], fc: 16 }, { lngs: ['mk'], nr: [1, 2], fc: 17 }, { lngs: ['mnk'], nr: [0, 1, 2], fc: 18 }, { lngs: ['mt'], nr: [1, 2, 11, 20], fc: 19 }, { lngs: ['or'], nr: [2, 1], fc: 2 }, { lngs: ['ro'], nr: [1, 2, 20], fc: 20 }, { lngs: ['sl'], nr: [5, 1, 2, 3], fc: 21 }]; - -var _rulesPluralsTypes = { - 1: function _(n) { - return Number(n > 1); - }, - 2: function _(n) { - return Number(n != 1); - }, - 3: function _(n) { - return 0; - }, - 4: function _(n) { - return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2); - }, - 5: function _(n) { - return Number(n === 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5); - }, - 6: function _(n) { - return Number(n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2); - }, - 7: function _(n) { - return Number(n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2); - }, - 8: function _(n) { - return Number(n == 1 ? 0 : n == 2 ? 1 : n != 8 && n != 11 ? 2 : 3); - }, - 9: function _(n) { - return Number(n >= 2); - }, - 10: function _(n) { - return Number(n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4); - }, - 11: function _(n) { - return Number(n == 1 || n == 11 ? 0 : n == 2 || n == 12 ? 1 : n > 2 && n < 20 ? 2 : 3); - }, - 12: function _(n) { - return Number(n % 10 != 1 || n % 100 == 11); - }, - 13: function _(n) { - return Number(n !== 0); - }, - 14: function _(n) { - return Number(n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3); - }, - 15: function _(n) { - return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2); - }, - 16: function _(n) { - return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2); - }, - 17: function _(n) { - return Number(n == 1 || n % 10 == 1 ? 0 : 1); - }, - 18: function _(n) { - return Number(n == 0 ? 0 : n == 1 ? 1 : 2); - }, - 19: function _(n) { - return Number(n == 1 ? 0 : n === 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3); - }, - 20: function _(n) { - return Number(n == 1 ? 0 : n === 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2); - }, - 21: function _(n) { - return Number(n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0); - } -}; -/* eslint-enable */ - -function createRules() { - var l, - rules = {}; - sets.forEach(function (set$$1) { - set$$1.lngs.forEach(function (l) { - return rules[l] = { - numbers: set$$1.nr, - plurals: _rulesPluralsTypes[set$$1.fc] - }; - }); - }); - return rules; -} - -var PluralResolver = function () { - function PluralResolver(languageUtils) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - classCallCheck(this, PluralResolver); - - this.languageUtils = languageUtils; - this.options = options; - - this.logger = baseLogger.create('pluralResolver'); - - this.rules = createRules(); - } - - PluralResolver.prototype.addRule = function addRule(lng, obj) { - this.rules[lng] = obj; - }; - - PluralResolver.prototype.getRule = function getRule(code) { - return this.rules[this.languageUtils.getLanguagePartFromCode(code)]; - }; - - PluralResolver.prototype.needsPlural = function needsPlural(code) { - var rule = this.getRule(code); - - return rule && rule.numbers.length <= 1 ? false : true; - }; - - PluralResolver.prototype.getSuffix = function getSuffix(code, count) { - var _this = this; - - var rule = this.getRule(code); - - if (rule) { - var _ret = function () { - if (rule.numbers.length === 1) return { - v: '' - }; // only singular - - var idx = rule.noAbs ? rule.plurals(count) : rule.plurals(Math.abs(count)); - var suffix = rule.numbers[idx]; - - // special treatment for lngs only having singular and plural - if (rule.numbers.length === 2 && rule.numbers[0] === 1) { - if (suffix === 2) { - suffix = 'plural'; - } else if (suffix === 1) { - suffix = ''; - } - } - - var returnSuffix = function returnSuffix() { - return _this.options.prepend && suffix.toString() ? _this.options.prepend + suffix.toString() : suffix.toString(); - }; - - // COMPATIBILITY JSON - // v1 - if (_this.options.compatibilityJSON === 'v1') { - if (suffix === 1) return { - v: '' - }; - if (typeof suffix === 'number') return { - v: '_plural_' + suffix.toString() - }; - return { - v: returnSuffix() - }; - } - // v2 - else if (_this.options.compatibilityJSON === 'v2' || rule.numbers.length === 2 && rule.numbers[0] === 1) { - return { - v: returnSuffix() - }; - } - // v3 - gettext index - else if (rule.numbers.length === 2 && rule.numbers[0] === 1) { - return { - v: returnSuffix() - }; - } - return { - v: _this.options.prepend && idx.toString() ? _this.options.prepend + idx.toString() : idx.toString() - }; - }(); - - if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; - } else { - this.logger.warn('no plural rule found for: ' + code); - return ''; - } - }; - - return PluralResolver; -}(); - -var Interpolator = function () { - function Interpolator() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - classCallCheck(this, Interpolator); - - this.logger = baseLogger.create('interpolator'); - - this.init(options, true); - } - - Interpolator.prototype.init = function init() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var reset = arguments[1]; - - if (reset) { - this.options = options; - this.format = options.interpolation && options.interpolation.format || function (value) { - return value; - }; - this.escape = options.interpolation && options.interpolation.escape || escape; - } - if (!options.interpolation) options.interpolation = { escapeValue: true }; - - var iOpts = options.interpolation; - - this.escapeValue = iOpts.escapeValue !== undefined ? iOpts.escapeValue : true; - - this.prefix = iOpts.prefix ? regexEscape(iOpts.prefix) : iOpts.prefixEscaped || '{{'; - this.suffix = iOpts.suffix ? regexEscape(iOpts.suffix) : iOpts.suffixEscaped || '}}'; - this.formatSeparator = iOpts.formatSeparator ? regexEscape(iOpts.formatSeparator) : iOpts.formatSeparator || ','; - - this.unescapePrefix = iOpts.unescapeSuffix ? '' : iOpts.unescapePrefix || '-'; - this.unescapeSuffix = this.unescapePrefix ? '' : iOpts.unescapeSuffix || ''; - - this.nestingPrefix = iOpts.nestingPrefix ? regexEscape(iOpts.nestingPrefix) : iOpts.nestingPrefixEscaped || regexEscape('$t('); - this.nestingSuffix = iOpts.nestingSuffix ? regexEscape(iOpts.nestingSuffix) : iOpts.nestingSuffixEscaped || regexEscape(')'); - - // the regexp - this.resetRegExp(); - }; - - Interpolator.prototype.reset = function reset() { - if (this.options) this.init(this.options); - }; - - Interpolator.prototype.resetRegExp = function resetRegExp() { - // the regexp - var regexpStr = this.prefix + '(.+?)' + this.suffix; - this.regexp = new RegExp(regexpStr, 'g'); - - var regexpUnescapeStr = this.prefix + this.unescapePrefix + '(.+?)' + this.unescapeSuffix + this.suffix; - this.regexpUnescape = new RegExp(regexpUnescapeStr, 'g'); - - var nestingRegexpStr = this.nestingPrefix + '(.+?)' + this.nestingSuffix; - this.nestingRegexp = new RegExp(nestingRegexpStr, 'g'); - }; - - Interpolator.prototype.interpolate = function interpolate(str, data, lng) { - var _this = this; - - var match = void 0, - value = void 0; - - function regexSafe(val) { - return val.replace(/\$/g, '$$$$'); - } - - var handleFormat = function handleFormat(key) { - if (key.indexOf(_this.formatSeparator) < 0) return getPath(data, key); - - var p = key.split(_this.formatSeparator); - var k = p.shift().trim(); - var f = p.join(_this.formatSeparator).trim(); - - return _this.format(getPath(data, k), f, lng); - }; - - this.resetRegExp(); - - // unescape if has unescapePrefix/Suffix - while (match = this.regexpUnescape.exec(str)) { - var _value = handleFormat(match[1].trim()); - str = str.replace(match[0], _value); - this.regexpUnescape.lastIndex = 0; - } - - // regular escape on demand - while (match = this.regexp.exec(str)) { - value = handleFormat(match[1].trim()); - if (typeof value !== 'string') value = makeString(value); - if (!value) { - this.logger.warn('missed to pass in variable ' + match[1] + ' for interpolating ' + str); - value = ''; - } - value = this.escapeValue ? regexSafe(this.escape(value)) : regexSafe(value); - str = str.replace(match[0], value); - this.regexp.lastIndex = 0; - } - return str; - }; - - Interpolator.prototype.nest = function nest(str, fc) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - var match = void 0, - value = void 0; - - var clonedOptions = JSON.parse(JSON.stringify(options)); - clonedOptions.applyPostProcessor = false; // avoid post processing on nested lookup - - function regexSafe(val) { - return val.replace(/\$/g, '$$$$'); - } - - // if value is something like "myKey": "lorem $(anotherKey, { "count": {{aValueInOptions}} })" - function handleHasOptions(key) { - if (key.indexOf(',') < 0) return key; - - var p = key.split(','); - key = p.shift(); - var optionsString = p.join(','); - optionsString = this.interpolate(optionsString, clonedOptions); - optionsString = optionsString.replace(/'/g, '"'); - - try { - clonedOptions = JSON.parse(optionsString); - } catch (e) { - this.logger.error('failed parsing options string in nesting for key ' + key, e); - } - - return key; - } - - // regular escape on demand - while (match = this.nestingRegexp.exec(str)) { - value = fc(handleHasOptions.call(this, match[1].trim()), clonedOptions); - if (typeof value !== 'string') value = makeString(value); - if (!value) { - this.logger.warn('missed to pass in variable ' + match[1] + ' for interpolating ' + str); - value = ''; - } - value = this.escapeValue ? regexSafe(escape(value)) : regexSafe(value); - str = str.replace(match[0], value); - this.regexp.lastIndex = 0; - } - return str; - }; - - return Interpolator; -}(); - -function remove(arr, what) { - var found = arr.indexOf(what); - - while (found !== -1) { - arr.splice(found, 1); - found = arr.indexOf(what); - } -} - -var Connector = function (_EventEmitter) { - inherits(Connector, _EventEmitter); - - function Connector(backend, store, services) { - var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - classCallCheck(this, Connector); - - var _this = possibleConstructorReturn(this, _EventEmitter.call(this)); - - _this.backend = backend; - _this.store = store; - _this.services = services; - _this.options = options; - _this.logger = baseLogger.create('backendConnector'); - - _this.state = {}; - _this.queue = []; - - _this.backend && _this.backend.init && _this.backend.init(services, options.backend, options); - return _this; - } - - Connector.prototype.queueLoad = function queueLoad(languages, namespaces, callback) { - var _this2 = this; - - // find what needs to be loaded - var toLoad = [], - pending = [], - toLoadLanguages = [], - toLoadNamespaces = []; - - languages.forEach(function (lng) { - var hasAllNamespaces = true; - - namespaces.forEach(function (ns) { - var name = lng + '|' + ns; - - if (_this2.store.hasResourceBundle(lng, ns)) { - _this2.state[name] = 2; // loaded - } else if (_this2.state[name] < 0) { - // nothing to do for err - } else if (_this2.state[name] === 1) { - if (pending.indexOf(name) < 0) pending.push(name); - } else { - _this2.state[name] = 1; // pending - - hasAllNamespaces = false; - - if (pending.indexOf(name) < 0) pending.push(name); - if (toLoad.indexOf(name) < 0) toLoad.push(name); - if (toLoadNamespaces.indexOf(ns) < 0) toLoadNamespaces.push(ns); - } - }); - - if (!hasAllNamespaces) toLoadLanguages.push(lng); - }); - - if (toLoad.length || pending.length) { - this.queue.push({ - pending: pending, - loaded: {}, - errors: [], - callback: callback - }); - } - - return { - toLoad: toLoad, - pending: pending, - toLoadLanguages: toLoadLanguages, - toLoadNamespaces: toLoadNamespaces - }; - }; - - Connector.prototype.loaded = function loaded(name, err, data) { - var _this3 = this; - - var _name$split = name.split('|'), - _name$split2 = slicedToArray(_name$split, 2), - lng = _name$split2[0], - ns = _name$split2[1]; - - if (err) this.emit('failedLoading', lng, ns, err); - - if (data) { - this.store.addResourceBundle(lng, ns, data); - } - - // set loaded - this.state[name] = err ? -1 : 2; - // callback if ready - this.queue.forEach(function (q) { - pushPath(q.loaded, [lng], ns); - remove(q.pending, name); - - if (err) q.errors.push(err); - - if (q.pending.length === 0 && !q.done) { - q.errors.length ? q.callback(q.errors) : q.callback(); - _this3.emit('loaded', q.loaded); - q.done = true; - } - }); - - // remove done load requests - this.queue = this.queue.filter(function (q) { - return !q.done; - }); - }; - - Connector.prototype.read = function read(lng, ns, fcName, tried, wait, callback) { - var _this4 = this; - - if (!tried) tried = 0; - if (!wait) wait = 250; - - if (!lng.length) return callback(null, {}); // noting to load - - this.backend[fcName](lng, ns, function (err, data) { - if (err && data /* = retryFlag */ && tried < 5) { - setTimeout(function () { - _this4.read.call(_this4, lng, ns, fcName, ++tried, wait * 2, callback); - }, wait); - return; - } - callback(err, data); - }); - }; - - Connector.prototype.load = function load(languages, namespaces, callback) { - var _this5 = this; - - if (!this.backend) { - this.logger.warn('No backend was added via i18next.use. Will not load resources.'); - return callback && callback(); - } - var options = _extends({}, this.backend.options, this.options.backend); - - if (typeof languages === 'string') languages = this.services.languageUtils.toResolveHierarchy(languages); - if (typeof namespaces === 'string') namespaces = [namespaces]; - - var toLoad = this.queueLoad(languages, namespaces, callback); - if (!toLoad.toLoad.length) { - if (!toLoad.pending.length) callback(); // nothing to load and no pendings...callback now - return; // pendings will trigger callback - } - - // load with multi-load - if (options.allowMultiLoading && this.backend.readMulti) { - this.read(toLoad.toLoadLanguages, toLoad.toLoadNamespaces, 'readMulti', null, null, function (err, data) { - if (err) _this5.logger.warn('loading namespaces ' + toLoad.toLoadNamespaces.join(', ') + ' for languages ' + toLoad.toLoadLanguages.join(', ') + ' via multiloading failed', err); - if (!err && data) _this5.logger.log('loaded namespaces ' + toLoad.toLoadNamespaces.join(', ') + ' for languages ' + toLoad.toLoadLanguages.join(', ') + ' via multiloading', data); - - toLoad.toLoad.forEach(function (name) { - var _name$split3 = name.split('|'), - _name$split4 = slicedToArray(_name$split3, 2), - l = _name$split4[0], - n = _name$split4[1]; - - var bundle = getPath(data, [l, n]); - if (bundle) { - _this5.loaded(name, err, bundle); - } else { - var _err = 'loading namespace ' + n + ' for language ' + l + ' via multiloading failed'; - _this5.loaded(name, _err); - _this5.logger.error(_err); - } - }); - }); - } - - // load one by one - else { - (function () { - var readOne = function readOne(name) { - var _this6 = this; - - var _name$split5 = name.split('|'), - _name$split6 = slicedToArray(_name$split5, 2), - lng = _name$split6[0], - ns = _name$split6[1]; - - this.read(lng, ns, 'read', null, null, function (err, data) { - if (err) _this6.logger.warn('loading namespace ' + ns + ' for language ' + lng + ' failed', err); - if (!err && data) _this6.logger.log('loaded namespace ' + ns + ' for language ' + lng, data); - - _this6.loaded(name, err, data); - }); - }; - - - - toLoad.toLoad.forEach(function (name) { - readOne.call(_this5, name); - }); - })(); - } - }; - - Connector.prototype.reload = function reload(languages, namespaces) { - var _this7 = this; - - if (!this.backend) { - this.logger.warn('No backend was added via i18next.use. Will not load resources.'); - } - var options = _extends({}, this.backend.options, this.options.backend); - - if (typeof languages === 'string') languages = this.services.languageUtils.toResolveHierarchy(languages); - if (typeof namespaces === 'string') namespaces = [namespaces]; - - // load with multi-load - if (options.allowMultiLoading && this.backend.readMulti) { - this.read(languages, namespaces, 'readMulti', null, null, function (err, data) { - if (err) _this7.logger.warn('reloading namespaces ' + namespaces.join(', ') + ' for languages ' + languages.join(', ') + ' via multiloading failed', err); - if (!err && data) _this7.logger.log('reloaded namespaces ' + namespaces.join(', ') + ' for languages ' + languages.join(', ') + ' via multiloading', data); - - languages.forEach(function (l) { - namespaces.forEach(function (n) { - var bundle = getPath(data, [l, n]); - if (bundle) { - _this7.loaded(l + '|' + n, err, bundle); - } else { - var _err2 = 'reloading namespace ' + n + ' for language ' + l + ' via multiloading failed'; - _this7.loaded(l + '|' + n, _err2); - _this7.logger.error(_err2); - } - }); - }); - }); - } - - // load one by one - else { - (function () { - var readOne = function readOne(name) { - var _this8 = this; - - var _name$split7 = name.split('|'), - _name$split8 = slicedToArray(_name$split7, 2), - lng = _name$split8[0], - ns = _name$split8[1]; - - this.read(lng, ns, 'read', null, null, function (err, data) { - if (err) _this8.logger.warn('reloading namespace ' + ns + ' for language ' + lng + ' failed', err); - if (!err && data) _this8.logger.log('reloaded namespace ' + ns + ' for language ' + lng, data); - - _this8.loaded(name, err, data); - }); - }; - - - - languages.forEach(function (l) { - namespaces.forEach(function (n) { - readOne.call(_this7, l + '|' + n); - }); - }); - })(); - } - }; - - Connector.prototype.saveMissing = function saveMissing(languages, namespace, key, fallbackValue) { - if (this.backend && this.backend.create) this.backend.create(languages, namespace, key, fallbackValue); - - // write to store to avoid resending - if (!languages || !languages[0]) return; - this.store.addResource(languages[0], namespace, key, fallbackValue); - }; - - return Connector; -}(EventEmitter); - -var Connector$1 = function (_EventEmitter) { - inherits(Connector, _EventEmitter); - - function Connector(cache, store, services) { - var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - classCallCheck(this, Connector); - - var _this = possibleConstructorReturn(this, _EventEmitter.call(this)); - - _this.cache = cache; - _this.store = store; - _this.services = services; - _this.options = options; - _this.logger = baseLogger.create('cacheConnector'); - - _this.cache && _this.cache.init && _this.cache.init(services, options.cache, options); - return _this; - } - - Connector.prototype.load = function load(languages, namespaces, callback) { - var _this2 = this; - - if (!this.cache) return callback && callback(); - var options = _extends({}, this.cache.options, this.options.cache); - - if (typeof languages === 'string') languages = this.services.languageUtils.toResolveHierarchy(languages); - if (typeof namespaces === 'string') namespaces = [namespaces]; - - if (options.enabled) { - this.cache.load(languages, function (err, data) { - if (err) _this2.logger.error('loading languages ' + languages.join(', ') + ' from cache failed', err); - if (data) { - for (var l in data) { - for (var n in data[l]) { - if (n === 'i18nStamp') continue; - var bundle = data[l][n]; - if (bundle) _this2.store.addResourceBundle(l, n, bundle); - } - } - } - if (callback) callback(); - }); - } else { - if (callback) callback(); - } - }; - - Connector.prototype.save = function save() { - if (this.cache && this.options.cache && this.options.cache.enabled) this.cache.save(this.store.data); - }; - - return Connector; -}(EventEmitter); - -function get$1() { - return { - debug: false, - initImmediate: true, - - ns: ['translation'], - defaultNS: ['translation'], - fallbackLng: ['dev'], - fallbackNS: false, // string or array of namespaces - - whitelist: false, // array with whitelisted languages - nonExplicitWhitelist: false, - load: 'all', // | currentOnly | languageOnly - preload: false, // array with preload languages - - keySeparator: '.', - nsSeparator: ':', - pluralSeparator: '_', - contextSeparator: '_', - - saveMissing: false, // enable to send missing values - saveMissingTo: 'fallback', // 'current' || 'all' - missingKeyHandler: false, // function(lng, ns, key, fallbackValue) -> override if prefer on handling - - postProcess: false, // string or array of postProcessor names - returnNull: true, // allows null value as valid translation - returnEmptyString: true, // allows empty string value as valid translation - returnObjects: false, - joinArrays: false, // or string to join array - returnedObjectHandler: function returnedObjectHandler() {}, // function(key, value, options) triggered if key returns object but returnObjects is set to false - parseMissingKeyHandler: false, // function(key) parsed a key that was not found in t() before returning - appendNamespaceToMissingKey: false, - overloadTranslationOptionHandler: function overloadTranslationOptionHandler(args) { - return { defaultValue: args[1] }; - }, - - interpolation: { - escapeValue: true, - format: function format(value, _format, lng) { - return value; - }, - prefix: '{{', - suffix: '}}', - formatSeparator: ',', - // prefixEscaped: '{{', - // suffixEscaped: '}}', - // unescapeSuffix: '', - unescapePrefix: '-', - - nestingPrefix: '$t(', - nestingSuffix: ')', - // nestingPrefixEscaped: '$t(', - // nestingSuffixEscaped: ')', - defaultVariables: undefined // object that can have values to interpolate on - extends passed in interpolation data - } - }; -} - -function transformOptions(options) { - // create namespace object if namespace is passed in as string - if (typeof options.ns === 'string') options.ns = [options.ns]; - if (typeof options.fallbackLng === 'string') options.fallbackLng = [options.fallbackLng]; - if (typeof options.fallbackNS === 'string') options.fallbackNS = [options.fallbackNS]; - - // extend whitelist with cimode - if (options.whitelist && options.whitelist.indexOf('cimode') < 0) options.whitelist.push('cimode'); - - return options; -} - -var I18n = function (_EventEmitter) { - inherits(I18n, _EventEmitter); - - function I18n() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var callback = arguments[1]; - classCallCheck(this, I18n); - - var _this = possibleConstructorReturn(this, _EventEmitter.call(this)); - - _this.options = transformOptions(options); - _this.services = {}; - _this.logger = baseLogger; - _this.modules = {}; - - if (callback && !_this.isInitialized) _this.init(options, callback); - return _this; - } - - I18n.prototype.init = function init(options, callback) { - var _this2 = this; - - if (typeof options === 'function') { - callback = options; - options = {}; - } - if (!options) options = {}; - - if (options.compatibilityAPI === 'v1') { - this.options = _extends({}, get$1(), transformOptions(convertAPIOptions(options)), {}); - } else if (options.compatibilityJSON === 'v1') { - this.options = _extends({}, get$1(), transformOptions(convertJSONOptions(options)), {}); - } else { - this.options = _extends({}, get$1(), this.options, transformOptions(options)); - } - if (!callback) callback = function callback() {}; - - function createClassOnDemand(ClassOrObject) { - if (!ClassOrObject) return; - if (typeof ClassOrObject === 'function') return new ClassOrObject(); - return ClassOrObject; - } - - // init services - if (!this.options.isClone) { - if (this.modules.logger) { - baseLogger.init(createClassOnDemand(this.modules.logger), this.options); - } else { - baseLogger.init(null, this.options); - } - - var lu = new LanguageUtil(this.options); - this.store = new ResourceStore(this.options.resources, this.options); - - var s = this.services; - s.logger = baseLogger; - s.resourceStore = this.store; - s.resourceStore.on('added removed', function (lng, ns) { - s.cacheConnector.save(); - }); - s.languageUtils = lu; - s.pluralResolver = new PluralResolver(lu, { prepend: this.options.pluralSeparator, compatibilityJSON: this.options.compatibilityJSON }); - s.interpolator = new Interpolator(this.options); - - s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options); - // pipe events from backendConnector - s.backendConnector.on('*', function (event) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - _this2.emit.apply(_this2, [event].concat(args)); - }); - - s.backendConnector.on('loaded', function (loaded) { - s.cacheConnector.save(); - }); - - s.cacheConnector = new Connector$1(createClassOnDemand(this.modules.cache), s.resourceStore, s, this.options); - // pipe events from backendConnector - s.cacheConnector.on('*', function (event) { - for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - - _this2.emit.apply(_this2, [event].concat(args)); - }); - - if (this.modules.languageDetector) { - s.languageDetector = createClassOnDemand(this.modules.languageDetector); - s.languageDetector.init(s, this.options.detection, this.options); - } - - this.translator = new Translator(this.services, this.options); - // pipe events from translator - this.translator.on('*', function (event) { - for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { - args[_key3 - 1] = arguments[_key3]; - } - - _this2.emit.apply(_this2, [event].concat(args)); - }); - } - - // append api - var storeApi = ['getResource', 'addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle', 'hasResourceBundle', 'getResourceBundle']; - storeApi.forEach(function (fcName) { - _this2[fcName] = function () { - return this.store[fcName].apply(this.store, arguments); - }; - }); - - // TODO: COMPATIBILITY remove this - if (this.options.compatibilityAPI === 'v1') appendBackwardsAPI(this); - - var load = function load() { - _this2.changeLanguage(_this2.options.lng, function (err, t) { - _this2.emit('initialized', _this2.options); - _this2.logger.log('initialized', _this2.options); - - callback(err, t); - }); - }; - - if (this.options.resources || !this.options.initImmediate) { - load(); - } else { - setTimeout(load, 0); - } - - return this; - }; - - I18n.prototype.loadResources = function loadResources(callback) { - var _this3 = this; - - if (!callback) callback = function callback() {}; - - if (!this.options.resources) { - var _ret = function () { - if (_this3.language && _this3.language.toLowerCase() === 'cimode') return { - v: callback() - }; // avoid loading resources for cimode - - var toLoad = []; - - var append = function append(lng) { - var lngs = _this3.services.languageUtils.toResolveHierarchy(lng); - lngs.forEach(function (l) { - if (toLoad.indexOf(l) < 0) toLoad.push(l); - }); - }; - - append(_this3.language); - - if (_this3.options.preload) { - _this3.options.preload.forEach(function (l) { - append(l); - }); - } - - _this3.services.cacheConnector.load(toLoad, _this3.options.ns, function () { - _this3.services.backendConnector.load(toLoad, _this3.options.ns, callback); - }); - }(); - - if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; - } else { - callback(null); - } - }; - - I18n.prototype.reloadResources = function reloadResources(lngs, ns) { - if (!lngs) lngs = this.languages; - if (!ns) ns = this.options.ns; - this.services.backendConnector.reload(lngs, ns); - }; - - I18n.prototype.use = function use(module) { - if (module.type === 'backend') { - this.modules.backend = module; - } - - if (module.type === 'cache') { - this.modules.cache = module; - } - - if (module.type === 'logger' || module.log && module.warn && module.warn) { - this.modules.logger = module; - } - - if (module.type === 'languageDetector') { - this.modules.languageDetector = module; - } - - if (module.type === 'postProcessor') { - postProcessor.addPostProcessor(module); - } - - return this; - }; - - I18n.prototype.changeLanguage = function changeLanguage(lng, callback) { - var _this4 = this; - - var done = function done(err) { - if (lng) { - _this4.emit('languageChanged', lng); - _this4.logger.log('languageChanged', lng); - } - - if (callback) callback(err, function () { - for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { - args[_key4] = arguments[_key4]; - } - - return _this4.t.apply(_this4, args); - }); - }; - - if (!lng && this.services.languageDetector) lng = this.services.languageDetector.detect(); - - if (lng) { - this.language = lng; - this.languages = this.services.languageUtils.toResolveHierarchy(lng); - - this.translator.changeLanguage(lng); - - if (this.services.languageDetector) this.services.languageDetector.cacheUserLanguage(lng); - } - - this.loadResources(function (err) { - done(err); - }); - }; - - I18n.prototype.getFixedT = function getFixedT(lng, ns) { - var _this5 = this; - - var fixedT = function fixedT(key, options) { - options = options || {}; - options.lng = options.lng || fixedT.lng; - options.ns = options.ns || fixedT.ns; - return _this5.t(key, options); - }; - fixedT.lng = lng; - fixedT.ns = ns; - return fixedT; - }; - - I18n.prototype.t = function t() { - return this.translator && this.translator.translate.apply(this.translator, arguments); - }; - - I18n.prototype.exists = function exists() { - return this.translator && this.translator.exists.apply(this.translator, arguments); - }; - - I18n.prototype.setDefaultNamespace = function setDefaultNamespace(ns) { - this.options.defaultNS = ns; - }; - - I18n.prototype.loadNamespaces = function loadNamespaces(ns, callback) { - var _this6 = this; - - if (!this.options.ns) return callback && callback(); - if (typeof ns === 'string') ns = [ns]; - - ns.forEach(function (n) { - if (_this6.options.ns.indexOf(n) < 0) _this6.options.ns.push(n); - }); - - this.loadResources(callback); - }; - - I18n.prototype.loadLanguages = function loadLanguages(lngs, callback) { - if (typeof lngs === 'string') lngs = [lngs]; - var preloaded = this.options.preload || []; - - var newLngs = lngs.filter(function (lng) { - return preloaded.indexOf(lng) < 0; - }); - // Exit early if all given languages are already preloaded - if (!newLngs.length) return callback(); - - this.options.preload = preloaded.concat(newLngs); - this.loadResources(callback); - }; - - I18n.prototype.dir = function dir(lng) { - if (!lng) lng = this.language; - if (!lng) return 'rtl'; - - var rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam']; - - return rtlLngs.indexOf(this.services.languageUtils.getLanguagePartFromCode(lng)) >= 0 ? 'rtl' : 'ltr'; - }; - - I18n.prototype.createInstance = function createInstance() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var callback = arguments[1]; - - return new I18n(options, callback); - }; - - I18n.prototype.cloneInstance = function cloneInstance() { - var _this7 = this; - - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var callback = arguments[1]; - - var clone = new I18n(_extends({}, options, this.options, { isClone: true }), callback); - var membersToCopy = ['store', 'services', 'language']; - membersToCopy.forEach(function (m) { - clone[m] = _this7[m]; - }); - clone.translator = new Translator(clone.services, clone.options); - clone.translator.on('*', function (event) { - for (var _len5 = arguments.length, args = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) { - args[_key5 - 1] = arguments[_key5]; - } - - clone.emit.apply(clone, [event].concat(args)); - }); - - return clone; - }; - - return I18n; -}(EventEmitter); - -var i18next$1 = new I18n(); - -return i18next$1; - -}))); diff --git a/src/ladb_toolbox/js/lib/i18next.min.js b/src/ladb_toolbox/js/lib/i18next.min.js deleted file mode 100644 index 4b654f088..000000000 --- a/src/ladb_toolbox/js/lib/i18next.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.i18next=e()}(this,function(){"use strict";function t(t){return null==t?"":""+t}function e(t,e,n){t.forEach(function(t){e[t]&&(n[t]=e[t])})}function n(t,e,n){function o(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}for(var r="string"!=typeof e?[].concat(e):e.split(".");r.length>1;){if(!t)return{};var i=o(r.shift());!t[i]&&n&&(t[i]=new n),t=t[i]}return t?{obj:t,k:o(r.shift())}:{}}function o(t,e,o){var r=n(t,e,Object),i=r.obj,a=r.k;i[a]=o}function r(t,e,o,r){var i=n(t,e,Object),a=i.obj,s=i.k;a[s]=a[s]||[],r&&(a[s]=a[s].concat(o)),r||a[s].push(o)}function i(t,e){var o=n(t,e),r=o.obj,i=o.k;if(r)return r[i]}function a(t,e,n){for(var o in e)o in t?"string"==typeof t[o]||t[o]instanceof String||"string"==typeof e[o]||e[o]instanceof String?n&&(t[o]=e[o]):a(t[o],e[o],n):t[o]=e[o];return t}function s(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function u(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,function(t){return P[t]}):t}function l(t){return t.interpolation={unescapeSuffix:"HTML"},t.interpolation.prefix=t.interpolationPrefix||"__",t.interpolation.suffix=t.interpolationSuffix||"__",t.interpolation.escapeValue=t.escapeInterpolation||!1,t.interpolation.nestingPrefix=t.reusePrefix||"$t(",t.interpolation.nestingSuffix=t.reuseSuffix||")",t}function c(t){return t.resStore&&(t.resources=t.resStore),t.ns&&t.ns.defaultNs?(t.defaultNS=t.ns.defaultNs,t.ns=t.ns.namespaces):t.defaultNS=t.ns||"translation",t.fallbackToDefaultNS&&t.defaultNS&&(t.fallbackNS=t.defaultNS),t.saveMissing=t.sendMissing,t.saveMissingTo=t.sendMissingTo||"current",t.returnNull=!t.fallbackOnNull,t.returnEmptyString=!t.fallbackOnEmpty,t.returnObjects=t.returnObjectTrees,t.joinArrays="\n",t.returnedObjectHandler=t.objectTreeKeyHandler,t.parseMissingKeyHandler=t.parseMissingKey,t.appendNamespaceToMissingKey=!0,t.nsSeparator=t.nsseparator,t.keySeparator=t.keyseparator,"sprintf"===t.shortcutFunction&&(t.overloadTranslationOptionHandler=function(t){for(var e=[],n=1;n1&&void 0!==arguments[1]?arguments[1]:{};x(this,t),this.init(e,n)}return t.prototype.init=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||N,this.options=e,this.debug=e.debug!==!1},t.prototype.setDebug=function(t){this.debug=t},t.prototype.log=function(){this.forward(arguments,"log","",!0)},t.prototype.warn=function(){this.forward(arguments,"warn","",!0)},t.prototype.error=function(){this.forward(arguments,"error","")},t.prototype.deprecate=function(){this.forward(arguments,"warn","WARNING DEPRECATED: ",!0)},t.prototype.forward=function(t,e,n,o){o&&!this.debug||("string"==typeof t[0]&&(t[0]=n+this.prefix+" "+t[0]),this.logger[e](t))},t.prototype.create=function(e){var n=new t(this.logger,k({prefix:this.prefix+":"+e+":"},this.options));return n},t}(),j=new L,C=function(){function t(){x(this,t),this.observers={}}return t.prototype.on=function(t,e){var n=this;t.split(" ").forEach(function(t){n.observers[t]=n.observers[t]||[],n.observers[t].push(e)})},t.prototype.off=function(t,e){var n=this;this.observers[t]&&this.observers[t].forEach(function(){if(e){var o=n.observers[t].indexOf(e);o>-1&&n.observers[t].splice(o,1)}else delete n.observers[t]})},t.prototype.emit=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),o=1;o":">",'"':""","'":"'","/":"/"},R=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};x(this,e);var r=w(this,t.call(this));return r.data=n,r.options=o,r}return S(e,t),e.prototype.addNamespaces=function(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)},e.prototype.removeNamespaces=function(t){var e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)},e.prototype.getResource=function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=o.keySeparator||this.options.keySeparator;void 0===r&&(r=".");var a=[t,e];return n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(r?n.split(r):n)),t.indexOf(".")>-1&&(a=t.split(".")),i(this.data,a)},e.prototype.addResource=function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=this.options.keySeparator;void 0===a&&(a=".");var s=[t,e];n&&(s=s.concat(a?n.split(a):n)),t.indexOf(".")>-1&&(s=t.split("."),r=e,e=s[1]),this.addNamespaces(e),o(this.data,s,r),i.silent||this.emit("added",t,e,n,r)},e.prototype.addResources=function(t,e,n){for(var o in n)"string"==typeof n[o]&&this.addResource(t,e,o,n[o],{silent:!0});this.emit("added",t,e,n)},e.prototype.addResourceBundle=function(t,e,n,r,s){var u=[t,e];t.indexOf(".")>-1&&(u=t.split("."),r=n,n=e,e=u[1]),this.addNamespaces(e);var l=i(this.data,u)||{};r?a(l,n,s):l=k({},l,n),o(this.data,u,l),this.emit("added",t,e,n)},e.prototype.removeResourceBundle=function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)},e.prototype.hasResourceBundle=function(t,e){return void 0!==this.getResource(t,e)},e.prototype.getResourceBundle=function(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?k({},this.getResource(t,e)):this.getResource(t,e)},e.prototype.toJSON=function(){return this.data},e}(C),E={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,n,o,r){var i=this;return t.forEach(function(t){i.processors[t]&&(e=i.processors[t].process(e,n,o,r))}),e}},_=function(t){function n(o){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};x(this,n);var i=w(this,t.call(this));return e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector"],o,i),i.options=r,i.logger=j.create("translator"),i}return S(n,t),n.prototype.changeLanguage=function(t){t&&(this.language=t)},n.prototype.exists=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};return"v1"===this.options.compatibilityAPI&&(e=f(e)),void 0!==this.resolve(t,e)},n.prototype.extractFromKey=function(t,e){var n=e.nsSeparator||this.options.nsSeparator;void 0===n&&(n=":");var o=e.ns||this.options.defaultNS;if(n&&t.indexOf(n)>-1){var r=t.split(n);o=r[0],t=r[1]}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}},n.prototype.translate=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!==("undefined"==typeof e?"undefined":m(e))?e=this.options.overloadTranslationOptionHandler(arguments):"v1"===this.options.compatibilityAPI&&(e=f(e)),void 0===t||null===t||""===t)return"";"number"==typeof t&&(t=String(t)),"string"==typeof t&&(t=[t]);var n=e.lng||this.language;if(n&&"cimode"===n.toLowerCase())return t[t.length-1];var o=e.keySeparator||this.options.keySeparator||".",r=this.extractFromKey(t[t.length-1],e),i=r.key,a=r.namespaces,s=a[a.length-1],u=this.resolve(t,e),l=Object.prototype.toString.apply(u),c=["[object Number]","[object Function]","[object RegExp]"],p=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays;if(u&&"string"!=typeof u&&c.indexOf(l)<0&&(!p||"[object Array]"!==l)){if(!e.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(i,u,e):"key '"+i+" ("+this.language+")' returned an object instead of string.";var g="[object Array]"===l?[]:{};for(var h in u)g[h]=this.translate(""+i+o+h,k({joinArrays:!1,ns:a},e));u=g}else if(p&&"[object Array]"===l)u=u.join(p),u&&(u=this.extendTranslation(u,i,e));else{var d=!1,v=!1;if(this.isValidLookup(u)||void 0===e.defaultValue||(d=!0,u=e.defaultValue),this.isValidLookup(u)||(v=!0,u=i),v||d){this.logger.log("missingKey",n,s,i,u);var y=[],b=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&b&&b[0])for(var x=0;x1&&void 0!==arguments[1]?arguments[1]:{},o=void 0;return"string"==typeof t&&(t=[t]),t.forEach(function(t){if(!e.isValidLookup(o)){var r=e.extractFromKey(t,n),i=r.key,a=r.namespaces;e.options.fallbackNS&&(a=a.concat(e.options.fallbackNS));var s=void 0!==n.count&&"string"!=typeof n.count,u=void 0!==n.context&&"string"==typeof n.context&&""!==n.context,l=n.lngs?n.lngs:e.languageUtils.toResolveHierarchy(n.lng||e.language);a.forEach(function(t){e.isValidLookup(o)||l.forEach(function(r){if(!e.isValidLookup(o)){var a=i,l=[a],c=void 0;s&&(c=e.pluralResolver.getSuffix(r,n.count)),s&&u&&l.push(a+c),u&&l.push(a+=""+e.options.contextSeparator+n.context),s&&l.push(a+=c);for(var p=void 0;p=l.pop();)e.isValidLookup(o)||(o=e.getResource(r,t,p,n))}})})}}),o},n.prototype.isValidLookup=function(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)},n.prototype.getResource=function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.resourceStore.getResource(t,e,n,o)},n}(C),A=function(){function t(e){x(this,t),this.options=e,this.whitelist=this.options.whitelist||!1,this.logger=j.create("languageUtils")}return t.prototype.getLanguagePartFromCode=function(t){if(t.indexOf("-")<0)return t;var e=["NB-NO","NN-NO","nb-NO","nn-NO","nb-no","nn-no"],n=t.split("-");return this.formatLanguageCode(e.indexOf(t)>-1?n[1].toLowerCase():n[0])},t.prototype.getScriptPartFromCode=function(t){if(t.indexOf("-")<0)return null;var e=t.split("-");return 2===e.length?null:(e.pop(),this.formatLanguageCode(e.join("-")))},t.prototype.getLanguagePartFromCode=function(t){if(t.indexOf("-")<0)return t;var e=["NB-NO","NN-NO","nb-NO","nn-NO","nb-no","nn-no"],n=t.split("-");return this.formatLanguageCode(e.indexOf(t)>-1?n[1].toLowerCase():n[0])},t.prototype.formatLanguageCode=function(t){if("string"==typeof t&&t.indexOf("-")>-1){var e=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map(function(t){return t.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=h(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=h(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=h(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t},t.prototype.isWhitelisted=function(t,e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist&&!e)&&(t=this.getLanguagePartFromCode(t)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(t)>-1},t.prototype.getFallbackCodes=function(t,e){if(!t)return[];if("string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;var n=t[e];return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t.default),n||[]},t.prototype.toResolveHierarchy=function(t,e){var n=this,o=this.getFallbackCodes(e||this.options.fallbackLng||[],t),r=[],i=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t&&(n.isWhitelisted(t,e)?r.push(t):n.logger.warn("rejecting non-whitelisted language code: "+t))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(t),!0),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(t),!0),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(t))):"string"==typeof t&&i(this.formatLanguageCode(t)),o.forEach(function(t){r.indexOf(t)<0&&i(n.formatLanguageCode(t))}),r},t}(),M=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","es_ar","et","eu","fi","fo","fur","fy","gl","gu","ha","he","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt","pt_br","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21}],T={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0===t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0===t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0===t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)}},H=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};x(this,t),this.languageUtils=e,this.options=n,this.logger=j.create("pluralResolver"),this.rules=d()}return t.prototype.addRule=function(t,e){this.rules[t]=e},t.prototype.getRule=function(t){return this.rules[this.languageUtils.getLanguagePartFromCode(t)]},t.prototype.needsPlural=function(t){var e=this.getRule(t);return!(e&&e.numbers.length<=1)},t.prototype.getSuffix=function(t,e){var n=this,o=this.getRule(t);if(!o)return this.logger.warn("no plural rule found for: "+t),"";var r=function(){if(1===o.numbers.length)return{v:""};var t=o.noAbs?o.plurals(e):o.plurals(Math.abs(e)),r=o.numbers[t];2===o.numbers.length&&1===o.numbers[0]&&(2===r?r="plural":1===r&&(r=""));var i=function(){return n.options.prepend&&r.toString()?n.options.prepend+r.toString():r.toString()};return"v1"===n.options.compatibilityJSON?1===r?{v:""}:"number"==typeof r?{v:"_plural_"+r.toString()}:{v:i()}:"v2"===n.options.compatibilityJSON||2===o.numbers.length&&1===o.numbers[0]?{v:i()}:2===o.numbers.length&&1===o.numbers[0]?{v:i()}:{v:n.options.prepend&&t.toString()?n.options.prepend+t.toString():t.toString()}}();return"object"===("undefined"==typeof r?"undefined":m(r))?r.v:void 0},t}(),V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x(this,e),this.logger=j.create("interpolator"),this.init(t,!0)}return e.prototype.init=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];e&&(this.options=t,this.format=t.interpolation&&t.interpolation.format||function(t){return t},this.escape=t.interpolation&&t.interpolation.escape||u),t.interpolation||(t.interpolation={escapeValue:!0});var n=t.interpolation;this.escapeValue=void 0===n.escapeValue||n.escapeValue,this.prefix=n.prefix?s(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?s(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?s(n.formatSeparator):n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?s(n.nestingPrefix):n.nestingPrefixEscaped||s("$t("),this.nestingSuffix=n.nestingSuffix?s(n.nestingSuffix):n.nestingSuffixEscaped||s(")"),this.resetRegExp()},e.prototype.reset=function(){this.options&&this.init(this.options)},e.prototype.resetRegExp=function(){var t=this.prefix+"(.+?)"+this.suffix;this.regexp=new RegExp(t,"g");var e=this.prefix+this.unescapePrefix+"(.+?)"+this.unescapeSuffix+this.suffix;this.regexpUnescape=new RegExp(e,"g");var n=this.nestingPrefix+"(.+?)"+this.nestingSuffix;this.nestingRegexp=new RegExp(n,"g")},e.prototype.interpolate=function(e,n,o){function r(t){return t.replace(/\$/g,"$$$$")}var a=this,s=void 0,u=void 0,l=function(t){if(t.indexOf(a.formatSeparator)<0)return i(n,t);var e=t.split(a.formatSeparator),r=e.shift().trim(),s=e.join(a.formatSeparator).trim();return a.format(i(n,r),s,o)};for(this.resetRegExp();s=this.regexpUnescape.exec(e);){var c=l(s[1].trim());e=e.replace(s[0],c),this.regexpUnescape.lastIndex=0}for(;s=this.regexp.exec(e);)u=l(s[1].trim()),"string"!=typeof u&&(u=t(u)),u||(this.logger.warn("missed to pass in variable "+s[1]+" for interpolating "+e),u=""),u=r(this.escapeValue?this.escape(u):u),e=e.replace(s[0],u),this.regexp.lastIndex=0;return e},e.prototype.nest=function(e,n){function o(t){return t.replace(/\$/g,"$$$$")}function r(t){if(t.indexOf(",")<0)return t;var e=t.split(",");t=e.shift();var n=e.join(",");n=this.interpolate(n,l),n=n.replace(/'/g,'"');try{l=JSON.parse(n)}catch(e){this.logger.error("failed parsing options string in nesting for key "+t,e)}return t}var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=void 0,s=void 0,l=JSON.parse(JSON.stringify(i));for(l.applyPostProcessor=!1;a=this.nestingRegexp.exec(e);)s=n(r.call(this,a[1].trim()),l),"string"!=typeof s&&(s=t(s)),s||(this.logger.warn("missed to pass in variable "+a[1]+" for interpolating "+e),s=""),s=o(this.escapeValue?u(s):s),e=e.replace(a[0],s),this.regexp.lastIndex=0;return e},e}(),U=function(t){function e(n,o,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};x(this,e);var a=w(this,t.call(this));return a.backend=n,a.store=o,a.services=r,a.options=i,a.logger=j.create("backendConnector"),a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(r,i.backend,i),a}return S(e,t),e.prototype.queueLoad=function(t,e,n){var o=this,r=[],i=[],a=[],s=[];return t.forEach(function(t){var n=!0;e.forEach(function(e){var a=t+"|"+e;o.store.hasResourceBundle(t,e)?o.state[a]=2:o.state[a]<0||(1===o.state[a]?i.indexOf(a)<0&&i.push(a):(o.state[a]=1,n=!1,i.indexOf(a)<0&&i.push(a),r.indexOf(a)<0&&r.push(a),s.indexOf(e)<0&&s.push(e)))}),n||a.push(t)}),(r.length||i.length)&&this.queue.push({pending:i,loaded:{},errors:[],callback:n}),{toLoad:r,pending:i,toLoadLanguages:a,toLoadNamespaces:s}},e.prototype.loaded=function(t,e,n){var o=this,i=t.split("|"),a=O(i,2),s=a[0],u=a[1];e&&this.emit("failedLoading",s,u,e),n&&this.store.addResourceBundle(s,u,n),this.state[t]=e?-1:2,this.queue.forEach(function(n){r(n.loaded,[s],u),v(n.pending,t),e&&n.errors.push(e),0!==n.pending.length||n.done||(n.errors.length?n.callback(n.errors):n.callback(),o.emit("loaded",n.loaded),n.done=!0)}),this.queue=this.queue.filter(function(t){return!t.done})},e.prototype.read=function(t,e,n,o,r,i){var a=this;return o||(o=0),r||(r=250),t.length?void this.backend[n](t,e,function(s,u){return s&&u&&o<5?void setTimeout(function(){a.read.call(a,t,e,n,++o,2*r,i)},r):void i(s,u)}):i(null,{})},e.prototype.load=function(t,e,n){var o=this;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();var r=k({},this.backend.options,this.options.backend);"string"==typeof t&&(t=this.services.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);var a=this.queueLoad(t,e,n);return a.toLoad.length?void(r.allowMultiLoading&&this.backend.readMulti?this.read(a.toLoadLanguages,a.toLoadNamespaces,"readMulti",null,null,function(t,e){t&&o.logger.warn("loading namespaces "+a.toLoadNamespaces.join(", ")+" for languages "+a.toLoadLanguages.join(", ")+" via multiloading failed",t),!t&&e&&o.logger.log("loaded namespaces "+a.toLoadNamespaces.join(", ")+" for languages "+a.toLoadLanguages.join(", ")+" via multiloading",e),a.toLoad.forEach(function(n){var r=n.split("|"),a=O(r,2),s=a[0],u=a[1],l=i(e,[s,u]);if(l)o.loaded(n,t,l);else{var c="loading namespace "+u+" for language "+s+" via multiloading failed";o.loaded(n,c),o.logger.error(c)}})}):!function(){var t=function(t){var e=this,n=t.split("|"),o=O(n,2),r=o[0],i=o[1];this.read(r,i,"read",null,null,function(n,o){n&&e.logger.warn("loading namespace "+i+" for language "+r+" failed",n),!n&&o&&e.logger.log("loaded namespace "+i+" for language "+r,o),e.loaded(t,n,o)})};a.toLoad.forEach(function(e){t.call(o,e)})}()):void(a.pending.length||n())},e.prototype.reload=function(t,e){var n=this;this.backend||this.logger.warn("No backend was added via i18next.use. Will not load resources.");var o=k({},this.backend.options,this.options.backend);"string"==typeof t&&(t=this.services.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]),o.allowMultiLoading&&this.backend.readMulti?this.read(t,e,"readMulti",null,null,function(o,r){o&&n.logger.warn("reloading namespaces "+e.join(", ")+" for languages "+t.join(", ")+" via multiloading failed",o),!o&&r&&n.logger.log("reloaded namespaces "+e.join(", ")+" for languages "+t.join(", ")+" via multiloading",r),t.forEach(function(t){e.forEach(function(e){var a=i(r,[t,e]);if(a)n.loaded(t+"|"+e,o,a);else{var s="reloading namespace "+e+" for language "+t+" via multiloading failed";n.loaded(t+"|"+e,s),n.logger.error(s)}})})}):!function(){var o=function(t){var e=this,n=t.split("|"),o=O(n,2),r=o[0],i=o[1];this.read(r,i,"read",null,null,function(n,o){n&&e.logger.warn("reloading namespace "+i+" for language "+r+" failed",n),!n&&o&&e.logger.log("reloaded namespace "+i+" for language "+r,o),e.loaded(t,n,o)})};t.forEach(function(t){e.forEach(function(e){o.call(n,t+"|"+e)})})}()},e.prototype.saveMissing=function(t,e,n,o){this.backend&&this.backend.create&&this.backend.create(t,e,n,o),t&&t[0]&&this.store.addResource(t[0],e,n,o)},e}(C),F=function(t){function e(n,o,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};x(this,e);var a=w(this,t.call(this));return a.cache=n,a.store=o,a.services=r,a.options=i,a.logger=j.create("cacheConnector"),a.cache&&a.cache.init&&a.cache.init(r,i.cache,i),a}return S(e,t),e.prototype.load=function(t,e,n){var o=this;if(!this.cache)return n&&n();var r=k({},this.cache.options,this.options.cache);"string"==typeof t&&(t=this.services.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]),r.enabled?this.cache.load(t,function(e,r){if(e&&o.logger.error("loading languages "+t.join(", ")+" from cache failed",e),r)for(var i in r)for(var a in r[i])if("i18nStamp"!==a){var s=r[i][a];s&&o.store.addResourceBundle(i,a,s)}n&&n()}):n&&n()},e.prototype.save=function(){this.cache&&this.options.cache&&this.options.cache.enabled&&this.cache.save(this.store.data)},e}(C),I=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments[1];x(this,e);var r=w(this,t.call(this));return r.options=b(n),r.services={},r.logger=j,r.modules={},o&&!r.isInitialized&&r.init(n,o),r}return S(e,t),e.prototype.init=function(t,e){function n(t){if(t)return"function"==typeof t?new t:t}var o=this;if("function"==typeof t&&(e=t,t={}),t||(t={}),"v1"===t.compatibilityAPI?this.options=k({},y(),b(c(t)),{}):"v1"===t.compatibilityJSON?this.options=k({},y(),b(p(t)),{}):this.options=k({},y(),this.options,b(t)),e||(e=function(){}),!this.options.isClone){this.modules.logger?j.init(n(this.modules.logger),this.options):j.init(null,this.options);var r=new A(this.options);this.store=new R(this.options.resources,this.options);var i=this.services;i.logger=j,i.resourceStore=this.store,i.resourceStore.on("added removed",function(t,e){i.cacheConnector.save()}),i.languageUtils=r,i.pluralResolver=new H(r,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON}),i.interpolator=new V(this.options),i.backendConnector=new U(n(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;r=0?"rtl":"ltr"},e.prototype.createInstance=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1];return new e(t,n)},e.prototype.cloneInstance=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments[1],r=new e(k({},n,this.options,{isClone:!0}),o),i=["store","services","language"];return i.forEach(function(e){r[e]=t[e]}),r.translator=new _(r.services,r.options),r.translator.on("*",function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),o=1;oVersion\n

"},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"version","match":["version"]}]},{"type":"raw","value":" ( SU "},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"sketchupVersion","match":["sketchupVersion"]}]},{"type":"raw","value":" - "},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"currentOS","match":["currentOS"]}]},{"type":"raw","value":" )

\n

Crédits techniques

\n

Le plugin L'Air du Bois : Boîte à outils Sketchup est développé par Boris Beaulant et disponible en Open Source sous lience GNU GPLv3 sur son dépôt GitHub.

\n

Mais l'aventure ne serait pas possible sans le travail des auteurs des briques logiciels Open Source suivantes :

\n \n

Un remerciement particulier à JetBrains pour leur soutien à ce projet par leur Licence spéciale pour les projets Open Source.

\n"}]}}], precompiled: true}); -Twig.twig({allowInlineIncludes:true, id:"tabs/cutlist/_list.twig", data:[{"type":"raw","value":"\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n "},{"type":"logic","token":{"type":"Twig.logic.type.for","key_var":null,"value_var":"group","expression":[{"type":"Twig.expression.type.variable","value":"groups","match":["groups"]}],"output":[{"type":"raw","value":" \n \n \n \n \n \n "}]}},{"type":"raw","value":" \n
\n \n
\n Résumé\n
\n
MatièreNbr. piècesSurfaceVolume
"},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"group","match":["group"]},{"type":"Twig.expression.type.key.period","key":"material_name"}]},{"type":"raw","value":" / "},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"group","match":["group"]},{"type":"Twig.expression.type.key.period","key":"raw_thickness"}]},{"type":"raw","value":"x"},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"group","match":["group"]},{"type":"Twig.expression.type.key.period","key":"piece_count"}]},{"type":"raw","value":""},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"group","match":["group"]},{"type":"Twig.expression.type.key.period","key":"raw_area_m2"},{"type":"Twig.expression.type.filter","value":"number_format","match":["|number_format","number_format"],"params":[{"type":"Twig.expression.type.parameter.start","value":"(","match":["("]},{"type":"Twig.expression.type.number","value":3,"match":["3",null]},{"type":"Twig.expression.type.comma"},{"type":"Twig.expression.type.string","value":","},{"type":"Twig.expression.type.comma"},{"type":"Twig.expression.type.string","value":" "},{"type":"Twig.expression.type.parameter.end","value":")","match":[")"],"expression":false}]}]},{"type":"raw","value":"m2"},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"group","match":["group"]},{"type":"Twig.expression.type.key.period","key":"raw_volume_m3"},{"type":"Twig.expression.type.filter","value":"number_format","match":["|number_format","number_format"],"params":[{"type":"Twig.expression.type.parameter.start","value":"(","match":["("]},{"type":"Twig.expression.type.number","value":3,"match":["3",null]},{"type":"Twig.expression.type.comma"},{"type":"Twig.expression.type.string","value":","},{"type":"Twig.expression.type.comma"},{"type":"Twig.expression.type.string","value":" "},{"type":"Twig.expression.type.parameter.end","value":")","match":[")"],"expression":false}]}]},{"type":"raw","value":"m3
\n"},{"type":"logic","token":{"type":"Twig.logic.type.for","key_var":null,"value_var":"group","expression":[{"type":"Twig.expression.type.variable","value":"groups","match":["groups"]}],"output":[{"type":"raw","value":" \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n "},{"type":"logic","token":{"type":"Twig.logic.type.set","key":"thickness","expression":[{"type":"Twig.expression.type.number","value":0,"match":["0",null]}]}},{"type":"raw","value":" "},{"type":"logic","token":{"type":"Twig.logic.type.for","key_var":null,"value_var":"piece","expression":[{"type":"Twig.expression.type.variable","value":"group","match":["group"]},{"type":"Twig.expression.type.key.period","key":"pieces"}],"output":[{"type":"raw","value":" "},{"type":"logic","token":{"type":"Twig.logic.type.if","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"thickness"},{"type":"Twig.expression.type.variable","value":"thickness","match":["thickness"]},{"type":"Twig.expression.type.operator.binary","value":"!=","precidence":9,"associativity":"leftToRight","operator":"!="}],"output":[{"type":"raw","value":" "},{"type":"logic","token":{"type":"Twig.logic.type.set","key":"thickness","expression":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"thickness"}]}},{"type":"raw","value":" \n \n \n "}]}},{"type":"raw","value":" \n \n \n \n \n \n \n \n \n \n "}]}},{"type":"raw","value":" \n
\n \n
\n "},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"group","match":["group"]},{"type":"Twig.expression.type.key.period","key":"material_name"}]},{"type":"raw","value":" / "},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"group","match":["group"]},{"type":"Twig.expression.type.key.period","key":"raw_thickness"}]},{"type":"raw","value":"\n
\n
NomFinieNbr.Brute
Long.Larg.Ep.Long.Larg.
Epaisseur "},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"thickness"}]},{"type":"raw","value":"
"},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"name"}]},{"type":"raw","value":""},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"length"}]},{"type":"raw","value":""},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"width"}]},{"type":"raw","value":""},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"thickness"}]},{"type":"raw","value":"x "},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"count"}]},{"type":"raw","value":""},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"raw_length"}]},{"type":"raw","value":""},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"raw_width"}]},{"type":"raw","value":""},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"number"}]},{"type":"raw","value":"
\n"}]}}], precompiled: true}); +Twig.twig({allowInlineIncludes:true, id:"tabs/cutlist/_list.twig", data:[{"type":"raw","value":"\n\n"},{"type":"logic","token":{"type":"Twig.logic.type.if","stack":[{"type":"Twig.expression.type.variable","value":"groups","match":["groups"]},{"type":"Twig.expression.type.filter","value":"length","match":["|length","length"]},{"type":"Twig.expression.type.number","value":0,"match":["0",null]},{"type":"Twig.expression.type.operator.binary","value":">","precidence":8,"associativity":"leftToRight","operator":">"}],"output":[{"type":"raw","value":" \n \n \n \n \n \n \n \n \n \n \n \n \n "},{"type":"logic","token":{"type":"Twig.logic.type.for","key_var":null,"value_var":"group","expression":[{"type":"Twig.expression.type.variable","value":"groups","match":["groups"]}],"output":[{"type":"raw","value":" \n \n \n \n \n \n "}]}},{"type":"raw","value":" \n
\n \n
\n Résumé\n
\n
MatièreNbr. piècesSurfaceVolume
"},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"group","match":["group"]},{"type":"Twig.expression.type.key.period","key":"material_name"}]},{"type":"raw","value":" / "},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"group","match":["group"]},{"type":"Twig.expression.type.key.period","key":"raw_thickness"}]},{"type":"raw","value":"x"},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"group","match":["group"]},{"type":"Twig.expression.type.key.period","key":"piece_count"}]},{"type":"raw","value":""},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"group","match":["group"]},{"type":"Twig.expression.type.key.period","key":"raw_area_m2"},{"type":"Twig.expression.type.filter","value":"number_format","match":["|number_format","number_format"],"params":[{"type":"Twig.expression.type.parameter.start","value":"(","match":["("]},{"type":"Twig.expression.type.number","value":3,"match":["3",null]},{"type":"Twig.expression.type.comma"},{"type":"Twig.expression.type.string","value":","},{"type":"Twig.expression.type.comma"},{"type":"Twig.expression.type.string","value":" "},{"type":"Twig.expression.type.parameter.end","value":")","match":[")"],"expression":false}]}]},{"type":"raw","value":"m2"},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"group","match":["group"]},{"type":"Twig.expression.type.key.period","key":"raw_volume_m3"},{"type":"Twig.expression.type.filter","value":"number_format","match":["|number_format","number_format"],"params":[{"type":"Twig.expression.type.parameter.start","value":"(","match":["("]},{"type":"Twig.expression.type.number","value":3,"match":["3",null]},{"type":"Twig.expression.type.comma"},{"type":"Twig.expression.type.string","value":","},{"type":"Twig.expression.type.comma"},{"type":"Twig.expression.type.string","value":" "},{"type":"Twig.expression.type.parameter.end","value":")","match":[")"],"expression":false}]}]},{"type":"raw","value":"m3
\n"}]}},{"type":"logic","token":{"type":"Twig.logic.type.for","key_var":null,"value_var":"group","expression":[{"type":"Twig.expression.type.variable","value":"groups","match":["groups"]}],"output":[{"type":"raw","value":" \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n "},{"type":"logic","token":{"type":"Twig.logic.type.set","key":"thickness","expression":[{"type":"Twig.expression.type.number","value":0,"match":["0",null]}]}},{"type":"raw","value":" "},{"type":"logic","token":{"type":"Twig.logic.type.for","key_var":null,"value_var":"piece","expression":[{"type":"Twig.expression.type.variable","value":"group","match":["group"]},{"type":"Twig.expression.type.key.period","key":"pieces"}],"output":[{"type":"raw","value":" "},{"type":"logic","token":{"type":"Twig.logic.type.if","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"thickness"},{"type":"Twig.expression.type.variable","value":"thickness","match":["thickness"]},{"type":"Twig.expression.type.operator.binary","value":"!=","precidence":9,"associativity":"leftToRight","operator":"!="}],"output":[{"type":"raw","value":" "},{"type":"logic","token":{"type":"Twig.logic.type.set","key":"thickness","expression":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"thickness"}]}},{"type":"raw","value":" \n \n \n "}]}},{"type":"raw","value":" \n \n \n \n \n \n \n \n \n \n "}]}},{"type":"raw","value":" \n
\n \n
\n "},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"group","match":["group"]},{"type":"Twig.expression.type.key.period","key":"material_name"}]},{"type":"raw","value":" / "},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"group","match":["group"]},{"type":"Twig.expression.type.key.period","key":"raw_thickness"}]},{"type":"raw","value":"\n
\n
NomFinieNbr.Brute
Long.Larg.Ep.Long.Larg.
Epaisseur "},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"thickness"}]},{"type":"raw","value":"
"},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"name"}]},{"type":"raw","value":""},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"length"}]},{"type":"raw","value":""},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"width"}]},{"type":"raw","value":""},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"thickness"}]},{"type":"raw","value":"x "},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"count"}]},{"type":"raw","value":""},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"raw_length"}]},{"type":"raw","value":""},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"raw_width"}]},{"type":"raw","value":""},{"type":"output","stack":[{"type":"Twig.expression.type.variable","value":"piece","match":["piece"]},{"type":"Twig.expression.type.key.period","key":"number"}]},{"type":"raw","value":"
\n"}]}}], precompiled: true}); Twig.twig({allowInlineIncludes:true, id:"tabs/cutlist/_options-modal.twig", data:[{"type":"logic","token":{"type":"Twig.logic.type.extends","stack":[{"type":"Twig.expression.type.string","value":"core/_modal.twig"}]}},{"type":"raw","value":"\n"},{"type":"logic","token":{"type":"Twig.logic.type.set","key":"id","expression":[{"type":"Twig.expression.type.string","value":"ladb_options_modal"}]}},{"type":"logic","token":{"type":"Twig.logic.type.set","key":"title","expression":[{"type":"Twig.expression.type.string","value":"Options"}]}},{"type":"raw","value":"\n"},{"type":"logic","token":{"type":"Twig.logic.type.block","block":"bodyInner","output":[{"type":"raw","value":"
\n
\n \n
\n \n
mm
\n
\n
\n
\n \n
\n \n
mm
\n
\n
\n
\n \n
\n \n
mm
\n
\n
\n
\n \n
\n
\n \n
\n
\n"}]}},{"type":"raw","value":"\n"},{"type":"logic","token":{"type":"Twig.logic.type.block","block":"footerInner","output":[{"type":"raw","value":" \n"}]}}], precompiled: true}); diff --git a/src/ladb_toolbox/twig/tabs/cutlist/_list.twig b/src/ladb_toolbox/twig/tabs/cutlist/_list.twig index 2bb0ddc26..11583db47 100644 --- a/src/ladb_toolbox/twig/tabs/cutlist/_list.twig +++ b/src/ladb_toolbox/twig/tabs/cutlist/_list.twig @@ -1,33 +1,35 @@ {# set groups #} - - - - - - - - - - - - - - {% for group in groups %} - - - - - +{% if groups|length > 0 %} +
- -
- Résumé -
-
MatièreNbr. piècesSurfaceVolume
{{ group.material_name }} / {{ group.raw_thickness }}x{{ group.piece_count }}{{ group.raw_area_m2|number_format(3, ',', ' ') }}m2{{ group.raw_volume_m3|number_format(3, ',', ' ') }}m3
+ + + - {% endfor %} - -
+ +
+ Résumé +
+
+ + + + Matière + Nbr. pièces + Surface + Volume + + {% for group in groups %} + + {{ group.material_name }} / {{ group.raw_thickness }} + x{{ group.piece_count }} + {{ group.raw_area_m2|number_format(3, ',', ' ') }}m2 + {{ group.raw_volume_m3|number_format(3, ',', ' ') }}m3 + + {% endfor %} + + +{% endif %} {% for group in groups %}