Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): normalize extract i18n format option
Browse files Browse the repository at this point in the history
  • Loading branch information
clydin authored and vikerman committed Oct 17, 2019
1 parent 9fca29a commit cf116da
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/angular_devkit/build_angular/src/extract-i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ async function execute(options: ExtractI18nBuilderOptions, context: BuilderConte
options.format = options.i18nFormat;
}

switch (options.format) {
case Format.Xlf:
case Format.Xlif:
case Format.Xliff:
options.format = Format.Xlf;
break;
case Format.Xlf2:
case Format.Xliff2:
options.format = Format.Xlf2;
break;
}

// We need to determine the outFile name so that AngularCompiler can retrieve it.
let outFile = options.outFile || getI18nOutfile(options.format);
if (options.outputPath) {
Expand Down

0 comments on commit cf116da

Please sign in to comment.