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 Reply Children
  • Hi

    First of all, thank you for the suggestion about using DSI. I'll look into it.

    Now to add more information to my questions and to answer the questions.: 

    I use studio 2021 : 16.2.10.9305

    The reason I thought about preview was that it seemed easier and I thought that translator could see that comment side by side to several sentences located in the relevant translatable XML element. 

    With the custom filetype based on XML 2 filetype,  I get an error "Object reference not set to an instance of an object" when I want to see the preview. 

    Trados Studio 2021 error message 'Object reference not set to an instance of an object' displayed in the preview pane with a stack trace of the error details.

    I'm suspecting that I must have made an error in the stylsheet.xsl that is causing this error and preventing the preview.

    Thank you

    Simon

    Please find attached the ZIP file with XML, FileType and the stylesheet for the preview.

    /cfs-file/__key/communityserver-discussions-components-files/90/LF_5F00_in_5F00_XML_5F00_File_5F00_Sample.zip

    And the zip with the error stack: /cfs-file/__key/communityserver-discussions-components-files/90/Preview-issue-LF-in-XML-sdlerror_2D00_2022620_2D00_11h9m38s.sdlerror.xml.zip

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 7:13 AM (GMT 0) on 29 Feb 2024]
  • 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]