Processing XML file with <LF> separators in transaltable element.

Hello all, 

I've got an XML file for translation. I thought it would be simple tas with custom XML file type, but I'm a bit stucked now. 

The reasons for this are:

1. source file is formatted only with <LF> character and not with more frequent  <CR><LF>  combination. 
XML code with elements and attributes, including ContentTranslate and ContentReadOnly tags, indicating translatable text and notes for translators.

This is problematic in the XML element which holds translatable text as all the text is parsed in one segment instead of several segments.

Trados Studio interface showing segments with translatable text 'Comfortable travel.' and 'Demo Coach' with a warning for 'StairImport Leg emb 4'.

2. There is a context description XML element that give some additional info to translator and I wanted to use the the "preview" function (credit to  blog).  
Split screen with XML code on the left and XSLT code on the right, with a preview section below showing how the XML content will appear.

To resolve the issue with <LF> I used the Embedded Content Processor, and this get me translatable content segmented correctly, but, causing to be unable to use the preview at the same time.

Trados Studio interface with segments listed and a warning for 'Embedded Content Plain Text v 1.0.0.0' and 'StairImport XML2'.

Now, I'm asking myself if there is anything else that I could do to get the translatable content segmented correctly and stil get the Preview or to be able to show the additonal info Studio Editor? 

Thank you

Simon



Generated Image Alt-Text
[edited by: Trados AI at 7:13 AM (GMT 0) on 29 Feb 2024]
emoji
Parents
  • I'd have to test, but I thought this custom preview feature when using an embedded content processor, had been fixed in a recent release.  What version are you using?

    But if not why don't you add this information as document structure in your parser rule and then use the DSI Viewer to see it?  Given your preview isn't there to show final layout or anything more complex I actually think the DSI Viewer will be more performant.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
  • Hi

    I just wanted to give an update about my issues with <LF> only tags segmented translatable content in the XML element and the option to have a "table like" preview with source content and comment.

    As there are no <CR> beside the <LF> characters in the translatable content of the XML element, the only way I managed to get the segmentation correct was to use the Plain text ECP.

    This worked with XML2 and wIth XML Embedded Content FileTypes.

    Trados Studio dialog box showing file type options including XML 2 and XML (Embedded Content). Trados Studio interface highlighting the use of Embedded Content Plain Text and LF in XML - 1.2 ECP file types. Trados Studio Embedded Content settings with parser rule for ContentTranslate element using Embedded Content Plain Text.

    From the two options, the XML preview is "available" only with FileType based on XML2 and not available with FileType based on XML (EC). 

    But unfortunately, when I want to generate the XML preview on the file prepared with XML2 + PlainText ECP FileType,  Studio 2021 SR2 CU10 give the "Object reference not set to an instance of an object" error. 

    I tried all sorts of possible alternatives but it seems that I got stuck so I decided to use the following workaround. 

    I'm parsing the <ContentTranslate> and  <ContentReadOnly> elements where I add structure information on the <ContentReadOnly> element and then I use SDLXliff toolkit to loc the segments with DSI coresponding to <ContentReadOnly> element.

    It's far away from elegant solution but it works for now. 

    Cheers.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 7:13 AM (GMT 0) on 29 Feb 2024]
Reply
  • Hi

    I just wanted to give an update about my issues with <LF> only tags segmented translatable content in the XML element and the option to have a "table like" preview with source content and comment.

    As there are no <CR> beside the <LF> characters in the translatable content of the XML element, the only way I managed to get the segmentation correct was to use the Plain text ECP.

    This worked with XML2 and wIth XML Embedded Content FileTypes.

    Trados Studio dialog box showing file type options including XML 2 and XML (Embedded Content). Trados Studio interface highlighting the use of Embedded Content Plain Text and LF in XML - 1.2 ECP file types. Trados Studio Embedded Content settings with parser rule for ContentTranslate element using Embedded Content Plain Text.

    From the two options, the XML preview is "available" only with FileType based on XML2 and not available with FileType based on XML (EC). 

    But unfortunately, when I want to generate the XML preview on the file prepared with XML2 + PlainText ECP FileType,  Studio 2021 SR2 CU10 give the "Object reference not set to an instance of an object" error. 

    I tried all sorts of possible alternatives but it seems that I got stuck so I decided to use the following workaround. 

    I'm parsing the <ContentTranslate> and  <ContentReadOnly> elements where I add structure information on the <ContentReadOnly> element and then I use SDLXliff toolkit to loc the segments with DSI coresponding to <ContentReadOnly> element.

    It's far away from elegant solution but it works for now. 

    Cheers.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 7:13 AM (GMT 0) on 29 Feb 2024]
Children
No Data