The Trados cloud platform will be undergoing maintenance on Saturday, 9th May 2026 between 05:00 to 17:00 UTC. During this time, you will not be able to log in to the Trados platform.

Custom XML filetype adds unexpected spacing in target files

Hi,

I created a custom XML filetype to manage a fileformat. The filetype works perfectly fine in input:

  1. it correctly recognizes the file structure
  2. it correctly extracts translatable content
  3. it correctly converts entities into placeholder
  4. it generates the target file (here comes the issue)

I imported it in the app the file came from to find that some of the text went missing. Comparing the source and target xmls I found out that Trados Studio add some spacing into closing tags that compromises the import.

Here you can see a comparison:

Side-by-side comparison of XML code in Trados Studio. Left side shows original code with green boxes highlighting closing tags and pink boxes around source text. Right side shows target text in pink boxes and additional spaces in red boxes.

On the left you can see:

original closing marked in green boxes

source text in pink box

On the right:

The proper target text in pink box

Some weird additional spaces in red boxes

NOTE: the affected character are not extracted as translatable content! Even using the "show all content" filter they are not visible to the user

I manually removed them, and it worked! I checked the filetype settings, and apparently none of the settings is related with spacing but "Whitespaces" options, which I didn't edit:

Screenshot of Trados Studio Project Settings dialog showing 'Whitespaces' options under 'File Types'. Options for 'Whitespace in content' and 'Whitespace in tags' are visible.

I also checked the "Writer" options, since this is definitely something "written" in the target files:

Screenshot of Trados Studio Project Settings dialog showing 'Writer' options under 'File Types'. Options for 'Unicode UTF-8 byte order mark (BOM)' and 'xml:lang attribute values' are visible.

For the time being, I'm batch finding and replacing this usign a tool, but it would be definitely better to have this fixed.



Generated Image Alt-Text
[edited by: RWS Community AI at 8:18 AM (GMT 0) on 15 Nov 2024]
emoji