@pie-lib/translator 2.23.2-next.11 → 2.23.2-next.164

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,129 +7,71 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
7
7
 
8
8
  **Note:** Version bump only for package @pie-lib/translator
9
9
 
10
-
11
-
12
-
13
-
14
10
  # [2.23.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/translator@2.19.0...@pie-lib/translator@2.23.0) (2025-10-16)
15
11
 
16
12
  **Note:** Version bump only for package @pie-lib/translator
17
13
 
18
-
19
-
20
-
21
-
22
14
  # [2.22.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/translator@2.19.0...@pie-lib/translator@2.22.0) (2025-10-16)
23
15
 
24
16
  **Note:** Version bump only for package @pie-lib/translator
25
17
 
26
-
27
-
28
-
29
-
30
18
  # [2.21.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/translator@2.19.0...@pie-lib/translator@2.21.0) (2025-10-16)
31
19
 
32
20
  **Note:** Version bump only for package @pie-lib/translator
33
21
 
34
-
35
-
36
-
37
-
38
22
  # [2.20.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/translator@2.19.0...@pie-lib/translator@2.20.0) (2025-10-16)
39
23
 
40
24
  **Note:** Version bump only for package @pie-lib/translator
41
25
 
42
-
43
-
44
-
45
-
46
26
  # [2.19.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/translator@2.3.0...@pie-lib/translator@2.19.0) (2025-09-25)
47
27
 
48
-
49
28
  ### Bug Fixes
50
29
 
51
- * fixed pie-lib/icons import [PD-5126] ([dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f))
52
-
30
+ - fixed pie-lib/icons import [PD-5126](<[dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f)>)
53
31
 
54
32
  ### Features
55
33
 
56
- * split pie-toolbox into multiple packages [PD-5126] ([7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2))
57
-
58
-
59
-
60
-
34
+ - split pie-toolbox into multiple packages [PD-5126](<[7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2)>)
61
35
 
62
36
  # [2.18.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/translator@2.17.0...@pie-lib/translator@2.18.0) (2025-09-18)
63
37
 
64
38
  **Note:** Version bump only for package @pie-lib/translator
65
39
 
66
-
67
-
68
-
69
-
70
40
  # [2.17.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/translator@2.16.0...@pie-lib/translator@2.17.0) (2025-09-18)
71
41
 
72
42
  **Note:** Version bump only for package @pie-lib/translator
73
43
 
74
-
75
-
76
-
77
-
78
44
  # [2.16.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/translator@2.3.0...@pie-lib/translator@2.16.0) (2025-09-18)
79
45
 
80
-
81
46
  ### Bug Fixes
82
47
 
83
- * fixed pie-lib/icons import [PD-5126] ([dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f))
84
-
48
+ - fixed pie-lib/icons import [PD-5126](<[dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f)>)
85
49
 
86
50
  ### Features
87
51
 
88
- * split pie-toolbox into multiple packages [PD-5126] ([7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2))
89
-
90
-
91
-
92
-
52
+ - split pie-toolbox into multiple packages [PD-5126](<[7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2)>)
93
53
 
94
54
  # [2.15.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/translator@2.14.0...@pie-lib/translator@2.15.0) (2025-09-17)
95
55
 
96
56
  **Note:** Version bump only for package @pie-lib/translator
97
57
 
98
-
99
-
100
-
101
-
102
58
  # [2.14.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/translator@2.13.0...@pie-lib/translator@2.14.0) (2025-09-17)
103
59
 
104
60
  **Note:** Version bump only for package @pie-lib/translator
105
61
 
106
-
107
-
108
-
109
-
110
62
  # [2.13.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/translator@2.12.1...@pie-lib/translator@2.13.0) (2025-09-17)
111
63
 
112
64
  **Note:** Version bump only for package @pie-lib/translator
113
65
 
114
-
115
-
116
-
117
-
118
66
  ## [2.12.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/translator@2.3.0...@pie-lib/translator@2.12.1) (2025-08-11)
119
67
 
120
-
121
68
  ### Bug Fixes
122
69
 
123
- * fixed pie-lib/icons import [PD-5126] ([dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f))
124
-
70
+ - fixed pie-lib/icons import [PD-5126](<[dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f)>)
125
71
 
126
72
  ### Features
127
73
 
128
- * split pie-toolbox into multiple packages [PD-5126] ([7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2))
129
-
130
-
131
-
132
-
74
+ - split pie-toolbox into multiple packages [PD-5126](<[7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2)>)
133
75
 
134
76
  # [2.12.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/translator@2.3.0...@pie-lib/translator@2.12.0) (2025-08-07)
135
77
 
package/esm/index.js CHANGED
@@ -1,163 +1,128 @@
1
1
  function _extends() {
2
- _extends = Object.assign || function (target) {
3
- for (var i = 1; i < arguments.length; i++) {
4
- var source = arguments[i];
5
-
6
- for (var key in source) {
7
- if (Object.prototype.hasOwnProperty.call(source, key)) {
8
- target[key] = source[key];
9
- }
10
- }
2
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
3
+ for (var e = 1; e < arguments.length; e++) {
4
+ var t = arguments[e];
5
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
11
6
  }
12
-
13
- return target;
14
- };
15
-
16
- return _extends.apply(this, arguments);
7
+ return n;
8
+ }, _extends.apply(null, arguments);
17
9
  }
18
10
 
19
- function _typeof(obj) {
11
+ function _typeof(o) {
20
12
  "@babel/helpers - typeof";
21
13
 
22
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
23
- return typeof obj;
24
- } : function (obj) {
25
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
26
- }, _typeof(obj);
14
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
15
+ return typeof o;
16
+ } : function (o) {
17
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
18
+ }, _typeof(o);
27
19
  }
28
20
 
29
- function _classCallCheck(instance, Constructor) {
30
- if (!(instance instanceof Constructor)) {
31
- throw new TypeError("Cannot call a class as a function");
32
- }
21
+ function _classCallCheck(a, n) {
22
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
33
23
  }
34
24
 
35
- function _toPrimitive(input, hint) {
36
- if (_typeof(input) !== "object" || input === null) return input;
37
- var prim = input[Symbol.toPrimitive];
38
- if (prim !== undefined) {
39
- var res = prim.call(input, hint);
40
- if (_typeof(res) !== "object") return res;
25
+ function toPrimitive(t, r) {
26
+ if ("object" != _typeof(t) || !t) return t;
27
+ var e = t[Symbol.toPrimitive];
28
+ if (void 0 !== e) {
29
+ var i = e.call(t, r);
30
+ if ("object" != _typeof(i)) return i;
41
31
  throw new TypeError("@@toPrimitive must return a primitive value.");
42
32
  }
43
- return (hint === "string" ? String : Number)(input);
33
+ return ("string" === r ? String : Number)(t);
44
34
  }
45
35
 
46
- function _toPropertyKey(arg) {
47
- var key = _toPrimitive(arg, "string");
48
- return _typeof(key) === "symbol" ? key : String(key);
36
+ function toPropertyKey(t) {
37
+ var i = toPrimitive(t, "string");
38
+ return "symbol" == _typeof(i) ? i : i + "";
49
39
  }
50
40
 
51
- function _defineProperties(target, props) {
52
- for (var i = 0; i < props.length; i++) {
53
- var descriptor = props[i];
54
- descriptor.enumerable = descriptor.enumerable || false;
55
- descriptor.configurable = true;
56
- if ("value" in descriptor) descriptor.writable = true;
57
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
41
+ function _defineProperties(e, r) {
42
+ for (var t = 0; t < r.length; t++) {
43
+ var o = r[t];
44
+ o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, toPropertyKey(o.key), o);
58
45
  }
59
46
  }
60
- function _createClass(Constructor, protoProps, staticProps) {
61
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
62
- if (staticProps) _defineProperties(Constructor, staticProps);
63
- Object.defineProperty(Constructor, "prototype", {
47
+ function _createClass(e, r, t) {
48
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
64
49
  writable: false
65
- });
66
- return Constructor;
50
+ }), e;
67
51
  }
68
52
 
69
- function _assertThisInitialized(self) {
70
- if (self === void 0) {
71
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
72
- }
73
- return self;
53
+ function _assertThisInitialized(e) {
54
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
55
+ return e;
74
56
  }
75
57
 
76
- function _setPrototypeOf(o, p) {
77
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
78
- o.__proto__ = p;
79
- return o;
80
- };
81
- return _setPrototypeOf(o, p);
58
+ function _setPrototypeOf(t, e) {
59
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
60
+ return t.__proto__ = e, t;
61
+ }, _setPrototypeOf(t, e);
82
62
  }
83
63
 
84
- function _inherits(subClass, superClass) {
85
- if (typeof superClass !== "function" && superClass !== null) {
86
- throw new TypeError("Super expression must either be null or a function");
87
- }
88
- subClass.prototype = Object.create(superClass && superClass.prototype, {
64
+ function _inherits(t, e) {
65
+ if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
66
+ t.prototype = Object.create(e && e.prototype, {
89
67
  constructor: {
90
- value: subClass,
68
+ value: t,
91
69
  writable: true,
92
70
  configurable: true
93
71
  }
94
- });
95
- Object.defineProperty(subClass, "prototype", {
72
+ }), Object.defineProperty(t, "prototype", {
96
73
  writable: false
97
- });
98
- if (superClass) _setPrototypeOf(subClass, superClass);
74
+ }), e && _setPrototypeOf(t, e);
99
75
  }
100
76
 
101
- function _possibleConstructorReturn(self, call) {
102
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
103
- return call;
104
- } else if (call !== void 0) {
105
- throw new TypeError("Derived constructors may only return object or undefined");
106
- }
107
- return _assertThisInitialized(self);
77
+ function _possibleConstructorReturn(t, e) {
78
+ if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
79
+ if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
80
+ return _assertThisInitialized(t);
108
81
  }
109
82
 
110
- function _getPrototypeOf(o) {
111
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
112
- return o.__proto__ || Object.getPrototypeOf(o);
113
- };
114
- return _getPrototypeOf(o);
83
+ function _getPrototypeOf(t) {
84
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
85
+ return t.__proto__ || Object.getPrototypeOf(t);
86
+ }, _getPrototypeOf(t);
115
87
  }
116
88
 
117
- function _defineProperty(obj, key, value) {
118
- key = _toPropertyKey(key);
119
- if (key in obj) {
120
- Object.defineProperty(obj, key, {
121
- value: value,
122
- enumerable: true,
123
- configurable: true,
124
- writable: true
125
- });
126
- } else {
127
- obj[key] = value;
128
- }
129
- return obj;
89
+ function _defineProperty(e, r, t) {
90
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
91
+ value: t,
92
+ enumerable: true,
93
+ configurable: true,
94
+ writable: true
95
+ }) : e[r] = t, e;
130
96
  }
131
97
 
132
- function _arrayWithHoles(arr) {
133
- if (Array.isArray(arr)) return arr;
98
+ function _arrayWithHoles(r) {
99
+ if (Array.isArray(r)) return r;
134
100
  }
135
101
 
136
- function _iterableToArray(iter) {
137
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
102
+ function _iterableToArray(r) {
103
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
138
104
  }
139
105
 
140
- function _arrayLikeToArray(arr, len) {
141
- if (len == null || len > arr.length) len = arr.length;
142
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
143
- return arr2;
106
+ function _arrayLikeToArray(r, a) {
107
+ (null == a || a > r.length) && (a = r.length);
108
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
109
+ return n;
144
110
  }
145
111
 
146
- function _unsupportedIterableToArray(o, minLen) {
147
- if (!o) return;
148
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
149
- var n = Object.prototype.toString.call(o).slice(8, -1);
150
- if (n === "Object" && o.constructor) n = o.constructor.name;
151
- if (n === "Map" || n === "Set") return Array.from(o);
152
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
112
+ function _unsupportedIterableToArray(r, a) {
113
+ if (r) {
114
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
115
+ var t = {}.toString.call(r).slice(8, -1);
116
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
117
+ }
153
118
  }
154
119
 
155
120
  function _nonIterableRest() {
156
121
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
157
122
  }
158
123
 
159
- function _toArray(arr) {
160
- return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
124
+ function _toArray(r) {
125
+ return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest();
161
126
  }
162
127
 
163
128
  function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -532,8 +497,7 @@ var ResourceStore = function (_EventEmitter) {
532
497
  var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
533
498
  silent: false
534
499
  };
535
- var keySeparator = this.options.keySeparator;
536
- if (keySeparator === undefined) keySeparator = '.';
500
+ var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
537
501
  var path = [lng, ns];
538
502
  if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);
539
503
  if (lng.indexOf('.') > -1) {
@@ -2667,7 +2631,7 @@ instance.loadLanguages;
2667
2631
  var en = {
2668
2632
  translation: {
2669
2633
  categorize: {
2670
- limitMaxChoicesPerCategory: "You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",
2634
+ limitMaxChoicesPerCategory: 'You\'ve reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.',
2671
2635
  maxChoicesPerCategoryRestriction: 'To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].'
2672
2636
  },
2673
2637
  ebsr: {
@@ -2869,14 +2833,12 @@ var index = {
2869
2833
  const {
2870
2834
  lng
2871
2835
  } = options;
2872
-
2873
2836
  switch (lng) {
2874
2837
  // these keys don't work with plurals, don't know why, so I added a workaround to convert them to the correct lng
2875
2838
  case 'en_US':
2876
2839
  case 'en-US':
2877
2840
  options.lng = 'en';
2878
2841
  break;
2879
-
2880
2842
  case 'es_ES':
2881
2843
  case 'es-ES':
2882
2844
  case 'es_MX':
@@ -2884,7 +2846,6 @@ var index = {
2884
2846
  options.lng = 'es';
2885
2847
  break;
2886
2848
  }
2887
-
2888
2849
  return instance.t(key, _extends({
2889
2850
  lng
2890
2851
  }, options));