@taon-dev/i18n 21.0.23 → 21.0.24

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.
Files changed (102) hide show
  1. package/VERIFIED-BUILD-DATA.jsonc +4 -4
  2. package/bin/start.js +37 -37
  3. package/browser/README.md +24 -24
  4. package/browser/fesm2022/i18n-browser.mjs +174 -10
  5. package/browser/fesm2022/i18n-browser.mjs.map +1 -1
  6. package/browser/package.json +1 -1
  7. package/browser/types/i18n-browser.d.ts +30 -10
  8. package/browser-prod/README.md +24 -24
  9. package/browser-prod/fesm2022/i18n-browser-prod.mjs +172 -10
  10. package/browser-prod/fesm2022/i18n-browser-prod.mjs.map +1 -1
  11. package/browser-prod/package.json +1 -1
  12. package/browser-prod/types/i18n-browser-prod.d.ts +31 -11
  13. package/browser-prod.split-namespaces.json +5 -1
  14. package/lib/build-info._auto-generated_.d.ts +1 -1
  15. package/lib/build-info._auto-generated_.js +1 -1
  16. package/lib/i18n/lib.translation.d.ts +4 -0
  17. package/lib/i18n/lib.translation.js +5 -0
  18. package/lib/i18n/lib.translation.js.map +1 -0
  19. package/lib/i18n/translation.ts.en-US.i18n.data.d.ts +17 -0
  20. package/lib/i18n/translation.ts.en-US.i18n.data.js +23 -0
  21. package/lib/i18n/translation.ts.en-US.i18n.data.js.map +1 -0
  22. package/lib/i18n/translation.ts.pl-PL.i18n.data.d.ts +17 -0
  23. package/lib/i18n/translation.ts.pl-PL.i18n.data.js +23 -0
  24. package/lib/i18n/translation.ts.pl-PL.i18n.data.js.map +1 -0
  25. package/lib/index._auto-generated_.d.ts +2 -1
  26. package/lib/index._auto-generated_.js +1 -0
  27. package/lib/index._auto-generated_.js.map +1 -1
  28. package/lib/package.json +1 -1
  29. package/lib/translate.service.d.ts +0 -6
  30. package/lib/translation-manager.js +2 -1
  31. package/lib/translation-manager.js.map +1 -1
  32. package/lib/utils-i18n-extract-gettext-translate-from-html.test.js +42 -0
  33. package/lib/utils-i18n-extract-gettext-translate-from-html.test.js.map +1 -1
  34. package/lib/utils-i18n-html.d.ts +5 -1
  35. package/lib/utils-i18n-html.js +125 -2
  36. package/lib/utils-i18n-html.js.map +1 -1
  37. package/lib/utils-i18n-html.test.js +35 -0
  38. package/lib/utils-i18n-html.test.js.map +1 -1
  39. package/lib-esm/app.electron.d.ts +1 -1
  40. package/lib-esm/app.electron.js +1 -1
  41. package/lib-esm/app.hosts.d.ts +3 -3
  42. package/lib-esm/app.hosts.js +8 -8
  43. package/lib-esm/lib/build-info._auto-generated_.d.ts +1 -1
  44. package/lib-esm/lib/build-info._auto-generated_.js +1 -1
  45. package/lib-esm/lib/i18n/lib.translation.d.ts +4 -0
  46. package/lib-esm/lib/i18n/lib.translation.js +4 -0
  47. package/lib-esm/lib/i18n/lib.translation.js.map +1 -0
  48. package/lib-esm/lib/i18n/translation.ts.en-US.i18n.data.d.ts +17 -0
  49. package/lib-esm/lib/i18n/translation.ts.en-US.i18n.data.js +21 -0
  50. package/lib-esm/lib/i18n/translation.ts.en-US.i18n.data.js.map +1 -0
  51. package/lib-esm/lib/i18n/translation.ts.pl-PL.i18n.data.d.ts +17 -0
  52. package/lib-esm/lib/i18n/translation.ts.pl-PL.i18n.data.js +21 -0
  53. package/lib-esm/lib/i18n/translation.ts.pl-PL.i18n.data.js.map +1 -0
  54. package/lib-esm/lib/index._auto-generated_.d.ts +1 -0
  55. package/lib-esm/lib/index._auto-generated_.js +1 -0
  56. package/lib-esm/lib/index._auto-generated_.js.map +1 -1
  57. package/lib-esm/lib/translation-manager.js +2 -1
  58. package/lib-esm/lib/translation-manager.js.map +1 -1
  59. package/lib-esm/lib/utils-i18n-extract-gettext-translate-from-html.test.js +42 -0
  60. package/lib-esm/lib/utils-i18n-extract-gettext-translate-from-html.test.js.map +1 -1
  61. package/lib-esm/lib/utils-i18n-html.d.ts +5 -1
  62. package/lib-esm/lib/utils-i18n-html.js +125 -2
  63. package/lib-esm/lib/utils-i18n-html.js.map +1 -1
  64. package/lib-esm/lib/utils-i18n-html.test.js +35 -0
  65. package/lib-esm/lib/utils-i18n-html.test.js.map +1 -1
  66. package/lib-prod/build-info._auto-generated_.d.ts +1 -1
  67. package/lib-prod/build-info._auto-generated_.js +1 -1
  68. package/lib-prod/i18n/lib.translation.d.ts +4 -0
  69. package/lib-prod/i18n/lib.translation.js +4 -0
  70. package/lib-prod/i18n/lib.translation.js.map +1 -0
  71. package/lib-prod/i18n/translation.ts.en-US.i18n.data.d.ts +17 -0
  72. package/lib-prod/i18n/translation.ts.en-US.i18n.data.js +21 -0
  73. package/lib-prod/i18n/translation.ts.en-US.i18n.data.js.map +1 -0
  74. package/lib-prod/i18n/translation.ts.pl-PL.i18n.data.d.ts +17 -0
  75. package/lib-prod/i18n/translation.ts.pl-PL.i18n.data.js +21 -0
  76. package/lib-prod/i18n/translation.ts.pl-PL.i18n.data.js.map +1 -0
  77. package/lib-prod/index._auto-generated_.d.ts +1 -0
  78. package/lib-prod/index._auto-generated_.js +1 -0
  79. package/lib-prod/index._auto-generated_.js.map +1 -1
  80. package/lib-prod/package.json +1 -1
  81. package/lib-prod/translation-manager.js +2 -1
  82. package/lib-prod/translation-manager.js.map +1 -1
  83. package/lib-prod/utils-i18n-extract-gettext-translate-from-html.test.js +42 -0
  84. package/lib-prod/utils-i18n-extract-gettext-translate-from-html.test.js.map +1 -1
  85. package/lib-prod/utils-i18n-html.d.ts +5 -1
  86. package/lib-prod/utils-i18n-html.js +122 -1
  87. package/lib-prod/utils-i18n-html.js.map +1 -1
  88. package/lib-prod/utils-i18n-html.test.js +35 -0
  89. package/lib-prod/utils-i18n-html.test.js.map +1 -1
  90. package/lib-prod.split-namespaces.json +5 -1
  91. package/package.json +1 -1
  92. package/websql/README.md +24 -24
  93. package/websql/fesm2022/i18n-websql.mjs +174 -10
  94. package/websql/fesm2022/i18n-websql.mjs.map +1 -1
  95. package/websql/package.json +1 -1
  96. package/websql/types/i18n-websql.d.ts +30 -10
  97. package/websql-prod/README.md +24 -24
  98. package/websql-prod/fesm2022/i18n-websql-prod.mjs +172 -10
  99. package/websql-prod/fesm2022/i18n-websql-prod.mjs.map +1 -1
  100. package/websql-prod/package.json +1 -1
  101. package/websql-prod/types/i18n-websql-prod.d.ts +31 -11
  102. package/websql-prod.split-namespaces.json +5 -1
@@ -1,5 +1,5 @@
1
- {
2
- "commitHash": "9d0773ac062e5b6200451e97d1cfb8f5eb819c5b",
3
- "commitName": "release: v21.0.22",
4
- "commitDate": "04-07-2026 02:32:49"
1
+ {
2
+ "commitHash": "b5cdff04dd4ec5aad4330701de8c013d8e218c72",
3
+ "commitName": "fix: skip localstorage when change language for backend",
4
+ "commitDate": "04-07-2026 18:23:40"
5
5
  }
package/bin/start.js CHANGED
@@ -1,38 +1,38 @@
1
- global.frameworkName = 'i18n';
2
- Error.stackTraceLimit = 100;
3
- global.i0 = {
4
- defineInjectable: function () { }
5
- }
6
- const process= require('process');
7
- global.currentTaonScriptStartDateTime = process.hrtime.bigint();
8
-
9
- process.removeAllListeners('warning');
10
- var argv = process.argv;
11
-
12
- global.hideLog = true;
13
- global.verboseLevel = 0;
14
- var verboseLevel = argv.find(a => a.startsWith('-verbose='));
15
- if (typeof verboseLevel !== 'undefined') {
16
- global.hideLog = false;
17
- verboseLevel = Number(verboseLevel.replace('-verbose=', ''));
18
- if (!isNaN(verboseLevel)) {
19
- global.verboseLevel = verboseLevel;
20
- }
21
- argv = argv.filter(a => !a.startsWith('-verbose='));
22
- }
23
-
24
- if (argv.includes('-verbose')) {
25
- global.hideLog = false;
26
- argv = argv.filter(a => a !== '-verbose');
27
- }
28
-
29
- const fs = require('fs');
30
- const path = require('path');
31
- var pathToCliJS = {
32
- distDev: path.join(__dirname, '../dist/cli.js'),
33
- localOrNPm: path.join(__dirname, '../cli.js')
34
- }
35
- var p = fs.existsSync(pathToCliJS.distDev) ? pathToCliJS.distDev : pathToCliJS.localOrNPm;
36
- global.globalSystemToolMode = true;
37
- var run = require(p).startCli;
1
+ global.frameworkName = 'i18n';
2
+ Error.stackTraceLimit = 100;
3
+ global.i0 = {
4
+ defineInjectable: function () { }
5
+ }
6
+ const process= require('process');
7
+ global.currentTaonScriptStartDateTime = process.hrtime.bigint();
8
+
9
+ process.removeAllListeners('warning');
10
+ var argv = process.argv;
11
+
12
+ global.hideLog = true;
13
+ global.verboseLevel = 0;
14
+ var verboseLevel = argv.find(a => a.startsWith('-verbose='));
15
+ if (typeof verboseLevel !== 'undefined') {
16
+ global.hideLog = false;
17
+ verboseLevel = Number(verboseLevel.replace('-verbose=', ''));
18
+ if (!isNaN(verboseLevel)) {
19
+ global.verboseLevel = verboseLevel;
20
+ }
21
+ argv = argv.filter(a => !a.startsWith('-verbose='));
22
+ }
23
+
24
+ if (argv.includes('-verbose')) {
25
+ global.hideLog = false;
26
+ argv = argv.filter(a => a !== '-verbose');
27
+ }
28
+
29
+ const fs = require('fs');
30
+ const path = require('path');
31
+ var pathToCliJS = {
32
+ distDev: path.join(__dirname, '../dist/cli.js'),
33
+ localOrNPm: path.join(__dirname, '../cli.js')
34
+ }
35
+ var p = fs.existsSync(pathToCliJS.distDev) ? pathToCliJS.distDev : pathToCliJS.localOrNPm;
36
+ global.globalSystemToolMode = true;
37
+ var run = require(p).startCli;
38
38
  run(argv,__filename);
package/browser/README.md CHANGED
@@ -1,24 +1,24 @@
1
- # MyLib
2
-
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.0.
4
-
5
- ## Code scaffolding
6
-
7
- Run `ng generate component component-name --project my-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project my-lib`.
8
- > Note: Don't forget to add `--project my-lib` or else it will be added to the default project in your `angular.json` file.
9
-
10
- ## Build
11
-
12
- Run `ng build my-lib` to build the project. The build artifacts will be stored in the `dist/` directory.
13
-
14
- ## Publishing
15
-
16
- After building your library with `ng build my-lib`, go to the dist folder `cd dist/my-lib` and run `npm publish`.
17
-
18
- ## Running unit tests
19
-
20
- Run `ng test my-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
-
22
- ## Further help
23
-
24
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
1
+ # MyLib
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project my-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project my-lib`.
8
+ > Note: Don't forget to add `--project my-lib` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build my-lib` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build my-lib`, go to the dist folder `cd dist/my-lib` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test my-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
@@ -28,7 +28,7 @@ const CURRENT_PACKAGE_TAON_VERSION = 'v21';
28
28
  /**
29
29
  * Autogenerated by current cli tool. Use *tnp release* to bump version.
30
30
  */
31
- const CURRENT_PACKAGE_VERSION = '21.0.23';
31
+ const CURRENT_PACKAGE_VERSION = '21.0.24';
32
32
  // THIS FILE IS GENERATED - DO NOT MODIFY
33
33
 
34
34
  //#region tnp-helpers cli template
@@ -171,7 +171,9 @@ class TranslationManager {
171
171
  async changeGlobalLang(lang) {
172
172
  this.loadingLangsSubjectSrc.next(true);
173
173
  this.currentGlobalLanguage = lang;
174
+ //#region @browser
174
175
  localStorage.setItem(globalTaonLanguageLocalKeyLocalStor, lang);
176
+ //#endregion
175
177
  try {
176
178
  await Promise.all([...this.instances].map(c => c.useGlobalFileLang(lang)));
177
179
  }
@@ -392,7 +394,7 @@ class Translation {
392
394
  /*
393
395
  // import {Translation} from 'taon'
394
396
 
395
- const t = Translation.for('src/lib/translation.ts', {}); // in runtime replaced with proper stuff
397
+ const t = Translation.for('src/lib/translation.ts', {"src/lib/translation.ts":{"en-US":async () => (await import('./i18n/translation.ts.en-US.i18n.data')).default,"pl-PL":async () => (await import('./i18n/translation.ts.pl-PL.i18n.data')).default}} as any); // in runtime replaced with proper stuff
396
398
 
397
399
  t.gettext('asdasd');
398
400
 
@@ -509,12 +511,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
509
511
  class TranslateService {
510
512
  constructor() {
511
513
  this.manager = TranslationManager.Instance;
512
- /**
513
- * TODO
514
- */
515
- this.isLoadingLangs$ = this.manager.isLoadingLangs$;
516
- this.availableLangs$ = this.manager.availableLangs$;
517
- this.currentGlobalLanguage$ = this.manager.currentGlobalLanguage$;
518
514
  }
519
515
  setOneLanguagePernament(lang) {
520
516
  this.manager.setOneLanguagePernament(lang);
@@ -1114,12 +1110,17 @@ var UtilsI18nHtml;
1114
1110
  return UtilsI18nExtractGettextTranslateFromHtml.extractGettextTranslateFromHtml(html, fileName);
1115
1111
  }
1116
1112
  UtilsI18nHtml.extractGettextTranslateFromHtml = extractGettextTranslateFromHtml;
1117
- function replaceTranslatePipieDirectiveTContext(html) {
1113
+ function replaceTranslatePipieDirectiveTContext(html, options) {
1118
1114
  /* */
1119
1115
  /* */
1120
1116
  /* */
1121
1117
  /* */
1122
1118
  /* */
1119
+ /* */
1120
+ return (void 0);
1121
+ }
1122
+ UtilsI18nHtml.replaceTranslatePipieDirectiveTContext = replaceTranslatePipieDirectiveTContext;
1123
+ function isAngularTsWithInlineHtml(content) {
1123
1124
  /* */
1124
1125
  /* */
1125
1126
  /* */
@@ -1130,6 +1131,10 @@ var UtilsI18nHtml;
1130
1131
  /* */
1131
1132
  /* */
1132
1133
  /* */
1134
+ return (void 0);
1135
+ }
1136
+ UtilsI18nHtml.isAngularTsWithInlineHtml = isAngularTsWithInlineHtml;
1137
+ function replaceInAngularInlineTemplates(content) {
1133
1138
  /* */
1134
1139
  /* */
1135
1140
  /* */
@@ -1137,6 +1142,26 @@ var UtilsI18nHtml;
1137
1142
  /* */
1138
1143
  /* */
1139
1144
  /* */
1145
+ /* */
1146
+ /* */
1147
+ /* */
1148
+ /* */
1149
+ /* */
1150
+ /* */
1151
+ /* */
1152
+ /* */
1153
+ /* */
1154
+ /* */
1155
+ /* */
1156
+ /* */
1157
+ /* */
1158
+ /* */
1159
+ /* */
1160
+ /* */
1161
+ /* */
1162
+ return (void 0);
1163
+ }
1164
+ function getAngularInlineTemplateRanges(content) {
1140
1165
  /* */
1141
1166
  /* */
1142
1167
  /* */
@@ -1179,7 +1204,143 @@ var UtilsI18nHtml;
1179
1204
  /* */
1180
1205
  return (void 0);
1181
1206
  }
1182
- UtilsI18nHtml.replaceTranslatePipieDirectiveTContext = replaceTranslatePipieDirectiveTContext;
1207
+ function hasComponentDecorator(node) {
1208
+ /* */
1209
+ /* */
1210
+ return (void 0);
1211
+ }
1212
+ function getComponentDecorator(node) {
1213
+ /* */
1214
+ /* */
1215
+ /* */
1216
+ /* */
1217
+ /* */
1218
+ /* */
1219
+ /* */
1220
+ /* */
1221
+ /* */
1222
+ /* */
1223
+ /* */
1224
+ /* */
1225
+ /* */
1226
+ /* */
1227
+ return (void 0);
1228
+ }
1229
+ function getComponentTemplateInitializer(decorator) {
1230
+ /* */
1231
+ /* */
1232
+ /* */
1233
+ /* */
1234
+ /* */
1235
+ /* */
1236
+ /* */
1237
+ /* */
1238
+ /* */
1239
+ /* */
1240
+ /* */
1241
+ /* */
1242
+ /* */
1243
+ /* */
1244
+ /* */
1245
+ /* */
1246
+ /* */
1247
+ /* */
1248
+ /* */
1249
+ /* */
1250
+ /* */
1251
+ /* */
1252
+ /* */
1253
+ /* */
1254
+ /* */
1255
+ /* */
1256
+ return (void 0);
1257
+ }
1258
+ function getStringLikeInnerRange(content, node) {
1259
+ /* */
1260
+ /* */
1261
+ /* */
1262
+ /* */
1263
+ /* */
1264
+ /* */
1265
+ /* */
1266
+ /* */
1267
+ /* */
1268
+ /* */
1269
+ /* */
1270
+ /* */
1271
+ /* */
1272
+ /* */
1273
+ /* */
1274
+ /* */
1275
+ /* */
1276
+ return (void 0);
1277
+ }
1278
+ function replaceTranslatePipieDirectiveTContextInHtml(html) {
1279
+ /* */
1280
+ /* */
1281
+ /* */
1282
+ /* */
1283
+ /* */
1284
+ /* */
1285
+ /* */
1286
+ /* */
1287
+ /* */
1288
+ /* */
1289
+ /* */
1290
+ /* */
1291
+ /* */
1292
+ /* */
1293
+ /* */
1294
+ /* */
1295
+ /* */
1296
+ /* */
1297
+ /* */
1298
+ /* */
1299
+ /* */
1300
+ /* */
1301
+ /* */
1302
+ /* */
1303
+ /* */
1304
+ /* */
1305
+ /* */
1306
+ /* */
1307
+ /* */
1308
+ /* */
1309
+ /* */
1310
+ /* */
1311
+ /* */
1312
+ /* */
1313
+ /* */
1314
+ /* */
1315
+ /* */
1316
+ /* */
1317
+ /* */
1318
+ /* */
1319
+ /* */
1320
+ /* */
1321
+ /* */
1322
+ /* */
1323
+ /* */
1324
+ /* */
1325
+ /* */
1326
+ /* */
1327
+ /* */
1328
+ /* */
1329
+ /* */
1330
+ /* */
1331
+ /* */
1332
+ /* */
1333
+ /* */
1334
+ /* */
1335
+ /* */
1336
+ /* */
1337
+ /* */
1338
+ /* */
1339
+ /* */
1340
+ /* */
1341
+ return (void 0);
1342
+ }
1343
+ UtilsI18nHtml.replaceTranslatePipieDirectiveTContextInHtml = replaceTranslatePipieDirectiveTContextInHtml;
1183
1344
  function findTranslateDirectiveEditsFromSource(html) {
1184
1345
  /* */
1185
1346
  /* */
@@ -1551,6 +1712,9 @@ var UtilsPoFile;
1551
1712
  //#endregion
1552
1713
  })(UtilsPoFile || (UtilsPoFile = {}));
1553
1714
 
1715
+ ;
1716
+ // THIS FILE IS GENERATED - DO NOT MODIFY
1717
+
1554
1718
  // @ts-nocheck
1555
1719
  // This file is auto-generated during init process. Do not modify.
1556
1720
  // This disable this auto generate file.