diff options
author | Lucie Gérard <lucie.gerard@qt.io> | 2023-12-15 18:38:45 +0100 |
---|---|---|
committer | Lucie Gérard <lucie.gerard@qt.io> | 2024-01-17 09:40:07 +0100 |
commit | e96c9e98bc4004063fa93dcf9ccce4997ddb1fdd (patch) | |
tree | ad8c3e5fad02fb767c9a314d3a8c7f2c3b3e1d93 /tests/auto/linguist/lconvert/data/test-trans_seg.xlf | |
parent | 3bafced88a63d67a33ca1762123fbf5c68c0699f (diff) |
liguist: add support for segmented target in XLIFF
All segments of a translation target are now retrieved.
The spacing between the <mrk> is preserved.
An auto test is added.
Task-number: QTBUG-119051
Pick-to: 6.6 6.7
Change-Id: I16aedcf911642a3372e9676a9896bff39ee99f60
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Diffstat (limited to 'tests/auto/linguist/lconvert/data/test-trans_seg.xlf')
-rw-r--r-- | tests/auto/linguist/lconvert/data/test-trans_seg.xlf | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/auto/linguist/lconvert/data/test-trans_seg.xlf b/tests/auto/linguist/lconvert/data/test-trans_seg.xlf new file mode 100644 index 000000000..4cff2bc56 --- /dev/null +++ b/tests/auto/linguist/lconvert/data/test-trans_seg.xlf @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xliff + xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> + <file datatype="plaintext" original="self" source-language="en" target-language="de"> + <body> + <trans-unit id="hello_world" + xmlns:sap="urn:x-sap:sls-mlt"> + <source>Hello world!</source> + <target>Hallo Welt!</target> + </trans-unit> + <trans-unit id="_msg2394"> + <source xml:space="preserve">A standout centrepiece for any occasion. Use the temperature sensor for best results. + +Serve with roast tomatoes and hasselback potatoes.</source> + <seg-source><mrk mtype="seg" mid="605">A standout centrepiece for any occasion.</mrk><mrk mtype="seg" mid="606">Use the temperature sensor for best results.</mrk> + + <mrk mtype="seg" mid="607">Serve with roast tomatoes and hasselback potatoes.</mrk></seg-source> + <target state="signed-off" xml:space="preserve"><mrk mtype="seg" mid="605">Un centro de mesa destacado para cualquier ocasión.</mrk><mrk mtype="seg" mid="606">Utilice el sensor de temperatura para obtener mejores resultados.</mrk> + +<mrk mtype="seg" mid="607">Acompañe con tomates asados y papas horneadas tipo hassleback.</mrk></target> + <context-group purpose="location"> + <context context-type="linenumber">137</context> + </context-group> + </trans-unit> + <trans-unit id="_msg2395"> + <source xml:space="preserve">Two pieces</source> + <seg-source> + <mrk mtype="seg" mid="1">Two</mrk> <mrk mtype="seg" mid="2">pieces</mrk> + </seg-source> + <target state="signed-off" xml:space="preserve"><mrk mtype="seg" mid="1">Zwei</mrk> <mrk mtype="seg" mid="2">Stueck</mrk></target> + <context-group purpose="location"> + <context context-type="linenumber">137</context> + </context-group> + </trans-unit> + <trans-unit id="test" + xmlns:sap="urn:x-sap:sls-mlt"> + <source>Hello!</source> + <target>Hallo!</target> + </trans-unit> + </body> + </file> +</xliff> |