fix(compiler): i18n - ignore alt-trans
tags in XLIFF 1.2 (#33450)
The parser was accidentally reading the `target` tag below the `alt-trans` target and overriding the correct `target` tag. (This already worked in `$localize` but a test has been added to confirm.) Fixes #33161 PR Close #33450
This commit is contained in:

committed by
Andrew Kushnir

parent
a3034ef92e
commit
936700ad9f
@ -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:
|
||||
|
Reference in New Issue
Block a user