Trados 2024 removing line breaks in exported XML file - How can i fix this

I'm using Trados Studio 2024 - 18.0.0.1013, we are experiencing different behaviors from Trados 2022 when exporting files.
Here, i've attached a diff of the changes and Trados 2024 has removed the line breaks after and before the comments. I set the entities to Always preserve but it does not work.

Is there a way to have Trados keeping things tidy. I only want to see the changes, not extra changes irrelevant to the product update. 

Side-by-side comparison of code diffs showing removal of line breaks around comments in an XML file.
English

Code snippet with highlighted changes, including translations and comments about shortcut icons and call blocking.

Screenshot of Trados Studio project template settings with 'Always preserve' selected for whitespace in content.

emoji
  • "Probability score": 0.6

    "Question improvement suggestion": Please provide more details about the steps you took before encountering the issue, and if there were any error messages displayed. Also, it would be helpful to know if there were any recent changes to your system or software.

    In the meantime, based on the information you have provided, here is a suggested answer to your question:

    Hello,

    Based on your description, it seems like you're having issues with line breaks being removed in the exported XML file when using Trados Studio 2024. This could be due to a number of reasons, but let's try a few things to resolve this:

    Step 1: Check your settings in Trados Studio. Go to File > Options > File Types > XML > XML Settings. Make sure that 'Preserve whitespace' is checked. This should help in maintaining the line breaks.

    Step 2: If the issue persists, you might want to check the XML file type settings. Go to File > Options > File Types > XML. Under the 'Tag Protection' section, ensure that 'Protect all tags' is selected.

    Step 3: If the above steps don't work, you might want to consider using a different XML editor to check if the issue persists. This can help determine if the issue is with Trados Studio or the XML file itself.

    Please note that these are general troubleshooting steps and might not resolve your issue completely. If the problem persists, more information would be needed to provide a more accurate solution.

    I hope this answer addressed your question. If not, please reject the answer, add the question improvement suggestion information, and click the RWS Community AI checkbox on the right to try again.

    RWS Community AI

    emoji
  •   

    You could upgrade to the current version of Trados Studio 2024, but not sure whether that would make a difference.

    I tried to reproduce your issue, but failed (my indents are tabs, not spaces):

    Side-by-side comparison of XML files in Trados Studio. Left file has English content, right file has German content with comments.

    Nota bene that my diff tool automatically ignores empty lines:

    Zoomed-in view of two XML files compared in Trados Studio, showing English text on the left and German translation on the right.

    Would it be possible to upload both a source and a target file, at least part thereof?

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 10:59 AM (GMT 0) on 27 Nov 2024]
  • Hi Daniel
    thanks for your reply and for looking into this.
    I've upgraded to the latest version of Trados 2024 but it now fails to open so need to address this other issue now. I've attached the En and De files
    I've also noticed that the entity conversion is not working so the vertical ellpisis are exported as character instead of code. Another issue that is causing trouble when trying to build the files.

    /cfs-file/__key/communityserver-discussions-components-files/90/SMSec_5F00_strings_2D00_test_2D00_EN_2D00_US.xml/cfs-file/__key/communityserver-discussions-components-files/90/SMSec_5F00_strings_2D00_test_2D00_DE_2D00_DE.xml

    emoji
  • Hi  

    Wish I could be of more help, but I simply can't reproduce this. Using your files and the out-of-the-box XML2 file filter (with “Preserve Whitespaces” on) I get an expected result:

    Side-by-side comparison of XML strings in Trados Studio with German and English translations. A red circle highlights an ellipsis character issue in the German version.

    In my case above, the MT translated the ellipsis into dot-dot-dot, but in your case it's the horizontal ellipsis character. You can define this behaviour in the “Entities” menu of the file type:

    Trados Studio Entity Conversion settings window with 'ellip' searched in the 'Search for entity' field. Red boxes highlight the 'Read as character' option checked for 'hellip' entity.

    Another attempt... I created a Single FIle Project and threw your file in, and voilá, yes, it does what it did for you.

    I have virtually no experience with Single File Projects, but I believe if you want to refine the file type settings with single file projects, you have to select "Advanced settings" at project creation and change the settings (preserve whitespace) there. I think the Single File Projects take their default settings from the Settings you define in File->Options, so that would be where you should change the file type settings if you want that behaviour as a standard setting.

    Mind you that these single file projects are by design "vanilla projects" without customisation. If you have specific requirements you should always use a pre-defined project template, that is a very powerful feature of Trados.

    TLDR;

    At project creation, you have to set XML2 to "preserve whitespaces" in the Advanced Settings of Single File Projects or in the normal file type settings of a normal project.

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 3:13 PM (GMT 0) on 27 Nov 2024]
  • Hi  
    Many thanks for your help. 
    I create multilingual project using a template and the move from 2022 to 2024 means my old XML 1 filter is obsolete and does not show in Trados 2024 so the project defaulted to the XML 2 filter. Just realized this now...
    I've adjusted the XML 2 filter and everything is back to normal now...
    Many thanks for your assistance with this. 



    emoji