@prezly/theme-kit-intl 10.4.0 → 10.5.1

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.
@@ -10,8 +10,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
11
11
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
12
12
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
13
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
14
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
15
14
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
16
15
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
17
16
  function importDictionary(_x) {
@@ -11,8 +11,6 @@ exports.tokenizeMessage = tokenizeMessage;
11
11
  var _index = require("../../locales/index.cjs");
12
12
  var _index2 = require("../../utils/index.cjs");
13
13
  var _types = require("./types.cjs");
14
- /* eslint-disable @typescript-eslint/no-use-before-define */
15
-
16
14
  var getPluralRules = exports.getPluralRules = (0, _index2.withCache)(locale => new Intl.PluralRules(_index.Locale.from(locale).isoCode));
17
15
  function formatMessageFragment(locale, _ref, dictionary) {
18
16
  var _ref2, _dictionary$id;
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-use-before-define */
2
1
  import { Locale } from "../../locales/index.mjs";
3
2
  import { withCache } from "../../utils/index.mjs";
4
3
  import { IntlMessageFormat } from "./types.mjs";
@@ -2,10 +2,8 @@
2
2
 
3
3
  var _index = require("../../locales/index.cjs");
4
4
  var _lib = require("./lib.cjs");
5
- /* eslint-disable @typescript-eslint/no-use-before-define */
6
-
7
5
  var I18N = {
8
- ["hello.world"]: [{
6
+ 'hello.world': [{
9
7
  type: 0,
10
8
  value: '¡Hola, '
11
9
  }, {
@@ -15,13 +13,12 @@ var I18N = {
15
13
  type: 0,
16
14
  value: '!'
17
15
  }],
18
- ["images.count"]: [{
16
+ 'images.count': [{
19
17
  type: 0,
20
18
  value: 'Images: '
21
19
  }, {
22
20
  offset: 0,
23
21
  options: {
24
- // eslint-disable-next-line @typescript-eslint/naming-convention
25
22
  '=0': {
26
23
  value: [{
27
24
  type: 0,
@@ -1,8 +1,7 @@
1
- /* eslint-disable @typescript-eslint/no-use-before-define */
2
1
  import { Locale, supportedLocales } from "../../locales/index.mjs";
3
2
  import { formatMessageFragment, formatMessageString, getPluralRules, parseMessage, tokenizeMessage } from "./lib.mjs";
4
3
  var I18N = {
5
- ["hello.world"]: [{
4
+ 'hello.world': [{
6
5
  type: 0,
7
6
  value: '¡Hola, '
8
7
  }, {
@@ -12,13 +11,12 @@ var I18N = {
12
11
  type: 0,
13
12
  value: '!'
14
13
  }],
15
- ["images.count"]: [{
14
+ 'images.count': [{
16
15
  type: 0,
17
16
  value: 'Images: '
18
17
  }, {
19
18
  offset: 0,
20
19
  options: {
21
- // eslint-disable-next-line @typescript-eslint/naming-convention
22
20
  '=0': {
23
21
  value: [{
24
22
  type: 0,
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Aktivləri endir"
29
+ "value": "Materialları endir"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Изтегляне на обекти"
29
+ "value": "Изтегляне на материали"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Download assets"
29
+ "value": "Stáhnout podklady"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Download assets"
29
+ "value": "Download medieindhold"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Descargar activos"
29
+ "value": "Descargar archivos multimedia"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,13 +26,13 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Download assets"
29
+ "value": "Laadi failid alla"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
33
33
  {
34
34
  "type": 0,
35
- "value": "Download PDF"
35
+ "value": "Laadi PDF alla"
36
36
  }
37
37
  ],
38
38
  "actions.loadMore": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Lataa varat"
29
+ "value": "Lataa mediaresursseja"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "להורדת הנכסים"
29
+ "value": "להורדת הנכסים הדיגיטליים"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Eszközök letöltése"
29
+ "value": "Tartalmak letöltése"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Unduh aset"
29
+ "value": "Unduh materi media"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -14,7 +14,7 @@
14
14
  "actions.copyText": [
15
15
  {
16
16
  "type": 0,
17
- "value": "Copy text"
17
+ "value": "テキストをコピー"
18
18
  }
19
19
  ],
20
20
  "actions.download": [
@@ -26,13 +26,13 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Download assets"
29
+ "value": "メディア資産をダウンロード"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
33
33
  {
34
34
  "type": 0,
35
- "value": "Download PDF"
35
+ "value": "PDFをダウンロード"
36
36
  }
37
37
  ],
38
38
  "actions.loadMore": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Активтерді жүктеп алу"
29
+ "value": "Медиа файлдарды жүктеп алу"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Lejupielādēt aktīvus"
29
+ "value": "Lejupielādēt materiālus medijiem"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -14,7 +14,7 @@
14
14
  "actions.copyText": [
15
15
  {
16
16
  "type": 0,
17
- "value": "Copy text"
17
+ "value": "Ikkopja t-test"
18
18
  }
19
19
  ],
20
20
  "actions.download": [
@@ -26,13 +26,13 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Download assets"
29
+ "value": "Niżżel il-materjal"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
33
33
  {
34
34
  "type": 0,
35
- "value": "Download PDF"
35
+ "value": "Niżżel il-PDF"
36
36
  }
37
37
  ],
38
38
  "actions.loadMore": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Last ned ressurser"
29
+ "value": "Last ned medieressurser"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Assets downloaden"
29
+ "value": "Media-assets downloaden"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Descarregar ativos"
29
+ "value": "Descarregar elementos"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Descărcare active"
29
+ "value": "Descărcare resurse"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Stiahnuť aktíva"
29
+ "value": "Stiahnuť mediálne aktíva"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Ladda ner tillgångar"
29
+ "value": "Ladda ner medietillgångar"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "ดาวน์โหลดแอสเซท"
29
+ "value": "ดาวน์โหลดแอสเซทสื่อ"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "Завантажити ресурси"
29
+ "value": "Завантажити матеріали"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "下载资产"
29
+ "value": "下载资源"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
@@ -26,7 +26,7 @@
26
26
  "actions.downloadAssets": [
27
27
  {
28
28
  "type": 0,
29
- "value": "下載資產"
29
+ "value": "下載資源"
30
30
  }
31
31
  ],
32
32
  "actions.downloadPdf": [
package/build/index.cjs CHANGED
@@ -45,5 +45,4 @@ Object.keys(_index2).forEach(function (key) {
45
45
  });
46
46
  var _translations = _interopRequireWildcard(require("./messages/index.cjs"));
47
47
  exports.translations = _translations;
48
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
49
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
48
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
@@ -71,11 +71,8 @@ describe('Locale', () => {
71
71
  expect(_Locale.Locale.from('EN_US').region).toBe('US');
72
72
  });
73
73
  it('should check if two locales are equal', () => {
74
- // eslint-disable-next-line @typescript-eslint/naming-convention
75
74
  var en_US = _Locale.Locale.from('en-US');
76
- // eslint-disable-next-line @typescript-eslint/naming-convention
77
75
  var en_US2 = _Locale.Locale.from('en-US');
78
- // eslint-disable-next-line @typescript-eslint/naming-convention
79
76
  var de_DE = _Locale.Locale.from('de-DE');
80
77
  expect(_Locale.Locale.isEqual(en_US, en_US2)).toBe(true);
81
78
  expect(_Locale.Locale.isEqual(en_US2, en_US)).toBe(true);
@@ -69,11 +69,8 @@ describe('Locale', () => {
69
69
  expect(Locale.from('EN_US').region).toBe('US');
70
70
  });
71
71
  it('should check if two locales are equal', () => {
72
- // eslint-disable-next-line @typescript-eslint/naming-convention
73
72
  var en_US = Locale.from('en-US');
74
- // eslint-disable-next-line @typescript-eslint/naming-convention
75
73
  var en_US2 = Locale.from('en-US');
76
- // eslint-disable-next-line @typescript-eslint/naming-convention
77
74
  var de_DE = Locale.from('de-DE');
78
75
  expect(Locale.isEqual(en_US, en_US2)).toBe(true);
79
76
  expect(Locale.isEqual(en_US2, en_US)).toBe(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/theme-kit-intl",
3
- "version": "10.4.0",
3
+ "version": "10.5.1",
4
4
  "description": "Translations for Prezly themes",
5
5
  "type": "module",
6
6
  "main": "build/index.mjs",
@@ -28,17 +28,18 @@
28
28
  },
29
29
  "scripts": {
30
30
  "clean": "rimraf build/* *.tsbuildinfo",
31
- "prebuild": "pnpm clean && pnpm build:locales && pnpm prettier:check",
31
+ "prebuild": "pnpm clean && pnpm build:locales && pnpm format",
32
32
  "build": "pnpm intl:compile && pnpm build:types && pnpm build:esm && pnpm build:cjs",
33
- "build:locales": "node ./build-locales.cjs > src/locales/supportedLocales.ts && prettier --write ./src/locales/supportedLocales.ts",
33
+ "build:locales": "node ./build-locales.cjs > src/locales/supportedLocales.ts && biome format --write ./src/locales/supportedLocales.ts",
34
34
  "build:types": "tsc --project .",
35
35
  "build:esm": "babel --config-file=../../babel.esm.json src/ --extensions=.ts --out-dir=build/ --out-file-extension=.mjs",
36
36
  "build:cjs": "babel --config-file=../../babel.cjs.json src/ --extensions=.ts --out-dir=build/ --out-file-extension=.cjs",
37
37
  "watch": "tsc --watch --preserveWatchOutput --project .",
38
- "lint": "eslint ./src/",
38
+ "lint": "biome lint ./src/",
39
+ "lint:fix": "biome lint --write ./src/",
40
+ "format": "biome format ./src/",
41
+ "format:fix": "biome format --write ./src/",
39
42
  "typecheck": "tsc --noEmit --emitDeclarationOnly false --project .",
40
- "prettier:check": "prettier --check './src/**/*.{ts,js}'",
41
- "prettier:fix": "prettier --write './src/**/*.{ts,js}'",
42
43
  "test": "pnpm test:unit && pnpm test:build",
43
44
  "test:unit": "jest",
44
45
  "test:build": "pnpm test:build:i18n && pnpm test:build:i18n:dist && pnpm test:build:cjs && pnpm test:build:esm && pnpm test:build:types",
@@ -73,5 +74,5 @@
73
74
  "publishConfig": {
74
75
  "access": "public"
75
76
  },
76
- "gitHead": "0df96eb35e0b6ca3ffd02c2880663895c2b88e05"
77
+ "gitHead": "92943e87b4ec5a60d9b04c63f2404075d6864420"
77
78
  }