@angular/localize 19.2.13 → 19.2.15
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/fesm2022/init.mjs +1 -1
- package/fesm2022/init.mjs.map +1 -1
- package/fesm2022/localize-CajB9YLv.mjs +1 -1
- package/fesm2022/localize-CajB9YLv.mjs.map +1 -1
- package/fesm2022/localize.mjs +1 -1
- package/fesm2022/localize.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/init/index.d.ts +1 -1
- 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-7JRN4H23.js → chunk-A7R4RSCL.js} +18 -18
- package/tools/bundles/{chunk-AIKR22BS.js → chunk-B2LRKPFP.js} +8 -8
- package/tools/bundles/{chunk-AU6TZOIN.js → chunk-IDO47FJI.js} +18 -18
- 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 +0 -1
- /package/tools/bundles/{chunk-7JRN4H23.js.map → chunk-A7R4RSCL.js.map} +0 -0
- /package/tools/bundles/{chunk-AIKR22BS.js.map → chunk-B2LRKPFP.js.map} +0 -0
- /package/tools/bundles/{chunk-AU6TZOIN.js.map → chunk-IDO47FJI.js.map} +0 -0
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
unwrapMessagePartsFromLocalizeCall,
|
|
15
15
|
unwrapMessagePartsFromTemplateLiteral,
|
|
16
16
|
unwrapSubstitutionsFromLocalizeCall
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-B2LRKPFP.js";
|
|
18
18
|
|
|
19
|
-
// bazel-out/
|
|
19
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/source_files/es2015_translate_plugin.js
|
|
20
20
|
import { getFileSystem } from "@angular/compiler-cli/private/localize";
|
|
21
21
|
function makeEs2015TranslatePlugin(diagnostics, translations, { missingTranslation = "error", localizeName = "$localize" } = {}, fs = getFileSystem()) {
|
|
22
22
|
return {
|
|
@@ -41,7 +41,7 @@ function makeEs2015TranslatePlugin(diagnostics, translations, { missingTranslati
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
// bazel-out/
|
|
44
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/source_files/es5_translate_plugin.js
|
|
45
45
|
import { getFileSystem as getFileSystem2 } from "@angular/compiler-cli/private/localize";
|
|
46
46
|
function makeEs5TranslatePlugin(diagnostics, translations, { missingTranslation = "error", localizeName = "$localize" } = {}, fs = getFileSystem2()) {
|
|
47
47
|
return {
|
|
@@ -67,7 +67,7 @@ function makeEs5TranslatePlugin(diagnostics, translations, { missingTranslation
|
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
// bazel-out/
|
|
70
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/source_files/locale_plugin.js
|
|
71
71
|
import { types as t } from "@babel/core";
|
|
72
72
|
function makeLocalePlugin(locale, { localizeName = "$localize" } = {}) {
|
|
73
73
|
return {
|
|
@@ -107,7 +107,7 @@ function isLocalizeGuard(expression, localizeName) {
|
|
|
107
107
|
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" });
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
// bazel-out/
|
|
110
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/arb_translation_parser.js
|
|
111
111
|
var ArbTranslationParser = class {
|
|
112
112
|
analyze(_filePath, contents) {
|
|
113
113
|
const diagnostics = new Diagnostics();
|
|
@@ -145,7 +145,7 @@ var ArbTranslationParser = class {
|
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
147
|
|
|
148
|
-
// bazel-out/
|
|
148
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/simple_json_translation_parser.js
|
|
149
149
|
import { extname } from "path";
|
|
150
150
|
var SimpleJsonTranslationParser = class {
|
|
151
151
|
analyze(filePath, contents) {
|
|
@@ -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.js
|
|
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.js
|
|
196
196
|
var BaseVisitor = class {
|
|
197
197
|
visitElement(_element, _context) {
|
|
198
198
|
}
|
|
@@ -214,10 +214,10 @@ var BaseVisitor = class {
|
|
|
214
214
|
}
|
|
215
215
|
};
|
|
216
216
|
|
|
217
|
-
// bazel-out/
|
|
217
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/message_serialization/message_serializer.js
|
|
218
218
|
import { Element as Element2, visitAll } from "@angular/compiler";
|
|
219
219
|
|
|
220
|
-
// bazel-out/
|
|
220
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/translation_parse_error.js
|
|
221
221
|
import { ParseErrorLevel } from "@angular/compiler";
|
|
222
222
|
var TranslationParseError = class extends Error {
|
|
223
223
|
span;
|
|
@@ -242,7 +242,7 @@ At ${span.start}${span.details ? `, ${span.details}` : ""}:
|
|
|
242
242
|
return msg;
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
-
// bazel-out/
|
|
245
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/translation_utils.js
|
|
246
246
|
import { Element, ParseError, ParseErrorLevel as ParseErrorLevel2, XmlParser } from "@angular/compiler";
|
|
247
247
|
function getAttrOrThrow(element, attrName) {
|
|
248
248
|
const attrValue = getAttribute(element, attrName);
|
|
@@ -318,7 +318,7 @@ function addErrorsToBundle(bundle, errors) {
|
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
// bazel-out/
|
|
321
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/message_serialization/message_serializer.js
|
|
322
322
|
var MessageSerializer = class extends BaseVisitor {
|
|
323
323
|
renderer;
|
|
324
324
|
config;
|
|
@@ -382,7 +382,7 @@ var MessageSerializer = class extends BaseVisitor {
|
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
384
|
|
|
385
|
-
// bazel-out/
|
|
385
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/message_serialization/target_message_renderer.js
|
|
386
386
|
var TargetMessageRenderer = class {
|
|
387
387
|
current = { messageParts: [], placeholderNames: [], text: "" };
|
|
388
388
|
icuDepth = 0;
|
|
@@ -437,7 +437,7 @@ var TargetMessageRenderer = class {
|
|
|
437
437
|
}
|
|
438
438
|
};
|
|
439
439
|
|
|
440
|
-
// bazel-out/
|
|
440
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/serialize_translation_message.js
|
|
441
441
|
function serializeTranslationMessage(element, config) {
|
|
442
442
|
const { rootNodes, errors: parseErrors } = parseInnerRange(element);
|
|
443
443
|
try {
|
|
@@ -449,7 +449,7 @@ function serializeTranslationMessage(element, config) {
|
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
451
|
|
|
452
|
-
// bazel-out/
|
|
452
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/xliff1_translation_parser.js
|
|
453
453
|
var Xliff1TranslationParser = class {
|
|
454
454
|
analyze(filePath, contents) {
|
|
455
455
|
return canParseXml(filePath, contents, "xliff", { version: "1.2" });
|
|
@@ -526,7 +526,7 @@ var XliffTranslationVisitor = class extends BaseVisitor {
|
|
|
526
526
|
}
|
|
527
527
|
};
|
|
528
528
|
|
|
529
|
-
// bazel-out/
|
|
529
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/xliff2_translation_parser.js
|
|
530
530
|
import { Element as Element3, ParseErrorLevel as ParseErrorLevel4, visitAll as visitAll3 } from "@angular/compiler";
|
|
531
531
|
var Xliff2TranslationParser = class {
|
|
532
532
|
analyze(filePath, contents) {
|
|
@@ -609,7 +609,7 @@ function isFileElement(node) {
|
|
|
609
609
|
return node instanceof Element3 && node.name === "file";
|
|
610
610
|
}
|
|
611
611
|
|
|
612
|
-
// bazel-out/
|
|
612
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_parsers/xtb_translation_parser.js
|
|
613
613
|
import { ParseErrorLevel as ParseErrorLevel5, visitAll as visitAll4 } from "@angular/compiler";
|
|
614
614
|
import { extname as extname2 } from "path";
|
|
615
615
|
var XtbTranslationParser = class {
|
|
@@ -690,4 +690,4 @@ export {
|
|
|
690
690
|
* Use of this source code is governed by an MIT-style license that can be
|
|
691
691
|
* found in the LICENSE file at https://angular.dev/license
|
|
692
692
|
*/
|
|
693
|
-
//# sourceMappingURL=chunk-
|
|
693
|
+
//# sourceMappingURL=chunk-A7R4RSCL.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.js
|
|
7
7
|
var Diagnostics = class {
|
|
8
8
|
messages = [];
|
|
9
9
|
get hasErrors() {
|
|
@@ -36,16 +36,16 @@ var Diagnostics = class {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
// bazel-out/
|
|
39
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/source_file_utils.js
|
|
40
40
|
import { getFileSystem } from "@angular/compiler-cli/private/localize";
|
|
41
41
|
|
|
42
|
-
// bazel-out/
|
|
42
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/src/utils/src/constants.js
|
|
43
43
|
var BLOCK_MARKER = ":";
|
|
44
44
|
var MEANING_SEPARATOR = "|";
|
|
45
45
|
var ID_SEPARATOR = "@@";
|
|
46
46
|
var LEGACY_ID_INDICATOR = "\u241F";
|
|
47
47
|
|
|
48
|
-
// bazel-out/
|
|
48
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/digest.mjs
|
|
49
49
|
var textEncoder;
|
|
50
50
|
var _SerializerVisitor = class {
|
|
51
51
|
visitText(text, context) {
|
|
@@ -180,7 +180,7 @@ var Endian;
|
|
|
180
180
|
Endian2[Endian2["Big"] = 1] = "Big";
|
|
181
181
|
})(Endian || (Endian = {}));
|
|
182
182
|
|
|
183
|
-
// bazel-out/
|
|
183
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/src/utils/src/messages.js
|
|
184
184
|
function parseMessage(messageParts, expressions, location, messagePartLocations, expressionLocations = []) {
|
|
185
185
|
const substitutions = {};
|
|
186
186
|
const substitutionLocations = {};
|
|
@@ -272,7 +272,7 @@ function findEndOfBlock(cooked, raw) {
|
|
|
272
272
|
throw new Error(`Unterminated $localize metadata block in "${raw}".`);
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
// bazel-out/
|
|
275
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/src/utils/src/translations.js
|
|
276
276
|
var MissingTranslationError = class extends Error {
|
|
277
277
|
parsedMessage;
|
|
278
278
|
type = "MissingTranslationError";
|
|
@@ -343,7 +343,7 @@ function describeMessage(message) {
|
|
|
343
343
|
return `"${message.id}"${legacy} ("${message.text}"${meaningString})`;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
-
// bazel-out/
|
|
346
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/source_file_utils.js
|
|
347
347
|
import { types as t } from "@babel/core";
|
|
348
348
|
function isLocalize(expression, localizeName) {
|
|
349
349
|
return isNamedIdentifier(expression, localizeName) && isGlobalIdentifier(expression);
|
|
@@ -622,4 +622,4 @@ export {
|
|
|
622
622
|
* Use of this source code is governed by an MIT-style license that can be
|
|
623
623
|
* found in the LICENSE file at https://angular.dev/license
|
|
624
624
|
*/
|
|
625
|
-
//# sourceMappingURL=chunk-
|
|
625
|
+
//# sourceMappingURL=chunk-B2LRKPFP.js.map
|
|
@@ -15,9 +15,9 @@ import {
|
|
|
15
15
|
unwrapMessagePartsFromLocalizeCall,
|
|
16
16
|
unwrapMessagePartsFromTemplateLiteral,
|
|
17
17
|
unwrapSubstitutionsFromLocalizeCall
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-B2LRKPFP.js";
|
|
19
19
|
|
|
20
|
-
// bazel-out/
|
|
20
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/duplicates.js
|
|
21
21
|
function checkDuplicateMessages(fs, messages, duplicateMessageHandling, basePath) {
|
|
22
22
|
const diagnostics = new Diagnostics();
|
|
23
23
|
if (duplicateMessageHandling === "ignore")
|
|
@@ -51,11 +51,11 @@ function serializeMessage(fs, basePath, message) {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
// bazel-out/
|
|
54
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/extraction.js
|
|
55
55
|
import { SourceFileLoader } from "@angular/compiler-cli/private/localize";
|
|
56
56
|
import { transformSync } from "@babel/core";
|
|
57
57
|
|
|
58
|
-
// bazel-out/
|
|
58
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/source_files/es2015_extract_plugin.js
|
|
59
59
|
function makeEs2015ExtractPlugin(fs, messages, localizeName = "$localize") {
|
|
60
60
|
return {
|
|
61
61
|
visitor: {
|
|
@@ -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.js
|
|
78
78
|
function makeEs5ExtractPlugin(fs, messages, localizeName = "$localize") {
|
|
79
79
|
return {
|
|
80
80
|
visitor: {
|
|
@@ -101,7 +101,7 @@ function makeEs5ExtractPlugin(fs, messages, localizeName = "$localize") {
|
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
// bazel-out/
|
|
104
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/extraction.js
|
|
105
105
|
var MessageExtractor = class {
|
|
106
106
|
fs;
|
|
107
107
|
logger;
|
|
@@ -174,7 +174,7 @@ var MessageExtractor = class {
|
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
176
|
|
|
177
|
-
// bazel-out/
|
|
177
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/utils.js
|
|
178
178
|
function consolidateMessages(messages, getMessageId2) {
|
|
179
179
|
const messageGroups = /* @__PURE__ */ new Map();
|
|
180
180
|
for (const message of messages) {
|
|
@@ -215,7 +215,7 @@ function compareLocations({ location: location1 }, { location: location2 }) {
|
|
|
215
215
|
return 0;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
// bazel-out/
|
|
218
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/arb_translation_serializer.js
|
|
219
219
|
var ArbTranslationSerializer = class {
|
|
220
220
|
sourceLocale;
|
|
221
221
|
basePath;
|
|
@@ -279,7 +279,7 @@ function getMessageId(message) {
|
|
|
279
279
|
return message.customId || message.id;
|
|
280
280
|
}
|
|
281
281
|
|
|
282
|
-
// bazel-out/
|
|
282
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/json_translation_serializer.js
|
|
283
283
|
var SimpleJsonTranslationSerializer = class {
|
|
284
284
|
sourceLocale;
|
|
285
285
|
constructor(sourceLocale) {
|
|
@@ -294,7 +294,7 @@ var SimpleJsonTranslationSerializer = class {
|
|
|
294
294
|
}
|
|
295
295
|
};
|
|
296
296
|
|
|
297
|
-
// bazel-out/
|
|
297
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/legacy_message_id_migration_serializer.js
|
|
298
298
|
var LegacyMessageIdMigrationSerializer = class {
|
|
299
299
|
_diagnostics;
|
|
300
300
|
constructor(_diagnostics) {
|
|
@@ -324,7 +324,7 @@ function shouldMigrate(message) {
|
|
|
324
324
|
return !message.customId && !!message.legacyIds && message.legacyIds.length > 0;
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
// bazel-out/
|
|
327
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/format_options.js
|
|
328
328
|
function validateOptions(name, validOptions, options) {
|
|
329
329
|
const validOptionsMap = new Map(validOptions);
|
|
330
330
|
for (const option in options) {
|
|
@@ -344,10 +344,10 @@ function parseFormatOptions(optionString = "{}") {
|
|
|
344
344
|
return JSON.parse(optionString);
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
// bazel-out/
|
|
347
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/xliff1_translation_serializer.js
|
|
348
348
|
import { getFileSystem } from "@angular/compiler-cli/private/localize";
|
|
349
349
|
|
|
350
|
-
// bazel-out/
|
|
350
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/icu_parsing.js
|
|
351
351
|
function extractIcuPlaceholders(text) {
|
|
352
352
|
const state = new StateStack();
|
|
353
353
|
const pieces = new IcuPieces();
|
|
@@ -440,7 +440,7 @@ function assert(test, message) {
|
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
442
|
|
|
443
|
-
// bazel-out/
|
|
443
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/xml_file.js
|
|
444
444
|
var XmlFile = class {
|
|
445
445
|
output = '<?xml version="1.0" encoding="UTF-8" ?>\n';
|
|
446
446
|
indent = "";
|
|
@@ -520,7 +520,7 @@ function escapeXml(text) {
|
|
|
520
520
|
return _ESCAPED_CHARS.reduce((text2, entry) => text2.replace(entry[0], entry[1]), text);
|
|
521
521
|
}
|
|
522
522
|
|
|
523
|
-
// bazel-out/
|
|
523
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/xliff1_translation_serializer.js
|
|
524
524
|
var LEGACY_XLIFF_MESSAGE_LENGTH = 40;
|
|
525
525
|
var Xliff1TranslationSerializer = class {
|
|
526
526
|
sourceLocale;
|
|
@@ -673,7 +673,7 @@ var TAG_MAP = {
|
|
|
673
673
|
"UNORDERED_LIST": "ul"
|
|
674
674
|
};
|
|
675
675
|
|
|
676
|
-
// bazel-out/
|
|
676
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/xliff2_translation_serializer.js
|
|
677
677
|
import { getFileSystem as getFileSystem2 } from "@angular/compiler-cli/private/localize";
|
|
678
678
|
var MAX_LEGACY_XLIFF_2_MESSAGE_LENGTH = 20;
|
|
679
679
|
var Xliff2TranslationSerializer = class {
|
|
@@ -820,7 +820,7 @@ function getTypeForPlaceholder(placeholder) {
|
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
822
|
|
|
823
|
-
// bazel-out/
|
|
823
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/xmb_translation_serializer.js
|
|
824
824
|
import { getFileSystem as getFileSystem3 } from "@angular/compiler-cli/private/localize";
|
|
825
825
|
var XMB_HANDLER = "angular";
|
|
826
826
|
var XmbTranslationSerializer = class {
|
|
@@ -919,4 +919,4 @@ export {
|
|
|
919
919
|
* Use of this source code is governed by an MIT-style license that can be
|
|
920
920
|
* found in the LICENSE file at https://angular.dev/license
|
|
921
921
|
*/
|
|
922
|
-
//# sourceMappingURL=chunk-
|
|
922
|
+
//# sourceMappingURL=chunk-IDO47FJI.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-IDO47FJI.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-A7R4RSCL.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-B2LRKPFP.js";
|
|
35
35
|
|
|
36
|
-
// bazel-out/
|
|
36
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/index.js
|
|
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-IDO47FJI.js";
|
|
17
|
+
import "../../chunk-B2LRKPFP.js";
|
|
18
18
|
|
|
19
|
-
// bazel-out/
|
|
19
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/cli.js
|
|
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.js
|
|
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.js
|
|
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.js
|
|
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.js
|
|
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.js
|
|
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.js
|
|
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.js
|
|
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-A7R4RSCL.js";
|
|
16
16
|
import {
|
|
17
17
|
Diagnostics
|
|
18
|
-
} from "../../chunk-
|
|
18
|
+
} from "../../chunk-B2LRKPFP.js";
|
|
19
19
|
|
|
20
|
-
// bazel-out/
|
|
20
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/cli.js
|
|
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.js
|
|
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.js
|
|
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.js
|
|
35
35
|
import { absoluteFrom } from "@angular/compiler-cli/private/localize";
|
|
36
36
|
var AssetTranslationHandler = class {
|
|
37
37
|
fs;
|
|
@@ -60,7 +60,7 @@ var AssetTranslationHandler = class {
|
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
-
// bazel-out/
|
|
63
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/source_files/source_file_translation_handler.js
|
|
64
64
|
import { absoluteFrom as absoluteFrom2 } from "@angular/compiler-cli/private/localize";
|
|
65
65
|
import babel from "@babel/core";
|
|
66
66
|
var SourceFileTranslationHandler = class {
|
|
@@ -134,7 +134,7 @@ var SourceFileTranslationHandler = class {
|
|
|
134
134
|
}
|
|
135
135
|
};
|
|
136
136
|
|
|
137
|
-
// bazel-out/
|
|
137
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translation_files/translation_loader.js
|
|
138
138
|
var TranslationLoader = class {
|
|
139
139
|
fs;
|
|
140
140
|
translationParsers;
|
|
@@ -208,7 +208,7 @@ ${parser.constructor.name} cannot parse translation file.`));
|
|
|
208
208
|
}
|
|
209
209
|
};
|
|
210
210
|
|
|
211
|
-
// bazel-out/
|
|
211
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/translator.js
|
|
212
212
|
var Translator = class {
|
|
213
213
|
fs;
|
|
214
214
|
resourceHandlers;
|
|
@@ -233,7 +233,7 @@ var Translator = class {
|
|
|
233
233
|
}
|
|
234
234
|
};
|
|
235
235
|
|
|
236
|
-
// bazel-out/
|
|
236
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/index.js
|
|
237
237
|
function translateFiles({ sourceRootPath: sourceRootPath2, sourceFilePaths: sourceFilePaths2, translationFilePaths: translationFilePaths2, translationFileLocales: translationFileLocales2, outputPathFn: outputPathFn2, diagnostics: diagnostics2, missingTranslation: missingTranslation2, duplicateTranslation: duplicateTranslation2, sourceLocale: sourceLocale2 }) {
|
|
238
238
|
const fs2 = getFileSystem();
|
|
239
239
|
const translationLoader = new TranslationLoader(fs2, [
|
|
@@ -250,7 +250,7 @@ function translateFiles({ sourceRootPath: sourceRootPath2, sourceFilePaths: sour
|
|
|
250
250
|
resourceProcessor.translateFiles(sourceFilePaths2.map(relativeFrom), fs2.resolve(sourceRootPath2), outputPathFn2, translations, sourceLocale2);
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
// bazel-out/
|
|
253
|
+
// bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/cli.js
|
|
254
254
|
process.title = "Angular Localization Message Translator (localize-translate)";
|
|
255
255
|
var args = process.argv.slice(2);
|
|
256
256
|
var options = yargs(args).option("r", {
|