@angular/localize
Advanced tools
Comparing version 10.0.0-next.4 to 10.0.0-next.5
/** | ||
* @license Angular v10.0.0-next.4 | ||
* @license Angular v10.0.0-next.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v10.0.0-next.4 | ||
* @license Angular v10.0.0-next.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v10.0.0-next.4 | ||
* @license Angular v10.0.0-next.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v10.0.0-next.4 | ||
* @license Angular v10.0.0-next.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v10.0.0-next.4 | ||
* @license Angular v10.0.0-next.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v10.0.0-next.4 | ||
* @license Angular v10.0.0-next.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v10.0.0-next.4 | ||
* @license Angular v10.0.0-next.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v10.0.0-next.4 | ||
* @license Angular v10.0.0-next.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v10.0.0-next.4 | ||
* @license Angular v10.0.0-next.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
{ | ||
"name": "@angular/localize", | ||
"version": "10.0.0-next.4", | ||
"version": "10.0.0-next.5", | ||
"description": "Angular - library for localizing messages", | ||
@@ -5,0 +5,0 @@ "main": "./bundles/localize.umd.js", |
@@ -10,2 +10,6 @@ /** | ||
/** | ||
* How to handle potential diagnostics. | ||
*/ | ||
export declare type DiagnosticHandlingStrategy = 'error' | 'warning' | 'ignore'; | ||
/** | ||
* This class is used to collect and then report warnings and errors that occur during the execution | ||
@@ -20,5 +24,7 @@ * of the tools. | ||
get hasErrors(): boolean; | ||
add(type: DiagnosticHandlingStrategy, message: string): void; | ||
warn(message: string): void; | ||
error(message: string): void; | ||
merge(other: Diagnostics): void; | ||
formatDiagnostics(message: string): string; | ||
} |
@@ -14,3 +14,3 @@ /** | ||
else if (typeof define === "function" && define.amd) { | ||
define("@angular/localize/src/tools/src/diagnostics", ["require", "exports"], factory); | ||
define("@angular/localize/src/tools/src/diagnostics", ["require", "exports", "tslib"], factory); | ||
} | ||
@@ -20,2 +20,3 @@ })(function (require, exports) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
/** | ||
@@ -36,2 +37,7 @@ * This class is used to collect and then report warnings and errors that occur during the execution | ||
}); | ||
Diagnostics.prototype.add = function (type, message) { | ||
if (type !== 'ignore') { | ||
this.messages.push({ type: type, message: message }); | ||
} | ||
}; | ||
Diagnostics.prototype.warn = function (message) { | ||
@@ -43,2 +49,6 @@ this.messages.push({ type: 'warning', message: message }); | ||
}; | ||
Diagnostics.prototype.merge = function (other) { | ||
var _a; | ||
(_a = this.messages).push.apply(_a, tslib_1.__spread(other.messages)); | ||
}; | ||
Diagnostics.prototype.formatDiagnostics = function (message) { | ||
@@ -59,2 +69,2 @@ var errors = this.messages.filter(function (d) { return d.type === 'error'; }).map(function (d) { return ' - ' + d.message; }); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhZ25vc3RpY3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrY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59XG4iXX0= |
@@ -12,3 +12,3 @@ /// <amd-module name="@angular/localize/src/tools/src/source_file_utils" /> | ||
import * as t from '@babel/types'; | ||
import { Diagnostics } from './diagnostics'; | ||
import { DiagnosticHandlingStrategy, Diagnostics } from './diagnostics'; | ||
/** | ||
@@ -95,10 +95,6 @@ * Is the given `expression` the global `$localize` identifier? | ||
export interface TranslatePluginOptions { | ||
missingTranslation?: MissingTranslationStrategy; | ||
missingTranslation?: DiagnosticHandlingStrategy; | ||
localizeName?: string; | ||
} | ||
/** | ||
* How to handle missing translations. | ||
*/ | ||
export declare type MissingTranslationStrategy = 'error' | 'warning' | 'ignore'; | ||
/** | ||
* Translate the text of the given message, using the given translations. | ||
@@ -108,3 +104,3 @@ * | ||
*/ | ||
export declare function translate(diagnostics: Diagnostics, translations: Record<string, ɵParsedTranslation>, messageParts: TemplateStringsArray, substitutions: readonly any[], missingTranslation: MissingTranslationStrategy): [TemplateStringsArray, readonly any[]]; | ||
export declare function translate(diagnostics: Diagnostics, translations: Record<string, ɵParsedTranslation>, messageParts: TemplateStringsArray, substitutions: readonly any[], missingTranslation: DiagnosticHandlingStrategy): [TemplateStringsArray, readonly any[]]; | ||
export declare class BabelParseError extends Error { | ||
@@ -111,0 +107,0 @@ node: t.Node; |
@@ -296,8 +296,3 @@ (function (factory) { | ||
if (localize_1.ɵisMissingTranslationError(e)) { | ||
if (missingTranslation === 'error') { | ||
diagnostics.error(e.message); | ||
} | ||
else if (missingTranslation === 'warning') { | ||
diagnostics.warn(e.message); | ||
} | ||
diagnostics.add(missingTranslation, e.message); | ||
// Return the parsed message because this will have the meta blocks stripped | ||
@@ -349,2 +344,2 @@ return [ | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlX2ZpbGVfdXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9sb2Nh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CBkbyBub3QgbGVhayBpbnRvIG91ciBjb2RlLlxuICByZXR1cm4ge3N0YXJ0OiB7Li4ubG9jYXRpb24uc3RhcnR9LCBlbmQ6IHsuLi5sb2NhdGlvbi5lbmR9LCBmaWxlfTtcbn1cbiJdfQ== |
#!/usr/bin/env node | ||
/// <amd-module name="@angular/localize/src/tools/src/translate/main" /> | ||
import { Diagnostics } from '../diagnostics'; | ||
import { MissingTranslationStrategy } from '../source_file_utils'; | ||
import { DiagnosticHandlingStrategy, Diagnostics } from '../diagnostics'; | ||
import { OutputPathFn } from './output_path'; | ||
@@ -19,6 +18,25 @@ export interface TranslateFilesOptions { | ||
* working directory. | ||
* | ||
* For each locale to be translated, there should be an element in `translationFilePaths`. | ||
* Each element is either an absolute path to the translation file, or an array of absolute paths | ||
* to translation files, for that locale. | ||
* | ||
* If the element contains more than one translation file, then the translations are merged. | ||
* | ||
* If allowed by the `duplicateTranslation` property, when more than one translation has the same | ||
* message id, the message from the earlier translation file in the array is used. | ||
* | ||
* For example, if the files are `[app.xlf, lib-1.xlf, lib-2.xlif]` then a message that appears in | ||
* `app.xlf` will override the same message in `lib-1.xlf` or `lib-2.xlf`. | ||
*/ | ||
translationFilePaths: string[]; | ||
translationFilePaths: (string | string[])[]; | ||
/** | ||
* A collection of the target locales for the translation files. | ||
* | ||
* If there is a locale provided in `translationFileLocales` then this is used rather than a | ||
* locale extracted from the file itself. | ||
* If there is neither a provided locale nor a locale parsed from the file, then an error is | ||
* thrown. | ||
* If there are both a provided locale and a locale parsed from the file, and they are not the | ||
* same, then a warning is reported. | ||
*/ | ||
@@ -38,4 +56,8 @@ translationFileLocales: (string | undefined)[]; | ||
*/ | ||
missingTranslation: MissingTranslationStrategy; | ||
missingTranslation: DiagnosticHandlingStrategy; | ||
/** | ||
* How to handle duplicate translations. | ||
*/ | ||
duplicateTranslation: DiagnosticHandlingStrategy; | ||
/** | ||
* The locale of the source files. | ||
@@ -47,2 +69,2 @@ * If this is provided then a copy of the application will be created with no translation but just | ||
} | ||
export declare function translateFiles({ sourceRootPath, sourceFilePaths, translationFilePaths, translationFileLocales, outputPathFn, diagnostics, missingTranslation, sourceLocale }: TranslateFilesOptions): void; | ||
export declare function translateFiles({ sourceRootPath, sourceFilePaths, translationFilePaths, translationFileLocales, outputPathFn, diagnostics, missingTranslation, duplicateTranslation, sourceLocale }: TranslateFilesOptions): void; |
@@ -55,3 +55,6 @@ #!/usr/bin/env node | ||
describe: 'A list of paths to the translation files to load, either absolute or relative to the current working directory.\n' + | ||
'E.g. "-t src/locale/messages.en.xlf src/locale/messages.fr.xlf src/locale/messages.de.xlf".', | ||
'E.g. `-t src/locale/messages.en.xlf src/locale/messages.fr.xlf src/locale/messages.de.xlf`.\n' + | ||
'If you want to merge multiple translation files for each locale, then provide the list of files in an array.\n' + | ||
'Note that the arrays must be in double quotes if you include any whitespace within the array.\n' + | ||
'E.g. `-t "[src/locale/messages.en.xlf, src/locale/messages-2.en.xlf]" [src/locale/messages.fr.xlf,src/locale/messages-2.fr.xlf]`', | ||
}) | ||
@@ -74,2 +77,8 @@ .option('target-locales', { | ||
}) | ||
.option('d', { | ||
alias: 'duplicateTranslation', | ||
describe: 'How to handle duplicate translations.', | ||
choices: ['error', 'warning', 'ignore'], | ||
default: 'warning', | ||
}) | ||
.strict() | ||
@@ -80,6 +89,7 @@ .help() | ||
var sourceFilePaths = glob.sync(options['s'], { absolute: true, cwd: sourceRootPath, nodir: true }); | ||
var translationFilePaths = options['t']; | ||
var translationFilePaths = convertArraysFromArgs(options['t']); | ||
var outputPathFn = output_path_1.getOutputPathFn(options['o']); | ||
var diagnostics = new diagnostics_1.Diagnostics(); | ||
var missingTranslation = options['m']; | ||
var duplicateTranslation = options['d']; | ||
var sourceLocale = options['l']; | ||
@@ -95,2 +105,3 @@ var translationFileLocales = options['target-locales'] || []; | ||
missingTranslation: missingTranslation, | ||
duplicateTranslation: duplicateTranslation, | ||
sourceLocale: sourceLocale | ||
@@ -102,3 +113,3 @@ }); | ||
function translateFiles(_a) { | ||
var sourceRootPath = _a.sourceRootPath, sourceFilePaths = _a.sourceFilePaths, translationFilePaths = _a.translationFilePaths, translationFileLocales = _a.translationFileLocales, outputPathFn = _a.outputPathFn, diagnostics = _a.diagnostics, missingTranslation = _a.missingTranslation, sourceLocale = _a.sourceLocale; | ||
var sourceRootPath = _a.sourceRootPath, sourceFilePaths = _a.sourceFilePaths, translationFilePaths = _a.translationFilePaths, translationFileLocales = _a.translationFileLocales, outputPathFn = _a.outputPathFn, diagnostics = _a.diagnostics, missingTranslation = _a.missingTranslation, duplicateTranslation = _a.duplicateTranslation, sourceLocale = _a.sourceLocale; | ||
var translationLoader = new translation_loader_1.TranslationLoader([ | ||
@@ -109,3 +120,3 @@ new xliff2_translation_parser_1.Xliff2TranslationParser(), | ||
new simple_json_translation_parser_1.SimpleJsonTranslationParser(), | ||
], diagnostics); | ||
], duplicateTranslation, diagnostics); | ||
var resourceProcessor = new translator_1.Translator([ | ||
@@ -115,3 +126,5 @@ new source_file_translation_handler_1.SourceFileTranslationHandler({ missingTranslation: missingTranslation }), | ||
], diagnostics); | ||
var translations = translationLoader.loadBundles(translationFilePaths, translationFileLocales); | ||
// Convert all the `translationFilePaths` elements to arrays. | ||
var translationFilePathsArrays = translationFilePaths.map(function (filePaths) { return Array.isArray(filePaths) ? filePaths : [filePaths]; }); | ||
var translations = translationLoader.loadBundles(translationFilePathsArrays, translationFileLocales); | ||
sourceRootPath = path_1.resolve(sourceRootPath); | ||
@@ -121,3 +134,13 @@ resourceProcessor.translateFiles(sourceFilePaths, sourceRootPath, outputPathFn, translations, sourceLocale); | ||
exports.translateFiles = translateFiles; | ||
/** | ||
* Parse each of the given string `args` and convert it to an array if it is of the form | ||
* `[abc, def, ghi]`, i.e. it is enclosed in square brackets with comma delimited items. | ||
* @param args The string to potentially convert to arrays. | ||
*/ | ||
function convertArraysFromArgs(args) { | ||
return args.map(function (arg) { return (arg.startsWith('[') && arg.endsWith(']')) ? | ||
arg.slice(1, -1).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ools/src/translate/translation_files/translation_loader" /> | ||
*/ | ||
import { Diagnostics } from '../../diagnostics'; | ||
import { DiagnosticHandlingStrategy, Diagnostics } from '../../diagnostics'; | ||
import { TranslationBundle } from '../translator'; | ||
@@ -18,4 +18,5 @@ import { TranslationParser } from './translation_parsers/translation_parser'; | ||
private translationParsers; | ||
private duplicateTranslation; | ||
/** @deprecated */ private diagnostics?; | ||
constructor(translationParsers: TranslationParser<any>[], | ||
constructor(translationParsers: TranslationParser<any>[], duplicateTranslation: DiagnosticHandlingStrategy, | ||
/** @deprecated */ diagnostics?: Diagnostics | undefined); | ||
@@ -25,3 +26,15 @@ /** | ||
* | ||
* If there is a locale provided in `translationFileLocales` then this is used rather than the | ||
* @param translationFilePaths An array, per locale, of absolute paths to translation files. | ||
* | ||
* For each locale to be translated, there is an element in `translationFilePaths`. Each element | ||
* is an array of absolute paths to translation files for that locale. | ||
* If the array contains more than one translation file, then the translations are merged. | ||
* If allowed by the `duplicateTranslation` property, when more than one translation has the same | ||
* message id, the message from the earlier translation file in the array is used. | ||
* For example, if the files are `[app.xlf, lib-1.xlf, lib-2.xlif]` then a message that appears in | ||
* `app.xlf` will override the same message in `lib-1.xlf` or `lib-2.xlf`. | ||
* | ||
* @param translationFileLocales An array of locales for each of the translation files. | ||
* | ||
* If there is a locale provided in `translationFileLocales` then this is used rather than a | ||
* locale extracted from the file itself. | ||
@@ -31,8 +44,14 @@ * If there is neither a provided locale nor a locale parsed from the file, then an error is | ||
* If there are both a provided locale and a locale parsed from the file, and they are not the | ||
* same, then a warning is reported . | ||
* | ||
* @param translationFilePaths An array of absolute paths to the translation files. | ||
* @param translationFileLocales An array of locales for each of the translation files. | ||
* same, then a warning is reported. | ||
*/ | ||
loadBundles(translationFilePaths: string[], translationFileLocales: (string | undefined)[]): TranslationBundle[]; | ||
loadBundles(translationFilePaths: string[][], translationFileLocales: (string | undefined)[]): TranslationBundle[]; | ||
/** | ||
* Load all the translations from the file at the given `filePath`. | ||
*/ | ||
private loadBundle; | ||
/** | ||
* There is more than one `filePath` for this locale, so load each as a bundle and then merge them | ||
* all together. | ||
*/ | ||
private mergeBundles; | ||
} |
@@ -18,5 +18,6 @@ (function (factory) { | ||
var TranslationLoader = /** @class */ (function () { | ||
function TranslationLoader(translationParsers, | ||
function TranslationLoader(translationParsers, duplicateTranslation, | ||
/** @deprecated */ diagnostics) { | ||
this.translationParsers = translationParsers; | ||
this.duplicateTranslation = duplicateTranslation; | ||
this.diagnostics = diagnostics; | ||
@@ -27,3 +28,15 @@ } | ||
* | ||
* If there is a locale provided in `translationFileLocales` then this is used rather than the | ||
* @param translationFilePaths An array, per locale, of absolute paths to translation files. | ||
* | ||
* For each locale to be translated, there is an element in `translationFilePaths`. Each element | ||
* is an array of absolute paths to translation files for that locale. | ||
* If the array contains more than one translation file, then the translations are merged. | ||
* If allowed by the `duplicateTranslation` property, when more than one translation has the same | ||
* message id, the message from the earlier translation file in the array is used. | ||
* For example, if the files are `[app.xlf, lib-1.xlf, lib-2.xlif]` then a message that appears in | ||
* `app.xlf` will override the same message in `lib-1.xlf` or `lib-2.xlf`. | ||
* | ||
* @param translationFileLocales An array of locales for each of the translation files. | ||
* | ||
* If there is a locale provided in `translationFileLocales` then this is used rather than a | ||
* locale extracted from the file itself. | ||
@@ -33,48 +46,83 @@ * If there is neither a provided locale nor a locale parsed from the file, then an error is | ||
* If there are both a provided locale and a locale parsed from the file, and they are not the | ||
* same, then a warning is reported . | ||
* | ||
* @param translationFilePaths An array of absolute paths to the translation files. | ||
* @param translationFileLocales An array of locales for each of the translation files. | ||
* same, then a warning is reported. | ||
*/ | ||
TranslationLoader.prototype.loadBundles = function (translationFilePaths, translationFileLocales) { | ||
var _this = this; | ||
return translationFilePaths.map(function (filePath, index) { | ||
var e_1, _a, _b; | ||
var fileContents = file_utils_1.FileUtils.readFile(filePath); | ||
return translationFilePaths.map(function (filePaths, index) { | ||
var providedLocale = translationFileLocales[index]; | ||
return _this.mergeBundles(filePaths, providedLocale); | ||
}); | ||
}; | ||
/** | ||
* Load all the translations from the file at the given `filePath`. | ||
*/ | ||
TranslationLoader.prototype.loadBundle = function (filePath, providedLocale) { | ||
var e_1, _a; | ||
var fileContents = file_utils_1.FileUtils.readFile(filePath); | ||
try { | ||
for (var _b = tslib_1.__values(this.translationParsers), _c = _b.next(); !_c.done; _c = _b.next()) { | ||
var translationParser = _c.value; | ||
var result = translationParser.canParse(filePath, fileContents); | ||
if (!result) { | ||
continue; | ||
} | ||
var _d = translationParser.parse(filePath, fileContents, result), parsedLocale = _d.locale, translations = _d.translations, diagnostics = _d.diagnostics; | ||
if (diagnostics.hasErrors) { | ||
throw new Error(diagnostics.formatDiagnostics("The translation file \"" + filePath + "\" could not be parsed.")); | ||
} | ||
var locale = providedLocale || parsedLocale; | ||
if (locale === undefined) { | ||
throw new Error("The translation file \"" + filePath + "\" does not contain a target locale and no explicit locale was provided for this file."); | ||
} | ||
if (parsedLocale !== undefined && providedLocale !== undefined && | ||
parsedLocale !== providedLocale) { | ||
diagnostics.warn("The provided locale \"" + providedLocale + "\" does not match the target locale \"" + parsedLocale + "\" found in the translation file \"" + filePath + "\"."); | ||
} | ||
// If we were passed a diagnostics object then copy the messages over to it. | ||
if (this.diagnostics) { | ||
this.diagnostics.merge(diagnostics); | ||
} | ||
return { locale: locale, translations: translations, diagnostics: diagnostics }; | ||
} | ||
} | ||
catch (e_1_1) { e_1 = { error: e_1_1 }; } | ||
finally { | ||
try { | ||
for (var _c = tslib_1.__values(_this.translationParsers), _d = _c.next(); !_d.done; _d = _c.next()) { | ||
var translationParser = _d.value; | ||
var result = translationParser.canParse(filePath, fileContents); | ||
if (!result) { | ||
continue; | ||
} | ||
var _e = translationParser.parse(filePath, fileContents, result), parsedLocale = _e.locale, translations = _e.translations, diagnostics = _e.diagnostics; | ||
if (diagnostics.hasErrors) { | ||
throw new Error(diagnostics.formatDiagnostics("The translation file \"" + filePath + "\" could not be parsed.")); | ||
} | ||
var providedLocale = translationFileLocales[index]; | ||
var locale = providedLocale || parsedLocale; | ||
if (locale === undefined) { | ||
throw new Error("The translation file \"" + filePath + "\" does not contain a target locale and no explicit locale was provided for this file."); | ||
} | ||
if (parsedLocale !== undefined && providedLocale !== undefined && | ||
parsedLocale !== providedLocale) { | ||
diagnostics.warn("The provided locale \"" + providedLocale + "\" does not match the target locale \"" + parsedLocale + "\" found in the translation file \"" + filePath + "\"."); | ||
} | ||
// If we were passed a diagnostics object then copy the messages over to it. | ||
if (_this.diagnostics) { | ||
(_b = _this.diagnostics.messages).push.apply(_b, tslib_1.__spread(diagnostics.messages)); | ||
} | ||
return { locale: locale, translations: translations, diagnostics: diagnostics }; | ||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b); | ||
} | ||
finally { if (e_1) throw e_1.error; } | ||
} | ||
throw new Error("There is no \"TranslationParser\" that can parse this translation file: " + filePath + "."); | ||
}; | ||
/** | ||
* There is more than one `filePath` for this locale, so load each as a bundle and then merge them | ||
* all together. | ||
*/ | ||
TranslationLoader.prototype.mergeBundles = function (filePaths, providedLocale) { | ||
var _this = this; | ||
var bundles = filePaths.map(function (filePath) { return _this.loadBundle(filePath, providedLocale); }); | ||
var bundle = bundles[0]; | ||
var _loop_1 = function (i) { | ||
var nextBundle = bundles[i]; | ||
if (nextBundle.locale !== bundle.locale) { | ||
if (this_1.diagnostics) { | ||
var previousFiles = filePaths.slice(0, i).map(function (f) { return "\"" + f + "\""; }).join(', '); | ||
this_1.diagnostics.warn("When merging multiple translation files, the target locale \"" + nextBundle.locale + "\" found in \"" + filePaths[i] + "\" does not match the target locale \"" + bundle.locale + "\" found in earlier files [" + previousFiles + "]."); | ||
} | ||
} | ||
catch (e_1_1) { e_1 = { error: e_1_1 }; } | ||
finally { | ||
try { | ||
if (_d && !_d.done && (_a = _c.return)) _a.call(_c); | ||
Object.keys(nextBundle.translations).forEach(function (messageId) { | ||
var _a; | ||
if (bundle.translations[messageId] !== undefined) { | ||
(_a = _this.diagnostics) === null || _a === void 0 ? void 0 : _a.add(_this.duplicateTranslation, "Duplicate translations for message \"" + messageId + "\" when merging \"" + filePaths[i] + "\"."); | ||
} | ||
finally { if (e_1) throw e_1.error; } | ||
} | ||
throw new Error("There is no \"TranslationParser\" that can parse this translation file: " + filePath + "."); | ||
}); | ||
else { | ||
bundle.translations[messageId] = nextBundle.translations[messageId]; | ||
} | ||
}); | ||
}; | ||
var this_1 = this; | ||
for (var i = 1; i < bundles.length; i++) { | ||
_loop_1(i); | ||
} | ||
return bundle; | ||
}; | ||
@@ -85,2 +133,2 @@ return TranslationLoader; | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsYXRpb25fbG9hZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvbG9jYWxpemUvc3JjL3Rvb2xzL3NyYy90cmFuc2xhdGUvdHJhbnNsYXRpb25fZmlsZXMvdHJhbnNsYXRpb25fbG9hZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7OztJQVFBLHlFQUEyQztJQUkzQzs7T0FFRztJQUNIO1FBQ0UsMkJBQ1ksa0JBQTRDO1FBQ3BELGtCQUFrQixDQUFTLFdBQXlCO1lBRDVDLHVCQUFrQixHQUFsQixrQkFBa0IsQ0FBMEI7WUFDekIsZ0JBQVcsR0FBWCxXQUFXLENBQWM7UUFBRyxDQUFDO1FBRTVEOzs7Ozs7Ozs7Ozs7V0FZRztRQUNILHVDQUFXLEdBQVgsVUFBWSxvQkFBOEIsRUFBRSxzQkFBNEM7WUFBeEYsaUJBeUNDO1lBdkNDLE9BQU8sb0JBQW9CLENBQUMsR0FBRyxDQUFDLFVBQUMsUUFBUSxFQUFFLEtBQUs7O2dCQUM5QyxJQUFNLFlBQVksR0FBRyxzQkFBUyxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUMsQ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ported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
838811
6978