@taon-dev/i18n 21.0.22 → 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.
- package/VERIFIED-BUILD-DATA.jsonc +4 -4
- package/bin/start.js +37 -37
- package/browser/README.md +24 -24
- package/browser/fesm2022/i18n-browser.mjs +174 -10
- package/browser/fesm2022/i18n-browser.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser/types/i18n-browser.d.ts +30 -10
- package/browser-prod/README.md +24 -24
- package/browser-prod/fesm2022/i18n-browser-prod.mjs +172 -10
- package/browser-prod/fesm2022/i18n-browser-prod.mjs.map +1 -1
- package/browser-prod/package.json +1 -1
- package/browser-prod/types/i18n-browser-prod.d.ts +31 -11
- package/browser-prod.split-namespaces.json +5 -1
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/i18n/lib.translation.d.ts +4 -0
- package/lib/i18n/lib.translation.js +5 -0
- package/lib/i18n/lib.translation.js.map +1 -0
- package/lib/i18n/translation.ts.en-US.i18n.data.d.ts +17 -0
- package/lib/i18n/translation.ts.en-US.i18n.data.js +23 -0
- package/lib/i18n/translation.ts.en-US.i18n.data.js.map +1 -0
- package/lib/i18n/translation.ts.pl-PL.i18n.data.d.ts +17 -0
- package/lib/i18n/translation.ts.pl-PL.i18n.data.js +23 -0
- package/lib/i18n/translation.ts.pl-PL.i18n.data.js.map +1 -0
- package/lib/index._auto-generated_.d.ts +2 -1
- package/lib/index._auto-generated_.js +1 -0
- package/lib/index._auto-generated_.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/translate.service.d.ts +0 -6
- package/lib/translation-manager.js +2 -1
- package/lib/translation-manager.js.map +1 -1
- package/lib/utils-i18n-extract-gettext-translate-from-html.test.js +42 -0
- package/lib/utils-i18n-extract-gettext-translate-from-html.test.js.map +1 -1
- package/lib/utils-i18n-html.d.ts +5 -1
- package/lib/utils-i18n-html.js +125 -2
- package/lib/utils-i18n-html.js.map +1 -1
- package/lib/utils-i18n-html.test.js +35 -0
- package/lib/utils-i18n-html.test.js.map +1 -1
- package/lib-esm/app.electron.d.ts +1 -1
- package/lib-esm/app.electron.js +1 -1
- package/lib-esm/app.hosts.d.ts +3 -3
- package/lib-esm/app.hosts.js +8 -8
- package/lib-esm/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib-esm/lib/build-info._auto-generated_.js +1 -1
- package/lib-esm/lib/i18n/lib.translation.d.ts +4 -0
- package/lib-esm/lib/i18n/lib.translation.js +4 -0
- package/lib-esm/lib/i18n/lib.translation.js.map +1 -0
- package/lib-esm/lib/i18n/translation.ts.en-US.i18n.data.d.ts +17 -0
- package/lib-esm/lib/i18n/translation.ts.en-US.i18n.data.js +21 -0
- package/lib-esm/lib/i18n/translation.ts.en-US.i18n.data.js.map +1 -0
- package/lib-esm/lib/i18n/translation.ts.pl-PL.i18n.data.d.ts +17 -0
- package/lib-esm/lib/i18n/translation.ts.pl-PL.i18n.data.js +21 -0
- package/lib-esm/lib/i18n/translation.ts.pl-PL.i18n.data.js.map +1 -0
- package/lib-esm/lib/index._auto-generated_.d.ts +1 -0
- package/lib-esm/lib/index._auto-generated_.js +1 -0
- package/lib-esm/lib/index._auto-generated_.js.map +1 -1
- package/lib-esm/lib/translation-manager.js +2 -1
- package/lib-esm/lib/translation-manager.js.map +1 -1
- package/lib-esm/lib/utils-i18n-extract-gettext-translate-from-html.test.js +42 -0
- package/lib-esm/lib/utils-i18n-extract-gettext-translate-from-html.test.js.map +1 -1
- package/lib-esm/lib/utils-i18n-html.d.ts +5 -1
- package/lib-esm/lib/utils-i18n-html.js +125 -2
- package/lib-esm/lib/utils-i18n-html.js.map +1 -1
- package/lib-esm/lib/utils-i18n-html.test.js +35 -0
- package/lib-esm/lib/utils-i18n-html.test.js.map +1 -1
- package/lib-prod/build-info._auto-generated_.d.ts +1 -1
- package/lib-prod/build-info._auto-generated_.js +1 -1
- package/lib-prod/i18n/lib.translation.d.ts +4 -0
- package/lib-prod/i18n/lib.translation.js +4 -0
- package/lib-prod/i18n/lib.translation.js.map +1 -0
- package/lib-prod/i18n/translation.ts.en-US.i18n.data.d.ts +17 -0
- package/lib-prod/i18n/translation.ts.en-US.i18n.data.js +21 -0
- package/lib-prod/i18n/translation.ts.en-US.i18n.data.js.map +1 -0
- package/lib-prod/i18n/translation.ts.pl-PL.i18n.data.d.ts +17 -0
- package/lib-prod/i18n/translation.ts.pl-PL.i18n.data.js +21 -0
- package/lib-prod/i18n/translation.ts.pl-PL.i18n.data.js.map +1 -0
- package/lib-prod/index._auto-generated_.d.ts +1 -0
- package/lib-prod/index._auto-generated_.js +1 -0
- package/lib-prod/index._auto-generated_.js.map +1 -1
- package/lib-prod/package.json +1 -1
- package/lib-prod/translation-manager.js +2 -1
- package/lib-prod/translation-manager.js.map +1 -1
- package/lib-prod/utils-i18n-extract-gettext-translate-from-html.test.js +42 -0
- package/lib-prod/utils-i18n-extract-gettext-translate-from-html.test.js.map +1 -1
- package/lib-prod/utils-i18n-html.d.ts +5 -1
- package/lib-prod/utils-i18n-html.js +122 -1
- package/lib-prod/utils-i18n-html.js.map +1 -1
- package/lib-prod/utils-i18n-html.test.js +35 -0
- package/lib-prod/utils-i18n-html.test.js.map +1 -1
- package/lib-prod.split-namespaces.json +5 -1
- package/package.json +1 -1
- package/websql/README.md +24 -24
- package/websql/fesm2022/i18n-websql.mjs +174 -10
- package/websql/fesm2022/i18n-websql.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql/types/i18n-websql.d.ts +30 -10
- package/websql-prod/README.md +24 -24
- package/websql-prod/fesm2022/i18n-websql-prod.mjs +172 -10
- package/websql-prod/fesm2022/i18n-websql-prod.mjs.map +1 -1
- package/websql-prod/package.json +1 -1
- package/websql-prod/types/i18n-websql-prod.d.ts +31 -11
- package/websql-prod.split-namespaces.json +5 -1
package/websql-prod/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.
|
|
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);
|
|
@@ -1110,7 +1106,170 @@ function uniqueMessages(messages) {
|
|
|
1110
1106
|
function UtilsI18nHtml__NS__extractGettextTranslateFromHtml(html, fileName = 'template.html') {
|
|
1111
1107
|
return UtilsI18nExtractGettextTranslateFromHtml__NS__extractGettextTranslateFromHtml(html, fileName);
|
|
1112
1108
|
}
|
|
1113
|
-
function UtilsI18nHtml__NS__replaceTranslatePipieDirectiveTContext(html) {
|
|
1109
|
+
function UtilsI18nHtml__NS__replaceTranslatePipieDirectiveTContext(html, options) {
|
|
1110
|
+
/* */
|
|
1111
|
+
/* */
|
|
1112
|
+
/* */
|
|
1113
|
+
/* */
|
|
1114
|
+
/* */
|
|
1115
|
+
/* */
|
|
1116
|
+
return (void 0);
|
|
1117
|
+
}
|
|
1118
|
+
function UtilsI18nHtml__NS__isAngularTsWithInlineHtml(content) {
|
|
1119
|
+
/* */
|
|
1120
|
+
/* */
|
|
1121
|
+
/* */
|
|
1122
|
+
/* */
|
|
1123
|
+
/* */
|
|
1124
|
+
/* */
|
|
1125
|
+
/* */
|
|
1126
|
+
/* */
|
|
1127
|
+
/* */
|
|
1128
|
+
/* */
|
|
1129
|
+
return (void 0);
|
|
1130
|
+
}
|
|
1131
|
+
function replaceInAngularInlineTemplates(content) {
|
|
1132
|
+
/* */
|
|
1133
|
+
/* */
|
|
1134
|
+
/* */
|
|
1135
|
+
/* */
|
|
1136
|
+
/* */
|
|
1137
|
+
/* */
|
|
1138
|
+
/* */
|
|
1139
|
+
/* */
|
|
1140
|
+
/* */
|
|
1141
|
+
/* */
|
|
1142
|
+
/* */
|
|
1143
|
+
/* */
|
|
1144
|
+
/* */
|
|
1145
|
+
/* */
|
|
1146
|
+
/* */
|
|
1147
|
+
/* */
|
|
1148
|
+
/* */
|
|
1149
|
+
/* */
|
|
1150
|
+
/* */
|
|
1151
|
+
/* */
|
|
1152
|
+
/* */
|
|
1153
|
+
/* */
|
|
1154
|
+
/* */
|
|
1155
|
+
/* */
|
|
1156
|
+
return (void 0);
|
|
1157
|
+
}
|
|
1158
|
+
function getAngularInlineTemplateRanges(content) {
|
|
1159
|
+
/* */
|
|
1160
|
+
/* */
|
|
1161
|
+
/* */
|
|
1162
|
+
/* */
|
|
1163
|
+
/* */
|
|
1164
|
+
/* */
|
|
1165
|
+
/* */
|
|
1166
|
+
/* */
|
|
1167
|
+
/* */
|
|
1168
|
+
/* */
|
|
1169
|
+
/* */
|
|
1170
|
+
/* */
|
|
1171
|
+
/* */
|
|
1172
|
+
/* */
|
|
1173
|
+
/* */
|
|
1174
|
+
/* */
|
|
1175
|
+
/* */
|
|
1176
|
+
/* */
|
|
1177
|
+
/* */
|
|
1178
|
+
/* */
|
|
1179
|
+
/* */
|
|
1180
|
+
/* */
|
|
1181
|
+
/* */
|
|
1182
|
+
/* */
|
|
1183
|
+
/* */
|
|
1184
|
+
/* */
|
|
1185
|
+
/* */
|
|
1186
|
+
/* */
|
|
1187
|
+
/* */
|
|
1188
|
+
/* */
|
|
1189
|
+
/* */
|
|
1190
|
+
/* */
|
|
1191
|
+
/* */
|
|
1192
|
+
/* */
|
|
1193
|
+
/* */
|
|
1194
|
+
/* */
|
|
1195
|
+
/* */
|
|
1196
|
+
/* */
|
|
1197
|
+
/* */
|
|
1198
|
+
/* */
|
|
1199
|
+
return (void 0);
|
|
1200
|
+
}
|
|
1201
|
+
function hasComponentDecorator(node) {
|
|
1202
|
+
/* */
|
|
1203
|
+
/* */
|
|
1204
|
+
return (void 0);
|
|
1205
|
+
}
|
|
1206
|
+
function getComponentDecorator(node) {
|
|
1207
|
+
/* */
|
|
1208
|
+
/* */
|
|
1209
|
+
/* */
|
|
1210
|
+
/* */
|
|
1211
|
+
/* */
|
|
1212
|
+
/* */
|
|
1213
|
+
/* */
|
|
1214
|
+
/* */
|
|
1215
|
+
/* */
|
|
1216
|
+
/* */
|
|
1217
|
+
/* */
|
|
1218
|
+
/* */
|
|
1219
|
+
/* */
|
|
1220
|
+
/* */
|
|
1221
|
+
return (void 0);
|
|
1222
|
+
}
|
|
1223
|
+
function getComponentTemplateInitializer(decorator) {
|
|
1224
|
+
/* */
|
|
1225
|
+
/* */
|
|
1226
|
+
/* */
|
|
1227
|
+
/* */
|
|
1228
|
+
/* */
|
|
1229
|
+
/* */
|
|
1230
|
+
/* */
|
|
1231
|
+
/* */
|
|
1232
|
+
/* */
|
|
1233
|
+
/* */
|
|
1234
|
+
/* */
|
|
1235
|
+
/* */
|
|
1236
|
+
/* */
|
|
1237
|
+
/* */
|
|
1238
|
+
/* */
|
|
1239
|
+
/* */
|
|
1240
|
+
/* */
|
|
1241
|
+
/* */
|
|
1242
|
+
/* */
|
|
1243
|
+
/* */
|
|
1244
|
+
/* */
|
|
1245
|
+
/* */
|
|
1246
|
+
/* */
|
|
1247
|
+
/* */
|
|
1248
|
+
/* */
|
|
1249
|
+
/* */
|
|
1250
|
+
return (void 0);
|
|
1251
|
+
}
|
|
1252
|
+
function getStringLikeInnerRange(content, node) {
|
|
1253
|
+
/* */
|
|
1254
|
+
/* */
|
|
1255
|
+
/* */
|
|
1256
|
+
/* */
|
|
1257
|
+
/* */
|
|
1258
|
+
/* */
|
|
1259
|
+
/* */
|
|
1260
|
+
/* */
|
|
1261
|
+
/* */
|
|
1262
|
+
/* */
|
|
1263
|
+
/* */
|
|
1264
|
+
/* */
|
|
1265
|
+
/* */
|
|
1266
|
+
/* */
|
|
1267
|
+
/* */
|
|
1268
|
+
/* */
|
|
1269
|
+
/* */
|
|
1270
|
+
return (void 0);
|
|
1271
|
+
}
|
|
1272
|
+
function UtilsI18nHtml__NS__replaceTranslatePipieDirectiveTContextInHtml(html) {
|
|
1114
1273
|
/* */
|
|
1115
1274
|
/* */
|
|
1116
1275
|
/* */
|
|
@@ -1540,6 +1699,9 @@ function unescapePoString(value) {
|
|
|
1540
1699
|
//#endregion
|
|
1541
1700
|
//end of namespace UtilsPoFile
|
|
1542
1701
|
|
|
1702
|
+
;
|
|
1703
|
+
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
1704
|
+
|
|
1543
1705
|
// @ts-nocheck
|
|
1544
1706
|
// This file is auto-generated during init process. Do not modify.
|
|
1545
1707
|
// This disable this auto generate file.
|
|
@@ -1552,5 +1714,5 @@ var index = {};
|
|
|
1552
1714
|
* Generated bundle index. Do not edit.
|
|
1553
1715
|
*/
|
|
1554
1716
|
|
|
1555
|
-
export { APP_ID, BUILD_BASE_HREF, BUILD_FRAMEWORK_CLI_NAME, CURRENT_PACKAGE_TAON_VERSION, CURRENT_PACKAGE_VERSION, PROJECT_NPM_NAME, TranslateDirective, TranslatePipe, TranslateService, Translation, TranslationManager, UtilsI18nExtractGettextTranslateFromHtml__NS__extractGettextTranslateFromHtml, UtilsI18nHtml__NS__extractGettextTranslateFromHtml, UtilsI18nHtml__NS__replaceTranslatePipieDirectiveTContext, UtilsPoFile__NS__extractPoToJson, UtilsPoFile__NS__generatePoFileContent, UtilsPoFile__NS__generatePoFiles, UtilsPoFile__NS__generateTranslationOverrideInterface, UtilsPoFile__NS__mergeGettextFile, startCli };
|
|
1717
|
+
export { APP_ID, BUILD_BASE_HREF, BUILD_FRAMEWORK_CLI_NAME, CURRENT_PACKAGE_TAON_VERSION, CURRENT_PACKAGE_VERSION, PROJECT_NPM_NAME, TranslateDirective, TranslatePipe, TranslateService, Translation, TranslationManager, UtilsI18nExtractGettextTranslateFromHtml__NS__extractGettextTranslateFromHtml, UtilsI18nHtml__NS__extractGettextTranslateFromHtml, UtilsI18nHtml__NS__isAngularTsWithInlineHtml, UtilsI18nHtml__NS__replaceTranslatePipieDirectiveTContext, UtilsI18nHtml__NS__replaceTranslatePipieDirectiveTContextInHtml, UtilsPoFile__NS__extractPoToJson, UtilsPoFile__NS__generatePoFileContent, UtilsPoFile__NS__generatePoFiles, UtilsPoFile__NS__generateTranslationOverrideInterface, UtilsPoFile__NS__mergeGettextFile, startCli };
|
|
1556
1718
|
//# sourceMappingURL=i18n-websql-prod.mjs.map
|