@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.
- package/build/dictionary.cjs +1 -2
- package/build/formatting/messages/lib.cjs +0 -2
- package/build/formatting/messages/lib.mjs +0 -1
- package/build/formatting/messages/lib.test.cjs +2 -5
- package/build/formatting/messages/lib.test.mjs +2 -4
- package/build/i18n/az.json +1 -1
- package/build/i18n/bg.json +1 -1
- package/build/i18n/cs.json +1 -1
- package/build/i18n/da.json +1 -1
- package/build/i18n/es.json +1 -1
- package/build/i18n/et.json +2 -2
- package/build/i18n/fi.json +1 -1
- package/build/i18n/he.json +1 -1
- package/build/i18n/hu.json +1 -1
- package/build/i18n/id.json +1 -1
- package/build/i18n/ja.json +3 -3
- package/build/i18n/kk.json +1 -1
- package/build/i18n/lv.json +1 -1
- package/build/i18n/mt.json +3 -3
- package/build/i18n/nb.json +1 -1
- package/build/i18n/nl.json +1 -1
- package/build/i18n/pt.json +1 -1
- package/build/i18n/ro.json +1 -1
- package/build/i18n/sk.json +1 -1
- package/build/i18n/sv.json +1 -1
- package/build/i18n/th.json +1 -1
- package/build/i18n/uk.json +1 -1
- package/build/i18n/zh-CN.json +1 -1
- package/build/i18n/zh-TW.json +1 -1
- package/build/index.cjs +1 -2
- package/build/locales/Locale.test.cjs +0 -3
- package/build/locales/Locale.test.mjs +0 -3
- package/package.json +8 -7
package/build/dictionary.cjs
CHANGED
|
@@ -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
|
|
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;
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
package/build/i18n/az.json
CHANGED
package/build/i18n/bg.json
CHANGED
package/build/i18n/cs.json
CHANGED
package/build/i18n/da.json
CHANGED
package/build/i18n/es.json
CHANGED
package/build/i18n/et.json
CHANGED
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"actions.downloadAssets": [
|
|
27
27
|
{
|
|
28
28
|
"type": 0,
|
|
29
|
-
"value": "
|
|
29
|
+
"value": "Laadi failid alla"
|
|
30
30
|
}
|
|
31
31
|
],
|
|
32
32
|
"actions.downloadPdf": [
|
|
33
33
|
{
|
|
34
34
|
"type": 0,
|
|
35
|
-
"value": "
|
|
35
|
+
"value": "Laadi PDF alla"
|
|
36
36
|
}
|
|
37
37
|
],
|
|
38
38
|
"actions.loadMore": [
|
package/build/i18n/fi.json
CHANGED
package/build/i18n/he.json
CHANGED
package/build/i18n/hu.json
CHANGED
package/build/i18n/id.json
CHANGED
package/build/i18n/ja.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"actions.copyText": [
|
|
15
15
|
{
|
|
16
16
|
"type": 0,
|
|
17
|
-
"value": "
|
|
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": "
|
|
29
|
+
"value": "メディア資産をダウンロード"
|
|
30
30
|
}
|
|
31
31
|
],
|
|
32
32
|
"actions.downloadPdf": [
|
|
33
33
|
{
|
|
34
34
|
"type": 0,
|
|
35
|
-
"value": "
|
|
35
|
+
"value": "PDFをダウンロード"
|
|
36
36
|
}
|
|
37
37
|
],
|
|
38
38
|
"actions.loadMore": [
|
package/build/i18n/kk.json
CHANGED
package/build/i18n/lv.json
CHANGED
package/build/i18n/mt.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"actions.copyText": [
|
|
15
15
|
{
|
|
16
16
|
"type": 0,
|
|
17
|
-
"value": "
|
|
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": "
|
|
29
|
+
"value": "Niżżel il-materjal"
|
|
30
30
|
}
|
|
31
31
|
],
|
|
32
32
|
"actions.downloadPdf": [
|
|
33
33
|
{
|
|
34
34
|
"type": 0,
|
|
35
|
-
"value": "
|
|
35
|
+
"value": "Niżżel il-PDF"
|
|
36
36
|
}
|
|
37
37
|
],
|
|
38
38
|
"actions.loadMore": [
|
package/build/i18n/nb.json
CHANGED
package/build/i18n/nl.json
CHANGED
package/build/i18n/pt.json
CHANGED
package/build/i18n/ro.json
CHANGED
package/build/i18n/sk.json
CHANGED
package/build/i18n/sv.json
CHANGED
package/build/i18n/th.json
CHANGED
package/build/i18n/uk.json
CHANGED
package/build/i18n/zh-CN.json
CHANGED
package/build/i18n/zh-TW.json
CHANGED
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
|
|
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.
|
|
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
|
|
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 &&
|
|
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": "
|
|
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": "
|
|
77
|
+
"gitHead": "92943e87b4ec5a60d9b04c63f2404075d6864420"
|
|
77
78
|
}
|