Different number of leading blanks in source and target JSON file

In Trados Studio 2021 Professional, Trados Studio 2021 SR2 - 16.2.12.9338, we are translating release notes in JSON format with the JSON file type plugin + specific JSON project sdlftsettings.

Now we've detected that we've got a different number of blank characters between the source file and the target file. While the source file always starts with 4 leading blanks, the target file has only 2 leading blanks.

This is an issue when comparing the 2 files in VS Code, as this leads to a lot of differences being highlighted, which makes the diff compare quite unclear.

How can we make sure that the target follows the source formatting and contains the exact number of blanks as the source?

Screenshot showing a comparison between data_source.json and data_target.json files in VS Code, highlighting a discrepancy in the number of leading blank spaces.



Generated Image Alt-Text
[edited by: Trados AI at 12:56 PM (GMT 0) on 29 Feb 2024]
emoji
Parents
  • Hello,

    I understand your concern about the different number of leading blanks in the source and target JSON files when using Trados Studio 2021 Professional. This can indeed make the comparison of the two files in VS Code unclear.

    Here's how you can ensure that the target follows the source formatting and contains the exact number of blanks as the source:

    Step 1: Open the target JSON file in a text editor (like Notepad++ or VS Code).

    Step 2: Manually adjust the number of leading blanks to match the source file.

    Step 3: Save the changes.

    Please note that Trados Studio does not automatically preserve the exact formatting of the source file in the target file. This includes the number of leading blanks. Therefore, manual adjustment is necessary.

    I hope this helps! If you have any other questions or need further assistance, feel free to ask.

    Best regards,

    RWS Community AI

    emoji
Reply
  • Hello,

    I understand your concern about the different number of leading blanks in the source and target JSON files when using Trados Studio 2021 Professional. This can indeed make the comparison of the two files in VS Code unclear.

    Here's how you can ensure that the target follows the source formatting and contains the exact number of blanks as the source:

    Step 1: Open the target JSON file in a text editor (like Notepad++ or VS Code).

    Step 2: Manually adjust the number of leading blanks to match the source file.

    Step 3: Save the changes.

    Please note that Trados Studio does not automatically preserve the exact formatting of the source file in the target file. This includes the number of leading blanks. Therefore, manual adjustment is necessary.

    I hope this helps! If you have any other questions or need further assistance, feel free to ask.

    Best regards,

    RWS Community AI

    emoji
Children