Skip to content

Commit cf116da

Browse files
clydinvikerman
authored andcommitted
fix(@angular-devkit/build-angular): normalize extract i18n format option
1 parent 9fca29a commit cf116da

File tree

1 file changed

+12
-0
lines changed
  • packages/angular_devkit/build_angular/src/extract-i18n

1 file changed

+12
-0
lines changed

packages/angular_devkit/build_angular/src/extract-i18n/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,18 @@ async function execute(options: ExtractI18nBuilderOptions, context: BuilderConte
6363
options.format = options.i18nFormat;
6464
}
6565

66+
switch (options.format) {
67+
case Format.Xlf:
68+
case Format.Xlif:
69+
case Format.Xliff:
70+
options.format = Format.Xlf;
71+
break;
72+
case Format.Xlf2:
73+
case Format.Xliff2:
74+
options.format = Format.Xlf2;
75+
break;
76+
}
77+
6678
// We need to determine the outFile name so that AngularCompiler can retrieve it.
6779
let outFile = options.outFile || getI18nOutfile(options.format);
6880
if (options.outputPath) {

0 commit comments

Comments
 (0)