@angular/localize 15.0.0-next.6 → 15.0.0-rc.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.
Files changed (36) hide show
  1. package/esm2020/init/index.mjs +1 -1
  2. package/esm2020/localize.mjs +1 -2
  3. package/fesm2015/init.mjs +1 -1
  4. package/fesm2015/init.mjs.map +1 -1
  5. package/fesm2015/localize.mjs +1 -1
  6. package/fesm2015/localize.mjs.map +1 -1
  7. package/fesm2020/init.mjs +1 -1
  8. package/fesm2020/init.mjs.map +1 -1
  9. package/fesm2020/localize.mjs +1 -1
  10. package/fesm2020/localize.mjs.map +1 -1
  11. package/index.d.ts +6 -484
  12. package/init/index.d.ts +16 -103
  13. package/localize.d.ts +107 -0
  14. package/package.json +4 -4
  15. package/private.d.ts +10 -0
  16. package/schematics/ng-add/index.d.ts +1 -2
  17. package/schematics/ng-add/index.js +44 -66
  18. package/src/localize/index.d.ts +10 -0
  19. package/src/localize/src/global.d.ts +17 -0
  20. package/src/localize/src/localize.d.ts +139 -0
  21. package/src/translate.d.ts +62 -0
  22. package/src/utils/index.d.ts +11 -0
  23. package/src/utils/src/constants.d.ts +58 -0
  24. package/src/utils/src/messages.d.ts +240 -0
  25. package/src/utils/src/translations.d.ts +59 -0
  26. package/tools/bundles/{chunk-B2TZRIF5.js → chunk-BWW7SSDP.js} +18 -18
  27. package/tools/bundles/{chunk-B2TZRIF5.js.map → chunk-BWW7SSDP.js.map} +0 -0
  28. package/tools/bundles/{chunk-N3C6NOYD.js → chunk-FFZU53GH.js} +5 -5
  29. package/tools/bundles/{chunk-N3C6NOYD.js.map → chunk-FFZU53GH.js.map} +0 -0
  30. package/tools/bundles/{chunk-HS5BMNX3.js → chunk-GEXQ6SHF.js} +18 -18
  31. package/tools/bundles/{chunk-HS5BMNX3.js.map → chunk-GEXQ6SHF.js.map} +0 -0
  32. package/tools/bundles/index.js +4 -4
  33. package/tools/bundles/src/extract/cli.js +5 -5
  34. package/tools/bundles/src/migrate/cli.js +5 -5
  35. package/tools/bundles/src/translate/cli.js +11 -11
  36. package/tools/bundles_metadata.json +1 -1
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ /// <amd-module name="@angular/localize/src/utils/src/constants" />
9
+ /**
10
+ * The character used to mark the start and end of a "block" in a `$localize` tagged string.
11
+ * A block can indicate metadata about the message or specify a name of a placeholder for a
12
+ * substitution expressions.
13
+ *
14
+ * For example:
15
+ *
16
+ * ```ts
17
+ * $localize`Hello, ${title}:title:!`;
18
+ * $localize`:meaning|description@@id:source message text`;
19
+ * ```
20
+ */
21
+ export declare const BLOCK_MARKER = ":";
22
+ /**
23
+ * The marker used to separate a message's "meaning" from its "description" in a metadata block.
24
+ *
25
+ * For example:
26
+ *
27
+ * ```ts
28
+ * $localize `:correct|Indicates that the user got the answer correct: Right!`;
29
+ * $localize `:movement|Button label for moving to the right: Right!`;
30
+ * ```
31
+ */
32
+ export declare const MEANING_SEPARATOR = "|";
33
+ /**
34
+ * The marker used to separate a message's custom "id" from its "description" in a metadata block.
35
+ *
36
+ * For example:
37
+ *
38
+ * ```ts
39
+ * $localize `:A welcome message on the home page@@myApp-homepage-welcome: Welcome!`;
40
+ * ```
41
+ */
42
+ export declare const ID_SEPARATOR = "@@";
43
+ /**
44
+ * The marker used to separate legacy message ids from the rest of a metadata block.
45
+ *
46
+ * For example:
47
+ *
48
+ * ```ts
49
+ * $localize `:@@custom-id␟2df64767cd895a8fabe3e18b94b5b6b6f9e2e3f0: Welcome!`;
50
+ * ```
51
+ *
52
+ * Note that this character is the "symbol for the unit separator" (␟) not the "unit separator
53
+ * character" itself, since that has no visual representation. See https://graphemica.com/%E2%90%9F.
54
+ *
55
+ * Here is some background for the original "unit separator character":
56
+ * https://stackoverflow.com/questions/8695118/whats-the-file-group-record-unit-separator-control-characters-and-its-usage
57
+ */
58
+ export declare const LEGACY_ID_INDICATOR = "\u241F";
@@ -0,0 +1,240 @@
1
+ /// <amd-module name="@angular/localize/src/utils/src/messages" />
2
+ /**
3
+ * Re-export this helper function so that users of `@angular/localize` don't need to actively import
4
+ * from `@angular/compiler`.
5
+ */
6
+ export { computeMsgId } from '@angular/compiler';
7
+ /**
8
+ * A string containing a translation source message.
9
+ *
10
+ * I.E. the message that indicates what will be translated from.
11
+ *
12
+ * Uses `{$placeholder-name}` to indicate a placeholder.
13
+ */
14
+ export declare type SourceMessage = string;
15
+ /**
16
+ * A string containing a translation target message.
17
+ *
18
+ * I.E. the message that indicates what will be translated to.
19
+ *
20
+ * Uses `{$placeholder-name}` to indicate a placeholder.
21
+ */
22
+ export declare type TargetMessage = string;
23
+ /**
24
+ * A string that uniquely identifies a message, to be used for matching translations.
25
+ */
26
+ export declare type MessageId = string;
27
+ /**
28
+ * Declares a copy of the `AbsoluteFsPath` branded type in `@angular/compiler-cli` to avoid an
29
+ * import into `@angular/compiler-cli`. The compiler-cli's declaration files are not necessarily
30
+ * compatible with web environments that use `@angular/localize`, and would inadvertently include
31
+ * `typescript` declaration files in any compilation unit that uses `@angular/localize` (which
32
+ * increases parsing time and memory usage during builds) using a default import that only
33
+ * type-checks when `allowSyntheticDefaultImports` is enabled.
34
+ *
35
+ * @see https://github.com/angular/angular/issues/45179
36
+ */
37
+ declare type AbsoluteFsPathLocalizeCopy = string & {
38
+ _brand: 'AbsoluteFsPath';
39
+ };
40
+ /**
41
+ * The location of the message in the source file.
42
+ *
43
+ * The `line` and `column` values for the `start` and `end` properties are zero-based.
44
+ */
45
+ export interface SourceLocation {
46
+ start: {
47
+ line: number;
48
+ column: number;
49
+ };
50
+ end: {
51
+ line: number;
52
+ column: number;
53
+ };
54
+ file: AbsoluteFsPathLocalizeCopy;
55
+ text?: string;
56
+ }
57
+ /**
58
+ * Additional information that can be associated with a message.
59
+ */
60
+ export interface MessageMetadata {
61
+ /**
62
+ * A human readable rendering of the message
63
+ */
64
+ text: string;
65
+ /**
66
+ * Legacy message ids, if provided.
67
+ *
68
+ * In legacy message formats the message id can only be computed directly from the original
69
+ * template source.
70
+ *
71
+ * Since this information is not available in `$localize` calls, the legacy message ids may be
72
+ * attached by the compiler to the `$localize` metablock so it can be used if needed at the point
73
+ * of translation if the translations are encoded using the legacy message id.
74
+ */
75
+ legacyIds?: string[];
76
+ /**
77
+ * The id of the `message` if a custom one was specified explicitly.
78
+ *
79
+ * This id overrides any computed or legacy ids.
80
+ */
81
+ customId?: string;
82
+ /**
83
+ * The meaning of the `message`, used to distinguish identical `messageString`s.
84
+ */
85
+ meaning?: string;
86
+ /**
87
+ * The description of the `message`, used to aid translation.
88
+ */
89
+ description?: string;
90
+ /**
91
+ * The location of the message in the source.
92
+ */
93
+ location?: SourceLocation;
94
+ }
95
+ /**
96
+ * Information parsed from a `$localize` tagged string that is used to translate it.
97
+ *
98
+ * For example:
99
+ *
100
+ * ```
101
+ * const name = 'Jo Bloggs';
102
+ * $localize`Hello ${name}:title@@ID:!`;
103
+ * ```
104
+ *
105
+ * May be parsed into:
106
+ *
107
+ * ```
108
+ * {
109
+ * id: '6998194507597730591',
110
+ * substitutions: { title: 'Jo Bloggs' },
111
+ * messageString: 'Hello {$title}!',
112
+ * placeholderNames: ['title'],
113
+ * associatedMessageIds: { title: 'ID' },
114
+ * }
115
+ * ```
116
+ */
117
+ export interface ParsedMessage extends MessageMetadata {
118
+ /**
119
+ * The key used to look up the appropriate translation target.
120
+ */
121
+ id: MessageId;
122
+ /**
123
+ * A mapping of placeholder names to substitution values.
124
+ */
125
+ substitutions: Record<string, any>;
126
+ /**
127
+ * An optional mapping of placeholder names to associated MessageIds.
128
+ * This can be used to match ICU placeholders to the message that contains the ICU.
129
+ */
130
+ associatedMessageIds?: Record<string, MessageId>;
131
+ /**
132
+ * An optional mapping of placeholder names to source locations
133
+ */
134
+ substitutionLocations?: Record<string, SourceLocation | undefined>;
135
+ /**
136
+ * The static parts of the message.
137
+ */
138
+ messageParts: string[];
139
+ /**
140
+ * An optional mapping of message parts to source locations
141
+ */
142
+ messagePartLocations?: (SourceLocation | undefined)[];
143
+ /**
144
+ * The names of the placeholders that will be replaced with substitutions.
145
+ */
146
+ placeholderNames: string[];
147
+ }
148
+ /**
149
+ * Parse a `$localize` tagged string into a structure that can be used for translation or
150
+ * extraction.
151
+ *
152
+ * See `ParsedMessage` for an example.
153
+ */
154
+ export declare function parseMessage(messageParts: TemplateStringsArray, expressions?: readonly any[], location?: SourceLocation, messagePartLocations?: (SourceLocation | undefined)[], expressionLocations?: (SourceLocation | undefined)[]): ParsedMessage;
155
+ /**
156
+ * Parse the given message part (`cooked` + `raw`) to extract the message metadata from the text.
157
+ *
158
+ * If the message part has a metadata block this function will extract the `meaning`,
159
+ * `description`, `customId` and `legacyId` (if provided) from the block. These metadata properties
160
+ * are serialized in the string delimited by `|`, `@@` and `␟` respectively.
161
+ *
162
+ * (Note that `␟` is the `LEGACY_ID_INDICATOR` - see `constants.ts`.)
163
+ *
164
+ * For example:
165
+ *
166
+ * ```ts
167
+ * `:meaning|description@@custom-id:`
168
+ * `:meaning|@@custom-id:`
169
+ * `:meaning|description:`
170
+ * `:description@@custom-id:`
171
+ * `:meaning|:`
172
+ * `:description:`
173
+ * `:@@custom-id:`
174
+ * `:meaning|description@@custom-id␟legacy-id-1␟legacy-id-2:`
175
+ * ```
176
+ *
177
+ * @param cooked The cooked version of the message part to parse.
178
+ * @param raw The raw version of the message part to parse.
179
+ * @returns A object containing any metadata that was parsed from the message part.
180
+ */
181
+ export declare function parseMetadata(cooked: string, raw: string): MessageMetadata;
182
+ /**
183
+ * Parse the given message part (`cooked` + `raw`) to extract any placeholder metadata from the
184
+ * text.
185
+ *
186
+ * If the message part has a metadata block this function will extract the `placeholderName` and
187
+ * `associatedMessageId` (if provided) from the block.
188
+ *
189
+ * These metadata properties are serialized in the string delimited by `@@`.
190
+ *
191
+ * For example:
192
+ *
193
+ * ```ts
194
+ * `:placeholder-name@@associated-id:`
195
+ * ```
196
+ *
197
+ * @param cooked The cooked version of the message part to parse.
198
+ * @param raw The raw version of the message part to parse.
199
+ * @returns A object containing the metadata (`placeholderName` and `associatedMessageId`) of the
200
+ * preceding placeholder, along with the static text that follows.
201
+ */
202
+ export declare function parsePlaceholder(cooked: string, raw: string): {
203
+ messagePart: string;
204
+ placeholderName?: string;
205
+ associatedMessageId?: string;
206
+ };
207
+ /**
208
+ * Split a message part (`cooked` + `raw`) into an optional delimited "block" off the front and the
209
+ * rest of the text of the message part.
210
+ *
211
+ * Blocks appear at the start of message parts. They are delimited by a colon `:` character at the
212
+ * start and end of the block.
213
+ *
214
+ * If the block is in the first message part then it will be metadata about the whole message:
215
+ * meaning, description, id. Otherwise it will be metadata about the immediately preceding
216
+ * substitution: placeholder name.
217
+ *
218
+ * Since blocks are optional, it is possible that the content of a message block actually starts
219
+ * with a block marker. In this case the marker must be escaped `\:`.
220
+ *
221
+ * @param cooked The cooked version of the message part to parse.
222
+ * @param raw The raw version of the message part to parse.
223
+ * @returns An object containing the `text` of the message part and the text of the `block`, if it
224
+ * exists.
225
+ * @throws an error if the `block` is unterminated
226
+ */
227
+ export declare function splitBlock(cooked: string, raw: string): {
228
+ text: string;
229
+ block?: string;
230
+ };
231
+ /**
232
+ * Find the end of a "marked block" indicated by the first non-escaped colon.
233
+ *
234
+ * @param cooked The cooked string (where escaped chars have been processed)
235
+ * @param raw The raw string (where escape sequences are still in place)
236
+ *
237
+ * @returns the index of the end of block marker
238
+ * @throws an error if the block is unterminated
239
+ */
240
+ export declare function findEndOfBlock(cooked: string, raw: string): number;
@@ -0,0 +1,59 @@
1
+ /// <amd-module name="@angular/localize/src/utils/src/translations" />
2
+ import { MessageId, MessageMetadata, ParsedMessage, TargetMessage } from './messages';
3
+ /**
4
+ * A translation message that has been processed to extract the message parts and placeholders.
5
+ */
6
+ export interface ParsedTranslation extends MessageMetadata {
7
+ messageParts: TemplateStringsArray;
8
+ placeholderNames: string[];
9
+ }
10
+ /**
11
+ * The internal structure used by the runtime localization to translate messages.
12
+ */
13
+ export declare type ParsedTranslations = Record<MessageId, ParsedTranslation>;
14
+ export declare class MissingTranslationError extends Error {
15
+ readonly parsedMessage: ParsedMessage;
16
+ private readonly type;
17
+ constructor(parsedMessage: ParsedMessage);
18
+ }
19
+ export declare function isMissingTranslationError(e: any): e is MissingTranslationError;
20
+ /**
21
+ * Translate the text of the `$localize` tagged-string (i.e. `messageParts` and
22
+ * `substitutions`) using the given `translations`.
23
+ *
24
+ * The tagged-string is parsed to extract its `messageId` which is used to find an appropriate
25
+ * `ParsedTranslation`. If this doesn't match and there are legacy ids then try matching a
26
+ * translation using those.
27
+ *
28
+ * If one is found then it is used to translate the message into a new set of `messageParts` and
29
+ * `substitutions`.
30
+ * The translation may reorder (or remove) substitutions as appropriate.
31
+ *
32
+ * If there is no translation with a matching message id then an error is thrown.
33
+ * If a translation contains a placeholder that is not found in the message being translated then an
34
+ * error is thrown.
35
+ */
36
+ export declare function translate(translations: Record<string, ParsedTranslation>, messageParts: TemplateStringsArray, substitutions: readonly any[]): [TemplateStringsArray, readonly any[]];
37
+ /**
38
+ * Parse the `messageParts` and `placeholderNames` out of a target `message`.
39
+ *
40
+ * Used by `loadTranslations()` to convert target message strings into a structure that is more
41
+ * appropriate for doing translation.
42
+ *
43
+ * @param message the message to be parsed.
44
+ */
45
+ export declare function parseTranslation(messageString: TargetMessage): ParsedTranslation;
46
+ /**
47
+ * Create a `ParsedTranslation` from a set of `messageParts` and `placeholderNames`.
48
+ *
49
+ * @param messageParts The message parts to appear in the ParsedTranslation.
50
+ * @param placeholderNames The names of the placeholders to intersperse between the `messageParts`.
51
+ */
52
+ export declare function makeParsedTranslation(messageParts: string[], placeholderNames?: string[]): ParsedTranslation;
53
+ /**
54
+ * Create the specialized array that is passed to tagged-string tag functions.
55
+ *
56
+ * @param cooked The message parts with their escape codes processed.
57
+ * @param raw The message parts with their escaped codes as-is.
58
+ */
59
+ export declare function makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray;
@@ -15,9 +15,9 @@ import {
15
15
  unwrapMessagePartsFromLocalizeCall,
16
16
  unwrapMessagePartsFromTemplateLiteral,
17
17
  unwrapSubstitutionsFromLocalizeCall
18
- } from "./chunk-N3C6NOYD.js";
18
+ } from "./chunk-FFZU53GH.js";
19
19
 
20
- // bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/duplicates.mjs
20
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/localize/tools/src/extract/duplicates.mjs
21
21
  function checkDuplicateMessages(fs, messages, duplicateMessageHandling, basePath) {
22
22
  const diagnostics = new Diagnostics();
23
23
  if (duplicateMessageHandling === "ignore")
@@ -51,10 +51,10 @@ function serializeMessage(fs, basePath, message) {
51
51
  }
52
52
  }
53
53
 
54
- // bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/extraction.mjs
54
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/localize/tools/src/extract/extraction.mjs
55
55
  import { SourceFileLoader } from "@angular/compiler-cli/private/localize";
56
56
 
57
- // bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/source_files/es2015_extract_plugin.mjs
57
+ // bazel-out/darwin_arm64-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/k8-fastbuild/bin/packages/localize/tools/src/extract/source_files/es5_extract_plugin.mjs
77
+ // bazel-out/darwin_arm64-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/k8-fastbuild/bin/packages/localize/tools/src/extract/extraction.mjs
105
+ // bazel-out/darwin_arm64-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/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/utils.mjs
172
+ // bazel-out/darwin_arm64-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/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/arb_translation_serializer.mjs
213
+ // bazel-out/darwin_arm64-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/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/json_translation_serializer.mjs
274
+ // bazel-out/darwin_arm64-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/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/legacy_message_id_migration_serializer.mjs
288
+ // bazel-out/darwin_arm64-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/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/format_options.mjs
317
+ // bazel-out/darwin_arm64-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/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/xliff1_translation_serializer.mjs
337
+ // bazel-out/darwin_arm64-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/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/icu_parsing.mjs
340
+ // bazel-out/darwin_arm64-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/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/xml_file.mjs
437
+ // bazel-out/darwin_arm64-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/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/xliff1_translation_serializer.mjs
519
+ // bazel-out/darwin_arm64-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/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/xliff2_translation_serializer.mjs
667
+ // bazel-out/darwin_arm64-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/k8-fastbuild/bin/packages/localize/tools/src/extract/translation_files/xmb_translation_serializer.mjs
809
+ // bazel-out/darwin_arm64-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-B2TZRIF5.js.map
902
+ //# sourceMappingURL=chunk-BWW7SSDP.js.map
@@ -2,7 +2,7 @@
2
2
  import {createRequire as __cjsCompatRequire} from 'module';
3
3
  const require = __cjsCompatRequire(import.meta.url);
4
4
 
5
- // bazel-out/k8-fastbuild/bin/packages/localize/tools/src/diagnostics.mjs
5
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/localize/tools/src/diagnostics.mjs
6
6
  var Diagnostics = class {
7
7
  constructor() {
8
8
  this.messages = [];
@@ -37,11 +37,11 @@ var Diagnostics = class {
37
37
  }
38
38
  };
39
39
 
40
- // bazel-out/k8-fastbuild/bin/packages/localize/tools/src/source_file_utils.mjs
40
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/localize/tools/src/source_file_utils.mjs
41
41
  import { getFileSystem } from "@angular/compiler-cli/private/localize";
42
42
  import { \u0275isMissingTranslationError, \u0275makeTemplateObject, \u0275translate } from "@angular/localize";
43
43
 
44
- // bazel-out/k8-fastbuild/bin/packages/localize/tools/src/babel_core.mjs
44
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/localize/tools/src/babel_core.mjs
45
45
  import * as _babelNamespace from "@babel/core";
46
46
  import _babelDefault from "@babel/core";
47
47
  var _a;
@@ -56,7 +56,7 @@ var transformSync = babel.transformSync;
56
56
  var parseSync = babel.parseSync;
57
57
  var transformFromAstSync = babel.transformFromAstSync;
58
58
 
59
- // bazel-out/k8-fastbuild/bin/packages/localize/tools/src/source_file_utils.mjs
59
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/localize/tools/src/source_file_utils.mjs
60
60
  function isLocalize(expression, localizeName) {
61
61
  return isNamedIdentifier(expression, localizeName) && isGlobalIdentifier(expression);
62
62
  }
@@ -340,4 +340,4 @@ export {
340
340
  * Use of this source code is governed by an MIT-style license that can be
341
341
  * found in the LICENSE file at https://angular.io/license
342
342
  */
343
- //# sourceMappingURL=chunk-N3C6NOYD.js.map
343
+ //# sourceMappingURL=chunk-FFZU53GH.js.map