@dialpad/i18n 1.19.0 → 1.22.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.
@@ -1,22 +1,22 @@
1
1
  {"kind":"O","text":"Invoking: run-p build:* \n"}
2
2
  {"kind":"O","text":"\n"}
3
- {"kind":"O","text":"> @dialpad/i18n@1.19.0 build:main\n"}
4
- {"kind":"O","text":"> vite build --config vite.config.ts\n"}
5
- {"kind":"O","text":"\n"}
6
- {"kind":"O","text":"\n"}
7
- {"kind":"O","text":"> @dialpad/i18n@1.19.0 build:types\n"}
3
+ {"kind":"O","text":"> @dialpad/i18n@1.22.1 build:types\n"}
8
4
  {"kind":"O","text":"> rushx types:build\n"}
9
5
  {"kind":"O","text":"\n"}
10
- {"kind":"O","text":"Found configuration in /Users/daniellovero/src/wcf-sdk/rush.json\n"}
6
+ {"kind":"O","text":"\n"}
7
+ {"kind":"O","text":"> @dialpad/i18n@1.22.1 build:main\n"}
8
+ {"kind":"O","text":"> vite build --config vite.config.ts\n"}
11
9
  {"kind":"O","text":"\n"}
12
10
  {"kind":"O","text":"vite v5.4.19 building for production...\n"}
13
11
  {"kind":"O","text":"transforming...\n"}
12
+ {"kind":"O","text":"Found configuration in /Users/daniellovero/src/wcf-sdk/rush.json\n"}
13
+ {"kind":"O","text":"\n"}
14
14
  {"kind":"O","text":"\u001b[1mRush Multi-Project Build Tool 5.139.0\u001b[33m\u001b[39m\u001b[22m - Node.js 20.14.0 (LTS)\n"}
15
15
  {"kind":"O","text":"> \"tsc\"\n"}
16
16
  {"kind":"O","text":"\n"}
17
17
  {"kind":"O","text":"✓ 30 modules transformed.\n"}
18
18
  {"kind":"O","text":"rendering chunks...\n"}
19
19
  {"kind":"O","text":"computing gzip size...\n"}
20
- {"kind":"O","text":"dist/i18n.js 209.85 kB │ gzip: 49.05 kB │ map: 511.13 kB\n"}
21
- {"kind":"O","text":"dist/i18n.cjs 210.03 kB │ gzip: 49.09 kB │ map: 511.37 kB\n"}
22
- {"kind":"O","text":"✓ built in 527ms\n"}
20
+ {"kind":"O","text":"dist/i18n.js 209.99 kB │ gzip: 49.06 kB │ map: 511.23 kB\n"}
21
+ {"kind":"O","text":"dist/i18n.cjs 210.17 kB │ gzip: 49.11 kB │ map: 511.47 kB\n"}
22
+ {"kind":"O","text":"✓ built in 806ms\n"}
@@ -0,0 +1,19 @@
1
+ {"kind":"O","text":"Invoking: prettier ./ --write \n"}
2
+ {"kind":"O","text":".eslintrc.cjs 27ms\n"}
3
+ {"kind":"O","text":".rush/temp/package-deps_build.json 3ms\n"}
4
+ {"kind":"O","text":".rush/temp/package-deps_format.json 3ms\n"}
5
+ {"kind":"O","text":".rush/temp/shrinkwrap-deps.json 1ms\n"}
6
+ {"kind":"O","text":"base-tsconfig.json 4ms\n"}
7
+ {"kind":"O","text":"CHANGELOG.json 2ms\n"}
8
+ {"kind":"O","text":"eslint-tsconfig.json 1ms\n"}
9
+ {"kind":"O","text":"index.html 16ms\n"}
10
+ {"kind":"O","text":"index.ts 80ms\n"}
11
+ {"kind":"O","text":"package.json 4ms\n"}
12
+ {"kind":"O","text":"README.md 131ms\n"}
13
+ {"kind":"O","text":"src/__test__/locale-manager.find.test.ts 10ms\n"}
14
+ {"kind":"O","text":"src/__test__/locale-manager.formatters.test.ts 15ms\n"}
15
+ {"kind":"O","text":"src/__test__/locale-manager.multiple.test.ts 28ms\n"}
16
+ {"kind":"O","text":"src/__test__/locale-manager.test.ts 40ms\n"}
17
+ {"kind":"O","text":"src/locale-manager.ts 12ms\n"}
18
+ {"kind":"O","text":"tsconfig.json 2ms\n"}
19
+ {"kind":"O","text":"vite.config.ts 3ms\n"}
@@ -3,19 +3,20 @@
3
3
  "packages/i18n/.eslintignore": "1521c8b7652b1eec8ed4fe50877aae880c758ee3",
4
4
  "packages/i18n/.eslintrc.cjs": "1eca07632b4762f57e40cccd4b808bc18c884601",
5
5
  "packages/i18n/.prettierignore": "f9bf3e12a0286559870c1b9dd351fced90e4453a",
6
- "packages/i18n/.rush/temp/shrinkwrap-deps.json": "f64590f143cd08b231ae7ed696961aeaed7e2fc0",
7
- "packages/i18n/CHANGELOG.md": "e11ebc3801d372e5e86e919e767cce4790b591bb",
6
+ "packages/i18n/.rush/temp/shrinkwrap-deps.json": "4d71ae7fe68e4292ec72b5f42fdbde7ebfa0f2ec",
7
+ "packages/i18n/CHANGELOG.json": "639da276884d23093f9215dd9df604f61ca7ea1a",
8
+ "packages/i18n/CHANGELOG.md": "e8be4693d4e354020ef8ce269e04bb2007d8d9ca",
8
9
  "packages/i18n/README.md": "b59c69396aff68a5b98e872d9f4be9f44ae48886",
9
10
  "packages/i18n/base-tsconfig.json": "e4ff7f322e6888e7347ef42d468b717928d9cf3d",
10
11
  "packages/i18n/eslint-tsconfig.json": "689b2ed5a1dad17383d038ba1f7c434f6dfe2448",
11
12
  "packages/i18n/index.html": "0ac726f481ef9093213d67a9e2176be12da9abc7",
12
13
  "packages/i18n/index.ts": "e5271326e515dea0105fa4bc9aa4e3072fda8fa8",
13
- "packages/i18n/package.json": "1ee1d302fe01477df231466d0fcdad77ffef6f3a",
14
+ "packages/i18n/package.json": "96f41052e895ce6fc5bfb06420a8d22a6daddacc",
14
15
  "packages/i18n/src/__test__/locale-manager.find.test.ts": "700205de770e909c3b0b18854c1d460ec4dbb2c4",
15
16
  "packages/i18n/src/__test__/locale-manager.formatters.test.ts": "47b3077e0441472c04ada1f3e82939b5c8dd77da",
16
17
  "packages/i18n/src/__test__/locale-manager.multiple.test.ts": "3209b4134a45132ba045b0c8e04163f90abb00d1",
17
18
  "packages/i18n/src/__test__/locale-manager.test.ts": "36a3ac02ce76c125ad546f6195f9949d017a9c2e",
18
- "packages/i18n/src/locale-manager.ts": "76d269964cb339af0609a5dd41a5dbf68376c26b",
19
+ "packages/i18n/src/locale-manager.ts": "4ae53527d22a23ad0af88e4813d9391ea6eb8adf",
19
20
  "packages/i18n/tsconfig.json": "b0fc97224f5467ae8f83e9301e826eda5ef8b1c6",
20
21
  "packages/i18n/vite.config.ts": "7f0701b5913cbec70bde2530c1d6bb0d1f17216d"
21
22
  },
@@ -0,0 +1,24 @@
1
+ {
2
+ "files": {
3
+ "packages/i18n/.eslintignore": "1521c8b7652b1eec8ed4fe50877aae880c758ee3",
4
+ "packages/i18n/.eslintrc.cjs": "1eca07632b4762f57e40cccd4b808bc18c884601",
5
+ "packages/i18n/.prettierignore": "f9bf3e12a0286559870c1b9dd351fced90e4453a",
6
+ "packages/i18n/.rush/temp/shrinkwrap-deps.json": "fe14fa042556f6d48e7eaa5525661ec58f77941b",
7
+ "packages/i18n/CHANGELOG.json": "639da276884d23093f9215dd9df604f61ca7ea1a",
8
+ "packages/i18n/CHANGELOG.md": "e8be4693d4e354020ef8ce269e04bb2007d8d9ca",
9
+ "packages/i18n/README.md": "ccab724d6b7c5304790e52bbed87b7415b4ad15f",
10
+ "packages/i18n/base-tsconfig.json": "e4ff7f322e6888e7347ef42d468b717928d9cf3d",
11
+ "packages/i18n/eslint-tsconfig.json": "689b2ed5a1dad17383d038ba1f7c434f6dfe2448",
12
+ "packages/i18n/index.html": "0ac726f481ef9093213d67a9e2176be12da9abc7",
13
+ "packages/i18n/index.ts": "e5271326e515dea0105fa4bc9aa4e3072fda8fa8",
14
+ "packages/i18n/package.json": "081673c47c47ed17646d4ea39fa0c3c105b7482c",
15
+ "packages/i18n/src/__test__/locale-manager.find.test.ts": "700205de770e909c3b0b18854c1d460ec4dbb2c4",
16
+ "packages/i18n/src/__test__/locale-manager.formatters.test.ts": "47b3077e0441472c04ada1f3e82939b5c8dd77da",
17
+ "packages/i18n/src/__test__/locale-manager.multiple.test.ts": "3209b4134a45132ba045b0c8e04163f90abb00d1",
18
+ "packages/i18n/src/__test__/locale-manager.test.ts": "36a3ac02ce76c125ad546f6195f9949d017a9c2e",
19
+ "packages/i18n/src/locale-manager.ts": "76d269964cb339af0609a5dd41a5dbf68376c26b",
20
+ "packages/i18n/tsconfig.json": "b0fc97224f5467ae8f83e9301e826eda5ef8b1c6",
21
+ "packages/i18n/vite.config.ts": "7f0701b5913cbec70bde2530c1d6bb0d1f17216d"
22
+ },
23
+ "arguments": "prettier ./ --write "
24
+ }
@@ -1,10 +1,12 @@
1
1
  {
2
- "../../packages/i18n": "../../packages/i18n:2YDnIpy/GcRnSbJ6fQq7tLgY1x90fb+g2i8oF0MJ7Ng=:",
3
- "/@vitejs/plugin-vue@5.1.5(vite@5.4.19(@types/node@24.3.0))(vue@3.5.18(typescript@5.6.3))": "Missing shrinkwrap entry!",
2
+ "../../packages/i18n": "../../packages/i18n:xBqNbzBtZNhESpaPNxV2/iJMZoT8+3/v6QegKZ0mfU8=:",
3
+ "/@vitejs/plugin-vue@5.1.5(vite@5.4.19(@types/node@24.3.0))(vue@3.5.20(typescript@5.6.3))": "Missing shrinkwrap entry!",
4
+ "/eslint@9.13.0": "Missing shrinkwrap entry!",
4
5
  "/npm-run-all@4.1.5": "Missing shrinkwrap entry!",
6
+ "/prettier@2.8.8": "Missing shrinkwrap entry!",
5
7
  "/typescript@5.6.3": "Missing shrinkwrap entry!",
6
8
  "/vite@5.4.19(@types/node@24.3.0)": "Missing shrinkwrap entry!",
7
9
  "/vitest@2.1.9(@types/node@24.3.0)(jsdom@21.1.1)": "Missing shrinkwrap entry!",
8
10
  "/vue-tsc@1.8.8(typescript@5.6.3)": "Missing shrinkwrap entry!",
9
- "/vue@3.5.18(typescript@5.6.3)": "Missing shrinkwrap entry!"
11
+ "/vue@3.5.20(typescript@5.6.3)": "Missing shrinkwrap entry!"
10
12
  }
package/CHANGELOG.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@dialpad/i18n",
3
+ "entries": [
4
+ {
5
+ "version": "1.22.1",
6
+ "tag": "@dialpad/i18n_v1.22.1",
7
+ "date": "Wed, 19 Nov 2025 19:38:28 GMT",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "comment": "expose missing types to keep backward compatibiliy"
12
+ }
13
+ ]
14
+ }
15
+ },
16
+ {
17
+ "version": "1.22.0",
18
+ "tag": "@dialpad/i18n_v1.22.0",
19
+ "date": "Mon, 17 Nov 2025 14:44:58 GMT",
20
+ "comments": {
21
+ "minor": [
22
+ {
23
+ "comment": "enhance useI18N function for non vue components"
24
+ }
25
+ ],
26
+ "dependency": [
27
+ {
28
+ "comment": "Updating dependency \"@dialpad/i18n-services\" to `1.11.0`"
29
+ }
30
+ ]
31
+ }
32
+ },
33
+ {
34
+ "version": "1.20.1",
35
+ "tag": "@dialpad/i18n_v1.20.1",
36
+ "date": "Fri, 29 Aug 2025 20:24:21 GMT",
37
+ "comments": {
38
+ "dependency": [
39
+ {
40
+ "comment": "Updating dependency \"@dialpad/eslint-config\" to `2.1.0`"
41
+ }
42
+ ]
43
+ }
44
+ },
45
+ {
46
+ "version": "1.20.0",
47
+ "tag": "@dialpad/i18n_v1.20.0",
48
+ "date": "Tue, 26 Aug 2025 04:07:36 GMT",
49
+ "comments": {
50
+ "minor": [
51
+ {
52
+ "comment": "migrated i18n package"
53
+ }
54
+ ],
55
+ "dependency": [
56
+ {
57
+ "comment": "Updating dependency \"@dialpad/i18n-services\" to `1.9.0`"
58
+ }
59
+ ]
60
+ }
61
+ }
62
+ ]
63
+ }
package/CHANGELOG.md CHANGED
@@ -1,55 +1,30 @@
1
- ## [@dialpad/i18n-v1.17.1](https://github.com/dialpad/web-clients/compare/@dialpad/i18n-v1.17.0...@dialpad/i18n-v1.17.1) (2025-08-05)
1
+ # Change Log - @dialpad/i18n
2
2
 
3
+ This log was last generated on Wed, 19 Nov 2025 19:38:28 GMT and should not be manually modified.
3
4
 
4
- ### Bug Fixes
5
+ ## 1.22.1
6
+ Wed, 19 Nov 2025 19:38:28 GMT
5
7
 
6
- * change postinstall to prepare on i18n ([#1357](https://github.com/dialpad/web-clients/issues/1357)) ([6655c50](https://github.com/dialpad/web-clients/commit/6655c506143260513ddb6a65b85e0fd992a89792))
8
+ ### Patches
7
9
 
8
- ## [@dialpad/i18n-v1.17.0](https://github.com/dialpad/web-clients/compare/@dialpad/i18n-v1.16.1...@dialpad/i18n-v1.17.0) (2025-08-05)
10
+ - expose missing types to keep backward compatibiliy
9
11
 
12
+ ## 1.22.0
13
+ Mon, 17 Nov 2025 14:44:58 GMT
10
14
 
11
- ### Features
15
+ ### Minor changes
12
16
 
13
- * **infra-8734:** several improvements to bundle and setup ([#1353](https://github.com/dialpad/web-clients/issues/1353)) ([3020dc7](https://github.com/dialpad/web-clients/commit/3020dc77e4c8085b1a6df442434140406ad9b923))
17
+ - enhance useI18N function for non vue components
14
18
 
15
- ## [@dialpad/i18n-v1.16.1](https://github.com/dialpad/web-clients/compare/@dialpad/i18n-v1.16.0...@dialpad/i18n-v1.16.1) (2025-07-28)
19
+ ## 1.20.1
20
+ Fri, 29 Aug 2025 20:24:21 GMT
16
21
 
22
+ _Version update only_
17
23
 
18
- ### Bug Fixes
24
+ ## 1.20.0
25
+ Tue, 26 Aug 2025 04:07:36 GMT
19
26
 
20
- * add fallback mechanism when vue instance is not accesible to find localemanagers ([#1334](https://github.com/dialpad/web-clients/issues/1334)) ([2396daa](https://github.com/dialpad/web-clients/commit/2396daa77a838d1de1adcad4db4b0d92c046966c))
27
+ ### Minor changes
21
28
 
22
- ## [@dialpad/i18n-v1.16.0](https://github.com/dialpad/web-clients/compare/@dialpad/i18n-v1.15.0...@dialpad/i18n-v1.16.0) (2025-07-02)
29
+ - migrated i18n package
23
30
 
24
-
25
- ### Features
26
-
27
- * add localstorage wrapper to i18n ([#1321](https://github.com/dialpad/web-clients/issues/1321)) ([1a34a80](https://github.com/dialpad/web-clients/commit/1a34a80c035079decf2670be1bb43a1671aa97eb))
28
-
29
- ## [@dialpad/i18n-v1.15.0](https://github.com/dialpad/web-clients/compare/@dialpad/i18n-v1.14.1...@dialpad/i18n-v1.15.0) (2025-05-21)
30
-
31
-
32
- ### Features
33
-
34
- * **infra-7827:** improvements to install in dp1 and to add sources on the fly ([#1273](https://github.com/dialpad/web-clients/issues/1273)) ([8ed826b](https://github.com/dialpad/web-clients/commit/8ed826b8f404b699a4297f25fa5e536bc89bf1c6))
35
-
36
- ## [@dialpad/i18n-v1.14.1](https://github.com/dialpad/web-clients/compare/@dialpad/i18n-v1.14.0...@dialpad/i18n-v1.14.1) (2025-04-01)
37
-
38
-
39
- ### Bug Fixes
40
-
41
- * add repository field to package json ([#1241](https://github.com/dialpad/web-clients/issues/1241)) ([6db2cdf](https://github.com/dialpad/web-clients/commit/6db2cdf23ee3e2ee7661a878f122c169bc0ceead))
42
-
43
- ## [@dialpad/i18n-v1.14.0](https://github.com/dialpad/web-clients/compare/@dialpad/i18n-v1.13.0...@dialpad/i18n-v1.14.0) (2025-03-05)
44
-
45
-
46
- ### Features
47
-
48
- * **infra-7804:** add translations screenshots flows to upload and check ([#1139](https://github.com/dialpad/web-clients/issues/1139)) ([1aa5a79](https://github.com/dialpad/web-clients/commit/1aa5a790e4485d45ba9d923bb09d6a5186d22621))
49
-
50
- ## [@dialpad/i18n-v1.13.0](https://github.com/dialpad/web-clients/compare/@dialpad/i18n-v1.12.1...@dialpad/i18n-v1.13.0) (2025-01-23)
51
-
52
-
53
- ### Features
54
-
55
- * **infra-7599:** add vue2 and vue3 compatibility ([#1126](https://github.com/dialpad/web-clients/issues/1126)) ([f0d016b](https://github.com/dialpad/web-clients/commit/f0d016bfe7bc9f22fd0fc594e303b48487b7cca8))
package/README.md CHANGED
@@ -309,8 +309,6 @@ const buttonAttrs = $ta('BUTTON_NAME', { title: 'Submit' });
309
309
  In both cases, any valid fluent syntax is allowed, so the usage of
310
310
  [it might include functions](https://projectfluent.org/fluent/guide/functions.html)
311
311
  or any other feature provided [by the framework](https://projectfluent.org/).
312
- (You can find
313
- [real world examples on this file](../app-core/src/localization/en-US.ftl))
314
312
 
315
313
  ##### Vue component example - $t, $ta
316
314
 
package/dist/i18n.cjs CHANGED
@@ -6648,7 +6648,7 @@ class BaseLocaleManager {
6648
6648
  if (this._resolveReady) this._resolveReady(null);
6649
6649
  }
6650
6650
  initFluent() {
6651
- return createFluentVue({ bundles: this.currentBundles });
6651
+ return this.fluent ?? (this.fluent = createFluentVue({ bundles: this.currentBundles }));
6652
6652
  }
6653
6653
  determineLocale({
6654
6654
  preferredLocale,
@@ -6811,9 +6811,7 @@ class LocaleManager extends BaseLocaleManager {
6811
6811
  * Defaults to 'default'
6812
6812
  */
6813
6813
  install(app, namespace = "default") {
6814
- if (this.fluent === null) {
6815
- this.fluent = this.initFluent();
6816
- }
6814
+ this.initFluent();
6817
6815
  this.addToVue(app, namespace);
6818
6816
  }
6819
6817
  addToVue(app, namespace) {
@@ -6885,6 +6883,22 @@ class LocaleManager extends BaseLocaleManager {
6885
6883
  });
6886
6884
  return localeManagers;
6887
6885
  }
6886
+ useI18N(namespace = "default") {
6887
+ this.initFluent();
6888
+ const l = this;
6889
+ return {
6890
+ currentLocale: vue.computed(() => this.currentLocaleProp.value),
6891
+ setI18N: (args, namespace2) => {
6892
+ l.changeLocale(args, namespace2);
6893
+ },
6894
+ get $t() {
6895
+ return l.fluentFormat;
6896
+ },
6897
+ get $ta() {
6898
+ return l.fluentFormatAttrs;
6899
+ }
6900
+ };
6901
+ }
6888
6902
  }
6889
6903
  function findLocaleManager(namespace) {
6890
6904
  const injectionKey = parseInjectionName(namespace);
@@ -6898,14 +6912,7 @@ function useI18N(namespace = "default") {
6898
6912
  `locale manager doesn't exist using ${namespace}. Make sure your locale manager was set up correctly`
6899
6913
  );
6900
6914
  }
6901
- return {
6902
- currentLocale: vue.computed(() => localeManager.currentLocaleProp.value),
6903
- setI18N: (args, namespace2) => {
6904
- localeManager.changeLocale(args, namespace2);
6905
- },
6906
- $t: localeManager.fluentFormat,
6907
- $ta: localeManager.fluentFormatAttrs
6908
- };
6915
+ return localeManager.useI18N(namespace);
6909
6916
  }
6910
6917
  function parseInjectionName(namespace) {
6911
6918
  return `${INJECTION_KEY_PREFIX}.${namespace}`;