diff --git a/packages/compiler/src/i18n/serializers/xliff.ts b/packages/compiler/src/i18n/serializers/xliff.ts
index 58d9a6083c..b546ce14e1 100644
--- a/packages/compiler/src/i18n/serializers/xliff.ts
+++ b/packages/compiler/src/i18n/serializers/xliff.ts
@@ -25,6 +25,7 @@ const _MARKER_TAG = 'mrk';
const _FILE_TAG = 'file';
const _SOURCE_TAG = 'source';
const _SEGMENT_SOURCE_TAG = 'seg-source';
+const _ALT_TRANS_TAG = 'alt-trans';
const _TARGET_TAG = 'target';
const _UNIT_TAG = 'trans-unit';
const _CONTEXT_GROUP_TAG = 'context-group';
@@ -222,6 +223,7 @@ class XliffParser implements ml.Visitor {
// ignore those tags
case _SOURCE_TAG:
case _SEGMENT_SOURCE_TAG:
+ case _ALT_TRANS_TAG:
break;
case _TARGET_TAG:
diff --git a/packages/compiler/test/i18n/serializers/xliff_spec.ts b/packages/compiler/test/i18n/serializers/xliff_spec.ts
index 87c153b633..99ee251a57 100644
--- a/packages/compiler/test/i18n/serializers/xliff_spec.ts
+++ b/packages/compiler/test/i18n/serializers/xliff_spec.ts
@@ -296,6 +296,30 @@ lignes`,
it('should return the target locale',
() => { expect(serializer.load(LOAD_XLIFF, 'url').locale).toEqual('fr'); });
+ it('should ignore alt-trans targets', () => {
+ const XLIFF = `
+
+
+
+
+
+ Weiter
+
+ src/app/auth/registration-form/registration-form.component.html
+ 69
+
+
+
+
+ Content
+
+
+
+
+ `;
+
+ expect(loadAsMap(XLIFF)).toEqual({'registration.submit': 'Weiter'});
+ });
describe('structure errors', () => {
it('should throw when a trans-unit has no translation', () => {
diff --git a/packages/localize/src/tools/test/translate/translation_files/translation_parsers/xliff1_translation_parser_spec.ts b/packages/localize/src/tools/test/translate/translation_files/translation_parsers/xliff1_translation_parser_spec.ts
index e0fa2a443c..4a4c2268a7 100644
--- a/packages/localize/src/tools/test/translate/translation_files/translation_parsers/xliff1_translation_parser_spec.ts
+++ b/packages/localize/src/tools/test/translate/translation_files/translation_parsers/xliff1_translation_parser_spec.ts
@@ -373,6 +373,34 @@ describe('Xliff1TranslationParser', () => {
.toEqual(ɵmakeParsedTranslation(['Translated first sentence.']));
});
+ it('should ignore alt-trans targets', () => {
+ const XLIFF = `
+
+
+
+
+
+ Weiter
+
+ src/app/auth/registration-form/registration-form.component.html
+ 69
+
+
+
+
+ Content
+
+
+
+
+ `;
+
+ const parser = new Xliff1TranslationParser();
+ const result = parser.parse('/some/file.xlf', XLIFF);
+ expect(result.translations['registration.submit'])
+ .toEqual(ɵmakeParsedTranslation(['Weiter']));
+ });
+
describe('[structure errors]', () => {
it('should throw when a trans-unit has no translation', () => {
const XLIFF = `