Carriage return symbols in JSON excluded from Editor view

Hi, 

I'm trying to find a way for my Editor in Trados Studio 2021 to display the following carriage return symbols \n\n and \n as they appear in the JSON file below:

Screenshot of a JSON file with text strings showing carriage return symbols as 'nn' and 'n' in the code.

This is the current view in Trados:

Screenshot of Trados Studio 2021 editor displaying text without carriage return symbols, lines are concatenated.

Please can someone talk me through the settings needed for these to display correctly? 

Many thanks, 

Melanie



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

    In addition to what  mentioned it's worth noting that your file has segmented on these characters so they are hidden between the segments.  You don't need them in the translatable segment as you only need to translate the words.

    When you save your target file these characters will be inserted back into the target file.  If they are not then come back because this would be a problem!  The behaviour you have now would be the preferred behaviour for most people because otherwise you'll have to deal with the tags, and you won't have a properly segmented file for translation.

    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 both, 

    Thanks for your replies! 

    I understand now that they don't need to show in the Editor view - the problem I'm having, however, is that they do not appear in the target file, so I'm guessing there is still some setting that needs to be adjusted somewhere?

    Many thanks

    emoji
  •   

    the problem I'm having, however, is that they do not appear in the target file

    ok - this sounds more like a problem.  So first I tested in this version:

    Trados Studio 2022 - 17.1.8.17828

    I used this file:

    {
      "heading": "dashboard login",
      "2fa-unlock.heading": "account locked",
      "2fa-unlock.content-block-1": "This account has been locked because an incorrect password was entered five times.\n\nSend a code to your email address to unlock the content.\n\nFun Fact: Did you know? The most common passwords are 'password' and '123456'. So if you can't remember yours, just know you're not alone!",
      "2fa-unlock.content-block-2": "We have sent you a 6-digit unlock code. Enter the code below to unlock your account.\n\nSide Story: While you're waiting, here's a little tale. Once upon a time, a squirrel named Timmy forgot the combination to his acorn safe. After several failed attempts, he had to go through 2FA with the forest council to prove he was the real Timmy. Imagine the embarrassment!",
      "funny-story.heading": "The Chronicles of Timmy the Squirrel",
      "funny-story.content-block-1": "Timmy, our hero squirrel, was always known for being a bit forgetful.\n\nOne day, he found himself staring at his acorn safe, scratching his tiny head. His mind was as blank as a piece of paper.",
      "funny-story.content-block-2": "Not one to give up, Timmy set out on a quest to find the Elder Squirrel, who was said to be the wisest in the forest.\n\nAfter dodging cats, avoiding falling leaves, and climbing several trees, Timmy finally found the Elder Squirrel.",
      "funny-story.content-block-3": "The Elder Squirrel chuckled at Timmy's predicament and said, 'The real password, young one, is something you'll never forget: it's the thing you love the most.'",
      "funny-story.content-block-4": "Timmy scampered back to his tree, and as soon as he typed 'acorn' into the safe, it popped open! The day was saved, and he learned a valuable lesson. Timmy now uses 2FA for all his squirrelly dealings, and he never forgot his password again.\n\nThe end."
    }
    

    I pre-translated and saved the target... now I see this:

    {
      "heading": "Dashboard-Anmeldung",
      "2fa-unlock.heading": "Konto gesperrt",
      "2fa-unlock.content-block-1": "Dieses Konto wurde gesperrt, weil fünfmal ein falsches Passwort eingegeben wurde.\n\nSenden Sie einen Code an Ihre E-Mail-Adresse, um den Inhalt freizuschalten.\n\nSpaßfakt: Wussten Sie das? Die gebräuchlichsten Kennwörter sind \"password\" und \"123456\". Wenn Sie sich also nicht mehr an Ihren Namen erinnern können, sind Sie nicht allein!",
      "2fa-unlock.content-block-2": "Wir haben Ihnen einen 6-stelligen Freischaltcode geschickt. Geben Sie den unten stehenden Code ein, um Ihr Konto freizuschalten.\n\nNebengeschichte: Während Sie warten, hören Sie sich eine kleine Geschichte an. Es war einmal ein Eichhörnchen namens Timmy, das die Kombination für seinen Eichelsafe vergessen hatte. Nach mehreren fehlgeschlagenen Versuchen musste er bei der Forstverwaltung ein 2FA-Verfahren durchlaufen, um zu beweisen, dass er der echte Timmy war. Stellen Sie sich die Peinlichkeit vor!",
      "funny-story.heading": "Die Chroniken von Timmy dem Eichhörnchen",
      "funny-story.content-block-1": "Timmy, unser Helden-Eichhörnchen, war schon immer dafür bekannt, dass er ein bisschen vergesslich ist.\n\nEines Tages starrte er auf seinen Eichelsafe und kratzte sich an seinem kleinen Kopf. Seine Gedanken waren so leer wie ein Blatt Papier.",
      "funny-story.content-block-2": "Da Timmy nicht aufgeben wollte, machte er sich auf die Suche nach dem Alten Eichhörnchen, von dem man sagte, es sei das weiseste im Wald.\n\nNachdem er Katzen ausgewichen, herabfallenden Blättern ausgewichen und auf mehrere Bäume geklettert war, fand Timmy schließlich das Ältere Eichhörnchen.",
      "funny-story.content-block-3": "Das ältere Eichhörnchen lachte über Timmys missliche Lage und sagte: \"Das richtige Kennwort, mein Junge, ist etwas, das du nie vergessen wirst: Es ist das, was du am meisten liebst.",
      "funny-story.content-block-4": "Timmy huschte zurück zu seinem Baum, und sobald er 'Eichel' in den Safe eintippte, sprang dieser auf! Der Tag war gerettet, und er hat eine wertvolle Lektion gelernt. Timmy verwendet jetzt 2FA für alle seine Geschäfte, und er hat nie wieder sein Passwort vergessen.\n\nDas Ende."
    }

    All looks good to me.  In the editor it looked like this:

    The image shows a side-by-side comparison of English to German translations in a table format. The left side contains English text, and the right side displays its German counterpart. The content primarily deals with account access issues. Notable lines in English include: "dashboard login", "account locked", "This account has been locked because an incorrect password was entered five times", and "We have sent you a 6-digit unlock code." The German translations for these lines respectively are: "Dashboard-Anmeldung", "Konto gesperrt", "Dieses Konto wurde gesperrt, weil fünfmal ein falsches Passwort eingegeben wurde", and "Wir haben Ihnen einen 6-stelligen Freischaltcode geschickt." There's also a "Fun Fact" segment mentioning the most common passwords.

    So, I don't seem to have a problem.  I used the default JSON and there are no settings required with such a simple file.  The defaults should do.

    So, please confirm which version of Trados Studio you using?

    Which JSON filetype did you use to handle the file?  Maybe you have a plugin?

    Does the file I provided also fail for you?

    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 Paul, 

    Thanks for your reply. 

    I translated your JSON file using your translation and the result in the target file is the same, the characters are not there:

    Screenshot of a JSON file opened in Trados Studio with visible encoding issues, showing HTML character entities like 'ü' instead of the expected characters.

    My version of Trados is Studio 2021. And the JSON file type is just a standard JSON Source File (.json), I don't have any plugins. It must be something in my default settings, the problem is I have no idea where to start changing them. 

    Thanks

    emoji


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

    Maybe make sure this is unchecked, before you create your project?

    A software options window with a list on the left displaying various file formats such as 'Adobe InDesign CS4-CC ICML', 'Adobe Photoshop', 'OpenDocument Text Document', among others. On the right side, there are checkboxes for 'Writer' settings. The options include 'Escape non-ASCII and control characters' (with a red arrow pointing towards it), 'Enable pretty printing in target file', and settings related to 'Unicode UTF-8 byte order mark (BOM)' with options to 'Preserve', 'Add' or 'Remove'.

    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
  •  

    I just tested in 2021 and don't have this problem.  Maybe make sure you have the latest version of 2021?

    Trados Studio 2021 - 16.2.12.9338

    Maybe also check this video... perhaps it'll shed some light on something you're doing that's different to me:

    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 Paul, 

    thanks so much for your explanation and video! I also had a play with the settings and it seems that this was the culprit:

    Trados Studio settings window showing 'Embedded Content' options with 'Process embedded content found in document structure information' checked and 'Embedded Content Plain Text v 1.0.0' selected.

    I must have added this a while back for a previous JSON project and forgotten to remove it. This also solved the issue with the special characters you mentioned, so all good! Slight smile

    Thanks again!

     

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 12:53 PM (GMT 0) on 29 Feb 2024]
Reply Children
No Data