How do I get Trados Studio 2019 to extract text between <p> and </p> in JSON file?

Here is an example of how my Studio is parsing a JSON file:

Screenshot of Trados Studio parsing a JSON file with embedded HTML content. Text is cluttered with HTML tags like 'p' and 'a href', making it difficult to read.

Is there a way to get Trados to display the text more cleanly so that it's easier to work with, such as extracting between '<p>' and '</p>'?

I'm using SDL Trados Studio 2019.



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

    Is there a way to get Trados to display the text more cleanly so that it's easier to work with, such as extracting between '<p>' and '</p>'?

    Probably. Use the embedded content settings in the filetype options for the JSON filetype.

    If you provide a sample of the actual JSON file itself that contains this data then you're more likely to get a better answer.  But here's one I made up based on your apparent content... a bit tricky to know exactly, but this should give you the idea:

    {
      "response_info": {
        "language_support": "<p>Our team is able to respond to your questions, comments, or concerns in both English and Spanish.</p><p><strong>When contacting us, please include:</strong></p><ul><li>the web address, also known as a URL.</li></ul><p>A typical URL example could be <a href=\"example.gov/.../a> or <a href=\"www.example.gov/.../p><ul><li>The device and browser you are using to access vote.gov</li><li>The assistive technology you are using, if any</li><li>A description of the problem and any information that isn’t accessible</li></ul><p>Note: We monitor <a href=\"mailto:Section508-vote@gsa.gov\">Section508-vote@gsa.gov</a> during normal business hours Monday through Friday Eastern Time except for federal holidays or closures. For additional accessibility help, fill out the form above in either English or Spanish. For questions, comments, or formal complaints about the accessibility of any vote.gov content, email <a href=\"mailto:Section508-vote@gsa.gov\">Section508-vote@gsa.gov</a>.</p><p>Page reviewed and updated July 2023.</p>"
      }
    }

    If I open with default JSON filetype settings I get this:

    Screenshot of JSON preview in Trados Studio with unprocessed embedded HTML content, showing cluttered text with HTML tags.

    If I use this setting for embedded content:

    Screenshot of Trados Studio options menu highlighting 'Embedded Content' settings for processing HTML content in JSON files.

    Then I get this:

    Screenshot of JSON preview in Trados Studio with processed embedded HTML content, displaying clean and readable text without HTML tags.

    Which I reckon is what you're after.

    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


    Generated Image Alt-Text
    [edited by: Trados AI at 6:10 PM (GMT 0) on 23 Feb 2024]
  • Thanks a million, Paul. This was exactly the function I was looking for.

    emoji
Reply Children
No Data