@@ -24,7 +24,7 @@ const HTML = `
24
24
<p i18n="@@bar">foo</p>
25
25
<p i18n="ph names"><br><img><div></div></p>
26
26
<p i18n="@@baz">{ count, plural, =0 { { sex, select, other {<p>deeply nested</p>}} }}</p>
27
- <p i18n>{ count, plural, =0 { { sex, select, other {<p>deeply nested</p>}} }}</p>
27
+ <p i18n>Test: { count, plural, =0 { { sex, select, other {<p>deeply nested</p>}} } =other {a lot }}</p>
28
28
<p i18n>multi
29
29
lines</p>
30
30
` ;
@@ -41,14 +41,14 @@ const WRITE_XLIFF = `<?xml version="1.0" encoding="UTF-8" ?>
41
41
</context-group>
42
42
</trans-unit>
43
43
<trans-unit id="ec1d033f2436133c14ab038286c4f5df4697484a" datatype="html">
44
- <source>translatable element <x id="START_BOLD_TEXT" ctype="x-b"/>with placeholders<x id="CLOSE_BOLD_TEXT" ctype="x-b"/ > <x id="INTERPOLATION"/></source>
44
+ <source>translatable element <x id="START_BOLD_TEXT" ctype="x-b" equiv-text="<b>" />with placeholders<x id="CLOSE_BOLD_TEXT" ctype="x-b" equiv-text="</b>"/ > <x id="INTERPOLATION" equiv-text="{{ interpolation}} "/></source>
45
45
<context-group purpose="location">
46
46
<context context-type="sourcefile">file.ts</context>
47
47
<context context-type="linenumber">3</context>
48
48
</context-group>
49
49
</trans-unit>
50
50
<trans-unit id="e2ccf3d131b15f54aa1fcf1314b1ca77c14bfcc2" datatype="html">
51
- <source>{VAR_PLURAL, plural, =0 {<x id="START_PARAGRAPH" ctype="x-p"/>test<x id="CLOSE_PARAGRAPH" ctype="x-p"/>} }</source>
51
+ <source>{VAR_PLURAL, plural, =0 {<x id="START_PARAGRAPH" ctype="x-p" equiv-text="<p>" />test<x id="CLOSE_PARAGRAPH" ctype="x-p" equiv-text="</p> "/>} }</source>
52
52
<context-group purpose="location">
53
53
<context context-type="sourcefile">file.ts</context>
54
54
<context context-type="linenumber">4</context>
@@ -84,22 +84,29 @@ const WRITE_XLIFF = `<?xml version="1.0" encoding="UTF-8" ?>
84
84
</context-group>
85
85
</trans-unit>
86
86
<trans-unit id="d7fa2d59aaedcaa5309f13028c59af8c85b8c49d" datatype="html">
87
- <source><x id="LINE_BREAK" ctype="lb"/ ><x id="TAG_IMG" ctype="image"/ ><x id="START_TAG_DIV" ctype="x-div"/><x id="CLOSE_TAG_DIV" ctype="x-div"/></source>
87
+ <source><x id="LINE_BREAK" ctype="lb" equiv-text="<br/>"/ ><x id="TAG_IMG" ctype="image" equiv-text="<img/>"/ ><x id="START_TAG_DIV" ctype="x-div" equiv-text="<div>" /><x id="CLOSE_TAG_DIV" ctype="x-div" equiv-text="</div> "/></source>
88
88
<context-group purpose="location">
89
89
<context context-type="sourcefile">file.ts</context>
90
90
<context context-type="linenumber">9</context>
91
91
</context-group>
92
92
<note priority="1" from="description">ph names</note>
93
93
</trans-unit>
94
94
<trans-unit id="baz" datatype="html">
95
- <source>{VAR_PLURAL, plural, =0 {{VAR_SELECT, select, other {<x id="START_PARAGRAPH" ctype="x-p"/>deeply nested<x id="CLOSE_PARAGRAPH" ctype="x-p"/>} } } }</source>
95
+ <source>{VAR_PLURAL, plural, =0 {{VAR_SELECT, select, other {<x id="START_PARAGRAPH" ctype="x-p" equiv-text="<p>" />deeply nested<x id="CLOSE_PARAGRAPH" ctype="x-p" equiv-text="</p> "/>} } } }</source>
96
96
<context-group purpose="location">
97
97
<context context-type="sourcefile">file.ts</context>
98
98
<context context-type="linenumber">10</context>
99
99
</context-group>
100
100
</trans-unit>
101
- <trans-unit id="0e16a673a5a7a135c9f7b957ec2c5c6f6ee6e2c4" datatype="html">
102
- <source>{VAR_PLURAL, plural, =0 {{VAR_SELECT, select, other {<x id="START_PARAGRAPH" ctype="x-p"/>deeply nested<x id="CLOSE_PARAGRAPH" ctype="x-p"/>} } } }</source>
101
+ <trans-unit id="52ffa620dcd76247a56d5331f34e73f340a43cdb" datatype="html">
102
+ <source>Test: <x id="ICU" equiv-text="{ count, plural, =0 {...} =other {...}}"/></source>
103
+ <context-group purpose="location">
104
+ <context context-type="sourcefile">file.ts</context>
105
+ <context context-type="linenumber">11</context>
106
+ </context-group>
107
+ </trans-unit>
108
+ <trans-unit id="1503afd0ccc20ff01d5e2266a9157b7b342ba494" datatype="html">
109
+ <source>{VAR_PLURAL, plural, =0 {{VAR_SELECT, select, other {<x id="START_PARAGRAPH" ctype="x-p" equiv-text="<p>"/>deeply nested<x id="CLOSE_PARAGRAPH" ctype="x-p" equiv-text="</p>"/>} } } =other {a lot} }</source>
103
110
<context-group purpose="location">
104
111
<context context-type="sourcefile">file.ts</context>
105
112
<context context-type="linenumber">11</context>
@@ -192,9 +199,17 @@ const LOAD_XLIFF = `<?xml version="1.0" encoding="UTF-8" ?>
192
199
<source>{VAR_PLURAL, plural, =0 {{VAR_SELECT, select, other {<x id="START_PARAGRAPH" ctype="x-p"/>deeply nested<x id="CLOSE_PARAGRAPH" ctype="x-p"/>} } } }</source>
193
200
<target>{VAR_PLURAL, plural, =0 {{VAR_SELECT, select, other {<x id="START_PARAGRAPH" ctype="x-p"/>profondément imbriqué<x id="CLOSE_PARAGRAPH" ctype="x-p"/>} } } }</target>
194
201
</trans-unit>
195
- <trans-unit id="0e16a673a5a7a135c9f7b957ec2c5c6f6ee6e2c4" datatype="html">
196
- <source>{VAR_PLURAL, plural, =0 {{VAR_SELECT, select, other {<x id="START_PARAGRAPH" ctype="x-p"/>deeply nested<x id="CLOSE_PARAGRAPH" ctype="x-p"/>} } } }</source>
197
- <target>{VAR_PLURAL, plural, =0 {{VAR_SELECT, select, other {<x id="START_PARAGRAPH" ctype="x-p"/>profondément imbriqué<x id="CLOSE_PARAGRAPH" ctype="x-p"/>} } } }</target>
202
+ <trans-unit id="52ffa620dcd76247a56d5331f34e73f340a43cdb" datatype="html">
203
+ <source>Test: <x id="ICU" equiv-text="{ count, plural, =0 {...} =other {...}}"/></source>
204
+ <target>Test: <x id="ICU" equiv-text="{ count, plural, =0 {...} =other {...}}"/></target>
205
+ <context-group purpose="location">
206
+ <context context-type="sourcefile">file.ts</context>
207
+ <context context-type="linenumber">11</context>
208
+ </context-group>
209
+ </trans-unit>
210
+ <trans-unit id="1503afd0ccc20ff01d5e2266a9157b7b342ba494" datatype="html">
211
+ <source>{VAR_PLURAL, plural, =0 {{VAR_SELECT, select, other {<x id="START_PARAGRAPH" ctype="x-p"/>deeply nested<x id="CLOSE_PARAGRAPH" ctype="x-p"/>} } } =other {a lot} }</source>
212
+ <target>{VAR_PLURAL, plural, =0 {{VAR_SELECT, select, other {<x id="START_PARAGRAPH" ctype="x-p"/>profondément imbriqué<x id="CLOSE_PARAGRAPH" ctype="x-p"/>} } } =other {beaucoup} }</target>
198
213
</trans-unit>
199
214
<trans-unit id="fcfa109b0e152d4c217dbc02530be0bcb8123ad1" datatype="html">
200
215
<source>multi
@@ -253,9 +268,10 @@ export function main(): void {
253
268
'empty target' : '' ,
254
269
'baz' :
255
270
'{VAR_PLURAL, plural, =0 {[{VAR_SELECT, select, other {[<ph name="START_PARAGRAPH"/>, profondément imbriqué, <ph name="CLOSE_PARAGRAPH"/>]}}, ]}}' ,
256
- '0e16a673a5a7a135c9f7b957ec2c5c6f6ee6e2c4' :
271
+ '52ffa620dcd76247a56d5331f34e73f340a43cdb' : 'Test: <ph name="ICU"/>' ,
272
+ '1503afd0ccc20ff01d5e2266a9157b7b342ba494' :
257
273
'{VAR_PLURAL, plural, =0 {[{VAR_SELECT, select, other {[<ph' +
258
- ' name="START_PARAGRAPH"/>, profondément imbriqué, <ph name="CLOSE_PARAGRAPH"/>]}}, ]}}' ,
274
+ ' name="START_PARAGRAPH"/>, profondément imbriqué, <ph name="CLOSE_PARAGRAPH"/>]}}, ]}, =other {[beaucoup]} }' ,
259
275
'fcfa109b0e152d4c217dbc02530be0bcb8123ad1' : `multi
260
276
lignes`
261
277
} ) ;
0 commit comments