@angular/localize 16.1.0 → 16.1.2
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/esm2022/src/translate.mjs +5 -5
- package/fesm2022/init.mjs +1 -1
- package/fesm2022/localize.mjs +5 -5
- package/fesm2022/localize.mjs.map +1 -1
- package/init/index.d.ts +1 -1
- package/localize/index.d.ts +4 -4
- package/package.json +3 -3
- package/schematics/ng-add/ng_add_bundle.js +2 -2
- package/schematics/ng-add/ng_add_bundle.js.map +1 -1
- package/tools/bundles/{chunk-MIRZ3NBF.js → chunk-3TQ7D6V2.js} +18 -18
- package/tools/bundles/{chunk-ICJ4LFWD.js → chunk-IHTOM4VK.js} +18 -18
- package/tools/bundles/{chunk-DTYQ3TT5.js → chunk-SOWE44E4.js} +3 -3
- package/tools/bundles/index.js +4 -4
- package/tools/bundles/src/extract/cli.js +5 -5
- package/tools/bundles/src/migrate/cli.js +5 -5
- package/tools/bundles/src/translate/cli.js +11 -11
- package/tools/bundles_metadata.json +1 -1
- /package/tools/bundles/{chunk-MIRZ3NBF.js.map → chunk-3TQ7D6V2.js.map} +0 -0
- /package/tools/bundles/{chunk-ICJ4LFWD.js.map → chunk-IHTOM4VK.js.map} +0 -0
- /package/tools/bundles/{chunk-DTYQ3TT5.js.map → chunk-SOWE44E4.js.map} +0 -0
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
unwrapMessagePartsFromLocalizeCall,
|
|
13
13
|
unwrapMessagePartsFromTemplateLiteral,
|
|
14
14
|
unwrapSubstitutionsFromLocalizeCall
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SOWE44E4.js";
|
|
16
16
|
|
|
17
|
-
// bazel-out/
|
|
17
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/source_files/es2015_translate_plugin.mjs
|
|
18
18
|
import { getFileSystem } from "@angular/compiler-cli/private/localize";
|
|
19
19
|
function makeEs2015TranslatePlugin(diagnostics, translations, { missingTranslation = "error", localizeName = "$localize" } = {}, fs = getFileSystem()) {
|
|
20
20
|
return {
|
|
@@ -39,7 +39,7 @@ function makeEs2015TranslatePlugin(diagnostics, translations, { missingTranslati
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
// bazel-out/
|
|
42
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/source_files/es5_translate_plugin.mjs
|
|
43
43
|
import { getFileSystem as getFileSystem2 } from "@angular/compiler-cli/private/localize";
|
|
44
44
|
function makeEs5TranslatePlugin(diagnostics, translations, { missingTranslation = "error", localizeName = "$localize" } = {}, fs = getFileSystem2()) {
|
|
45
45
|
return {
|
|
@@ -65,7 +65,7 @@ function makeEs5TranslatePlugin(diagnostics, translations, { missingTranslation
|
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
// bazel-out/
|
|
68
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/source_files/locale_plugin.mjs
|
|
69
69
|
import { types as t } from "@babel/core";
|
|
70
70
|
function makeLocalePlugin(locale, { localizeName = "$localize" } = {}) {
|
|
71
71
|
return {
|
|
@@ -105,7 +105,7 @@ function isLocalizeGuard(expression, localizeName) {
|
|
|
105
105
|
return left.isUnaryExpression({ operator: "typeof" }) && isLocalize(left.get("argument"), localizeName) && right.isStringLiteral({ value: "undefined" }) || right.isUnaryExpression({ operator: "typeof" }) && isLocalize(right.get("argument"), localizeName) && left.isStringLiteral({ value: "undefined" });
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
// bazel-out/
|
|
108
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/arb_translation_parser.mjs
|
|
109
109
|
import { \u0275parseTranslation } from "@angular/localize";
|
|
110
110
|
var ArbTranslationParser = class {
|
|
111
111
|
analyze(_filePath, contents) {
|
|
@@ -144,7 +144,7 @@ var ArbTranslationParser = class {
|
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
|
|
147
|
-
// bazel-out/
|
|
147
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/simple_json_translation_parser.mjs
|
|
148
148
|
import { \u0275parseTranslation as \u0275parseTranslation2 } from "@angular/localize";
|
|
149
149
|
import { extname } from "path";
|
|
150
150
|
var SimpleJsonTranslationParser = class {
|
|
@@ -189,10 +189,10 @@ var SimpleJsonTranslationParser = class {
|
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
191
|
|
|
192
|
-
// bazel-out/
|
|
192
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/xliff1_translation_parser.mjs
|
|
193
193
|
import { ParseErrorLevel as ParseErrorLevel3, visitAll as visitAll2 } from "@angular/compiler";
|
|
194
194
|
|
|
195
|
-
// bazel-out/
|
|
195
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/base_visitor.mjs
|
|
196
196
|
var BaseVisitor = class {
|
|
197
197
|
visitElement(_element, _context) {
|
|
198
198
|
}
|
|
@@ -208,10 +208,10 @@ var BaseVisitor = class {
|
|
|
208
208
|
}
|
|
209
209
|
};
|
|
210
210
|
|
|
211
|
-
// bazel-out/
|
|
211
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/message_serialization/message_serializer.mjs
|
|
212
212
|
import { Element as Element2, visitAll } from "@angular/compiler";
|
|
213
213
|
|
|
214
|
-
// bazel-out/
|
|
214
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/translation_parse_error.mjs
|
|
215
215
|
import { ParseErrorLevel } from "@angular/compiler";
|
|
216
216
|
var TranslationParseError = class extends Error {
|
|
217
217
|
constructor(span, msg, level = ParseErrorLevel.ERROR) {
|
|
@@ -233,7 +233,7 @@ At ${span.start}${span.details ? `, ${span.details}` : ""}:
|
|
|
233
233
|
return msg;
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
// bazel-out/
|
|
236
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/translation_utils.mjs
|
|
237
237
|
import { Element, ParseError, ParseErrorLevel as ParseErrorLevel2, XmlParser } from "@angular/compiler";
|
|
238
238
|
function getAttrOrThrow(element, attrName) {
|
|
239
239
|
const attrValue = getAttribute(element, attrName);
|
|
@@ -309,7 +309,7 @@ function addErrorsToBundle(bundle, errors) {
|
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
// bazel-out/
|
|
312
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/message_serialization/message_serializer.mjs
|
|
313
313
|
var MessageSerializer = class extends BaseVisitor {
|
|
314
314
|
constructor(renderer, config) {
|
|
315
315
|
super();
|
|
@@ -371,7 +371,7 @@ var MessageSerializer = class extends BaseVisitor {
|
|
|
371
371
|
}
|
|
372
372
|
};
|
|
373
373
|
|
|
374
|
-
// bazel-out/
|
|
374
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/message_serialization/target_message_renderer.mjs
|
|
375
375
|
import { \u0275makeParsedTranslation } from "@angular/localize";
|
|
376
376
|
var TargetMessageRenderer = class {
|
|
377
377
|
constructor() {
|
|
@@ -429,7 +429,7 @@ var TargetMessageRenderer = class {
|
|
|
429
429
|
}
|
|
430
430
|
};
|
|
431
431
|
|
|
432
|
-
// bazel-out/
|
|
432
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/serialize_translation_message.mjs
|
|
433
433
|
function serializeTranslationMessage(element, config) {
|
|
434
434
|
const { rootNodes, errors: parseErrors } = parseInnerRange(element);
|
|
435
435
|
try {
|
|
@@ -441,7 +441,7 @@ function serializeTranslationMessage(element, config) {
|
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
-
// bazel-out/
|
|
444
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/xliff1_translation_parser.mjs
|
|
445
445
|
var Xliff1TranslationParser = class {
|
|
446
446
|
analyze(filePath, contents) {
|
|
447
447
|
return canParseXml(filePath, contents, "xliff", { version: "1.2" });
|
|
@@ -518,7 +518,7 @@ var XliffTranslationVisitor = class extends BaseVisitor {
|
|
|
518
518
|
}
|
|
519
519
|
};
|
|
520
520
|
|
|
521
|
-
// bazel-out/
|
|
521
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/xliff2_translation_parser.mjs
|
|
522
522
|
import { Element as Element3, ParseErrorLevel as ParseErrorLevel4, visitAll as visitAll3 } from "@angular/compiler";
|
|
523
523
|
var Xliff2TranslationParser = class {
|
|
524
524
|
analyze(filePath, contents) {
|
|
@@ -597,7 +597,7 @@ function isFileElement(node) {
|
|
|
597
597
|
return node instanceof Element3 && node.name === "file";
|
|
598
598
|
}
|
|
599
599
|
|
|
600
|
-
// bazel-out/
|
|
600
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/xtb_translation_parser.mjs
|
|
601
601
|
import { ParseErrorLevel as ParseErrorLevel5, visitAll as visitAll4 } from "@angular/compiler";
|
|
602
602
|
import { extname as extname2 } from "path";
|
|
603
603
|
var XtbTranslationParser = class {
|
|
@@ -675,4 +675,4 @@ export {
|
|
|
675
675
|
* Use of this source code is governed by an MIT-style license that can be
|
|
676
676
|
* found in the LICENSE file at https://angular.io/license
|
|
677
677
|
*/
|
|
678
|
-
//# sourceMappingURL=chunk-
|
|
678
|
+
//# sourceMappingURL=chunk-3TQ7D6V2.js.map
|
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
unwrapMessagePartsFromLocalizeCall,
|
|
15
15
|
unwrapMessagePartsFromTemplateLiteral,
|
|
16
16
|
unwrapSubstitutionsFromLocalizeCall
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SOWE44E4.js";
|
|
18
18
|
|
|
19
|
-
// bazel-out/
|
|
19
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/duplicates.mjs
|
|
20
20
|
function checkDuplicateMessages(fs, messages, duplicateMessageHandling, basePath) {
|
|
21
21
|
const diagnostics = new Diagnostics();
|
|
22
22
|
if (duplicateMessageHandling === "ignore")
|
|
@@ -50,11 +50,11 @@ function serializeMessage(fs, basePath, message) {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
// bazel-out/
|
|
53
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/extraction.mjs
|
|
54
54
|
import { SourceFileLoader } from "@angular/compiler-cli/private/localize";
|
|
55
55
|
import { transformSync } from "@babel/core";
|
|
56
56
|
|
|
57
|
-
// bazel-out/
|
|
57
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/source_files/es2015_extract_plugin.mjs
|
|
58
58
|
import { \u0275parseMessage } from "@angular/localize";
|
|
59
59
|
function makeEs2015ExtractPlugin(fs, messages, localizeName = "$localize") {
|
|
60
60
|
return {
|
|
@@ -74,7 +74,7 @@ function makeEs2015ExtractPlugin(fs, messages, localizeName = "$localize") {
|
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
// bazel-out/
|
|
77
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/source_files/es5_extract_plugin.mjs
|
|
78
78
|
import { \u0275parseMessage as \u0275parseMessage2 } from "@angular/localize";
|
|
79
79
|
function makeEs5ExtractPlugin(fs, messages, localizeName = "$localize") {
|
|
80
80
|
return {
|
|
@@ -102,7 +102,7 @@ function makeEs5ExtractPlugin(fs, messages, localizeName = "$localize") {
|
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
// bazel-out/
|
|
105
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/extraction.mjs
|
|
106
106
|
var MessageExtractor = class {
|
|
107
107
|
constructor(fs, logger, { basePath, useSourceMaps = true, localizeName = "$localize" }) {
|
|
108
108
|
this.fs = fs;
|
|
@@ -169,7 +169,7 @@ var MessageExtractor = class {
|
|
|
169
169
|
}
|
|
170
170
|
};
|
|
171
171
|
|
|
172
|
-
// bazel-out/
|
|
172
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/utils.mjs
|
|
173
173
|
function consolidateMessages(messages, getMessageId2) {
|
|
174
174
|
const messageGroups = /* @__PURE__ */ new Map();
|
|
175
175
|
for (const message of messages) {
|
|
@@ -210,7 +210,7 @@ function compareLocations({ location: location1 }, { location: location2 }) {
|
|
|
210
210
|
return 0;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
// bazel-out/
|
|
213
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/arb_translation_serializer.mjs
|
|
214
214
|
var ArbTranslationSerializer = class {
|
|
215
215
|
constructor(sourceLocale, basePath, fs) {
|
|
216
216
|
this.sourceLocale = sourceLocale;
|
|
@@ -271,7 +271,7 @@ function getMessageId(message) {
|
|
|
271
271
|
return message.customId || message.id;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
// bazel-out/
|
|
274
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/json_translation_serializer.mjs
|
|
275
275
|
var SimpleJsonTranslationSerializer = class {
|
|
276
276
|
constructor(sourceLocale) {
|
|
277
277
|
this.sourceLocale = sourceLocale;
|
|
@@ -285,7 +285,7 @@ var SimpleJsonTranslationSerializer = class {
|
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
287
|
|
|
288
|
-
// bazel-out/
|
|
288
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/legacy_message_id_migration_serializer.mjs
|
|
289
289
|
var LegacyMessageIdMigrationSerializer = class {
|
|
290
290
|
constructor(_diagnostics) {
|
|
291
291
|
this._diagnostics = _diagnostics;
|
|
@@ -314,7 +314,7 @@ function shouldMigrate(message) {
|
|
|
314
314
|
return !message.customId && !!message.legacyIds && message.legacyIds.length > 0;
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
-
// bazel-out/
|
|
317
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/format_options.mjs
|
|
318
318
|
function validateOptions(name, validOptions, options) {
|
|
319
319
|
const validOptionsMap = new Map(validOptions);
|
|
320
320
|
for (const option in options) {
|
|
@@ -334,10 +334,10 @@ function parseFormatOptions(optionString = "{}") {
|
|
|
334
334
|
return JSON.parse(optionString);
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
// bazel-out/
|
|
337
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/xliff1_translation_serializer.mjs
|
|
338
338
|
import { getFileSystem } from "@angular/compiler-cli/private/localize";
|
|
339
339
|
|
|
340
|
-
// bazel-out/
|
|
340
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/icu_parsing.mjs
|
|
341
341
|
function extractIcuPlaceholders(text) {
|
|
342
342
|
const state = new StateStack();
|
|
343
343
|
const pieces = new IcuPieces();
|
|
@@ -434,7 +434,7 @@ function assert(test, message) {
|
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
|
|
437
|
-
// bazel-out/
|
|
437
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/xml_file.mjs
|
|
438
438
|
var XmlFile = class {
|
|
439
439
|
constructor() {
|
|
440
440
|
this.output = '<?xml version="1.0" encoding="UTF-8" ?>\n';
|
|
@@ -516,7 +516,7 @@ function escapeXml(text) {
|
|
|
516
516
|
return _ESCAPED_CHARS.reduce((text2, entry) => text2.replace(entry[0], entry[1]), text);
|
|
517
517
|
}
|
|
518
518
|
|
|
519
|
-
// bazel-out/
|
|
519
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/xliff1_translation_serializer.mjs
|
|
520
520
|
var LEGACY_XLIFF_MESSAGE_LENGTH = 40;
|
|
521
521
|
var Xliff1TranslationSerializer = class {
|
|
522
522
|
constructor(sourceLocale, basePath, useLegacyIds, formatOptions = {}, fs = getFileSystem()) {
|
|
@@ -664,7 +664,7 @@ var TAG_MAP = {
|
|
|
664
664
|
"UNORDERED_LIST": "ul"
|
|
665
665
|
};
|
|
666
666
|
|
|
667
|
-
// bazel-out/
|
|
667
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/xliff2_translation_serializer.mjs
|
|
668
668
|
import { getFileSystem as getFileSystem2 } from "@angular/compiler-cli/private/localize";
|
|
669
669
|
var MAX_LEGACY_XLIFF_2_MESSAGE_LENGTH = 20;
|
|
670
670
|
var Xliff2TranslationSerializer = class {
|
|
@@ -806,7 +806,7 @@ function getTypeForPlaceholder(placeholder) {
|
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
808
|
|
|
809
|
-
// bazel-out/
|
|
809
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/xmb_translation_serializer.mjs
|
|
810
810
|
import { getFileSystem as getFileSystem3 } from "@angular/compiler-cli/private/localize";
|
|
811
811
|
var XmbTranslationSerializer = class {
|
|
812
812
|
constructor(basePath, useLegacyIds, fs = getFileSystem3()) {
|
|
@@ -899,4 +899,4 @@ export {
|
|
|
899
899
|
* Use of this source code is governed by an MIT-style license that can be
|
|
900
900
|
* found in the LICENSE file at https://angular.io/license
|
|
901
901
|
*/
|
|
902
|
-
//# sourceMappingURL=chunk-
|
|
902
|
+
//# sourceMappingURL=chunk-IHTOM4VK.js.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const require = __cjsCompatRequire(import.meta.url);
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
// bazel-out/
|
|
6
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/diagnostics.mjs
|
|
7
7
|
var Diagnostics = class {
|
|
8
8
|
constructor() {
|
|
9
9
|
this.messages = [];
|
|
@@ -38,7 +38,7 @@ var Diagnostics = class {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
// bazel-out/
|
|
41
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/source_file_utils.mjs
|
|
42
42
|
import { getFileSystem } from "@angular/compiler-cli/private/localize";
|
|
43
43
|
import { \u0275isMissingTranslationError, \u0275makeTemplateObject, \u0275translate } from "@angular/localize";
|
|
44
44
|
import { types as t } from "@babel/core";
|
|
@@ -321,4 +321,4 @@ export {
|
|
|
321
321
|
* Use of this source code is governed by an MIT-style license that can be
|
|
322
322
|
* found in the LICENSE file at https://angular.io/license
|
|
323
323
|
*/
|
|
324
|
-
//# sourceMappingURL=chunk-
|
|
324
|
+
//# sourceMappingURL=chunk-SOWE44E4.js.map
|
package/tools/bundles/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
Xliff2TranslationSerializer,
|
|
12
12
|
XmbTranslationSerializer,
|
|
13
13
|
checkDuplicateMessages
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IHTOM4VK.js";
|
|
15
15
|
import {
|
|
16
16
|
ArbTranslationParser,
|
|
17
17
|
SimpleJsonTranslationParser,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
makeEs2015TranslatePlugin,
|
|
22
22
|
makeEs5TranslatePlugin,
|
|
23
23
|
makeLocalePlugin
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-3TQ7D6V2.js";
|
|
25
25
|
import {
|
|
26
26
|
Diagnostics,
|
|
27
27
|
buildLocalizeReplacement,
|
|
@@ -31,9 +31,9 @@ import {
|
|
|
31
31
|
unwrapMessagePartsFromLocalizeCall,
|
|
32
32
|
unwrapMessagePartsFromTemplateLiteral,
|
|
33
33
|
unwrapSubstitutionsFromLocalizeCall
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-SOWE44E4.js";
|
|
35
35
|
|
|
36
|
-
// bazel-out/
|
|
36
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/index.mjs
|
|
37
37
|
import { NodeJSFileSystem, setFileSystem } from "@angular/compiler-cli/private/localize";
|
|
38
38
|
setFileSystem(new NodeJSFileSystem());
|
|
39
39
|
export {
|
|
@@ -13,15 +13,15 @@ import {
|
|
|
13
13
|
XmbTranslationSerializer,
|
|
14
14
|
checkDuplicateMessages,
|
|
15
15
|
parseFormatOptions
|
|
16
|
-
} from "../../chunk-
|
|
17
|
-
import "../../chunk-
|
|
16
|
+
} from "../../chunk-IHTOM4VK.js";
|
|
17
|
+
import "../../chunk-SOWE44E4.js";
|
|
18
18
|
|
|
19
|
-
// bazel-out/
|
|
19
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/cli.mjs
|
|
20
20
|
import { ConsoleLogger, LogLevel, NodeJSFileSystem, setFileSystem } from "@angular/compiler-cli/private/localize";
|
|
21
21
|
import glob from "fast-glob";
|
|
22
22
|
import yargs from "yargs";
|
|
23
23
|
|
|
24
|
-
// bazel-out/
|
|
24
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/index.mjs
|
|
25
25
|
function extractTranslations({ rootPath: rootPath2, sourceFilePaths: sourceFilePaths2, sourceLocale, format: format2, outputPath: output, logger: logger2, useSourceMaps, useLegacyIds, duplicateMessageHandling: duplicateMessageHandling2, formatOptions: formatOptions2 = {}, fileSystem: fs }) {
|
|
26
26
|
const basePath = fs.resolve(rootPath2);
|
|
27
27
|
const extractor = new MessageExtractor(fs, logger2, { basePath, useSourceMaps });
|
|
@@ -64,7 +64,7 @@ function getSerializer(format2, sourceLocale, rootPath2, useLegacyIds, formatOpt
|
|
|
64
64
|
throw new Error(`No translation serializer can handle the provided format: ${format2}`);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
// bazel-out/
|
|
67
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/cli.mjs
|
|
68
68
|
process.title = "Angular Localization Message Extractor (localize-extract)";
|
|
69
69
|
var args = process.argv.slice(2);
|
|
70
70
|
var options = yargs(args).option("l", {
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
const require = __cjsCompatRequire(import.meta.url);
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
// bazel-out/
|
|
7
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/migrate/cli.mjs
|
|
8
8
|
import { ConsoleLogger, LogLevel, NodeJSFileSystem, setFileSystem } from "@angular/compiler-cli/private/localize";
|
|
9
9
|
import glob from "fast-glob";
|
|
10
10
|
import yargs from "yargs";
|
|
11
11
|
|
|
12
|
-
// bazel-out/
|
|
12
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/migrate/index.mjs
|
|
13
13
|
import { getFileSystem } from "@angular/compiler-cli/private/localize";
|
|
14
14
|
|
|
15
|
-
// bazel-out/
|
|
15
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/migrate/migrate.mjs
|
|
16
16
|
function migrateFile(sourceCode, mapping) {
|
|
17
17
|
const legacyIds = Object.keys(mapping);
|
|
18
18
|
for (const legacyId of legacyIds) {
|
|
@@ -26,7 +26,7 @@ function escapeRegExp(str) {
|
|
|
26
26
|
return str.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1");
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
// bazel-out/
|
|
29
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/migrate/index.mjs
|
|
30
30
|
function migrateFiles({ rootPath: rootPath2, translationFilePaths: translationFilePaths2, mappingFilePath, logger: logger2 }) {
|
|
31
31
|
const fs2 = getFileSystem();
|
|
32
32
|
const absoluteMappingPath = fs2.resolve(rootPath2, mappingFilePath);
|
|
@@ -42,7 +42,7 @@ function migrateFiles({ rootPath: rootPath2, translationFilePaths: translationFi
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
// bazel-out/
|
|
45
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/migrate/cli.mjs
|
|
46
46
|
var args = process.argv.slice(2);
|
|
47
47
|
var options = yargs(args).option("r", {
|
|
48
48
|
alias: "root",
|
|
@@ -12,26 +12,26 @@ import {
|
|
|
12
12
|
makeEs2015TranslatePlugin,
|
|
13
13
|
makeEs5TranslatePlugin,
|
|
14
14
|
makeLocalePlugin
|
|
15
|
-
} from "../../chunk-
|
|
15
|
+
} from "../../chunk-3TQ7D6V2.js";
|
|
16
16
|
import {
|
|
17
17
|
Diagnostics
|
|
18
|
-
} from "../../chunk-
|
|
18
|
+
} from "../../chunk-SOWE44E4.js";
|
|
19
19
|
|
|
20
|
-
// bazel-out/
|
|
20
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/cli.mjs
|
|
21
21
|
import { NodeJSFileSystem, setFileSystem } from "@angular/compiler-cli/private/localize";
|
|
22
22
|
import glob from "fast-glob";
|
|
23
23
|
import yargs from "yargs";
|
|
24
24
|
|
|
25
|
-
// bazel-out/
|
|
25
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/output_path.mjs
|
|
26
26
|
function getOutputPathFn(fs2, outputFolder) {
|
|
27
27
|
const [pre, post] = outputFolder.split("{{LOCALE}}");
|
|
28
28
|
return post === void 0 ? (_locale, relativePath) => fs2.join(pre, relativePath) : (locale, relativePath) => fs2.join(pre + locale + post, relativePath);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
// bazel-out/
|
|
31
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/index.mjs
|
|
32
32
|
import { getFileSystem, relativeFrom } from "@angular/compiler-cli/private/localize";
|
|
33
33
|
|
|
34
|
-
// bazel-out/
|
|
34
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/asset_files/asset_translation_handler.mjs
|
|
35
35
|
import { absoluteFrom } from "@angular/compiler-cli/private/localize";
|
|
36
36
|
var AssetTranslationHandler = class {
|
|
37
37
|
constructor(fs2) {
|
|
@@ -59,7 +59,7 @@ var AssetTranslationHandler = class {
|
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
// bazel-out/
|
|
62
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/source_files/source_file_translation_handler.mjs
|
|
63
63
|
import { absoluteFrom as absoluteFrom2 } from "@angular/compiler-cli/private/localize";
|
|
64
64
|
import babel from "@babel/core";
|
|
65
65
|
var SourceFileTranslationHandler = class {
|
|
@@ -127,7 +127,7 @@ var SourceFileTranslationHandler = class {
|
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
-
// bazel-out/
|
|
130
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_loader.mjs
|
|
131
131
|
var TranslationLoader = class {
|
|
132
132
|
constructor(fs2, translationParsers, duplicateTranslation2, diagnostics2) {
|
|
133
133
|
this.fs = fs2;
|
|
@@ -197,7 +197,7 @@ ${parser.constructor.name} cannot parse translation file.`));
|
|
|
197
197
|
}
|
|
198
198
|
};
|
|
199
199
|
|
|
200
|
-
// bazel-out/
|
|
200
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translator.mjs
|
|
201
201
|
var Translator = class {
|
|
202
202
|
constructor(fs2, resourceHandlers, diagnostics2) {
|
|
203
203
|
this.fs = fs2;
|
|
@@ -219,7 +219,7 @@ var Translator = class {
|
|
|
219
219
|
}
|
|
220
220
|
};
|
|
221
221
|
|
|
222
|
-
// bazel-out/
|
|
222
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/index.mjs
|
|
223
223
|
function translateFiles({ sourceRootPath: sourceRootPath2, sourceFilePaths: sourceFilePaths2, translationFilePaths: translationFilePaths2, translationFileLocales: translationFileLocales2, outputPathFn: outputPathFn2, diagnostics: diagnostics2, missingTranslation: missingTranslation2, duplicateTranslation: duplicateTranslation2, sourceLocale: sourceLocale2 }) {
|
|
224
224
|
const fs2 = getFileSystem();
|
|
225
225
|
const translationLoader = new TranslationLoader(fs2, [
|
|
@@ -239,7 +239,7 @@ function translateFiles({ sourceRootPath: sourceRootPath2, sourceFilePaths: sour
|
|
|
239
239
|
resourceProcessor.translateFiles(sourceFilePaths2.map(relativeFrom), fs2.resolve(sourceRootPath2), outputPathFn2, translations, sourceLocale2);
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
// bazel-out/
|
|
242
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/cli.mjs
|
|
243
243
|
process.title = "Angular Localization Message Translator (localize-translate)";
|
|
244
244
|
var args = process.argv.slice(2);
|
|
245
245
|
var options = yargs(args).option("r", {
|