Hi there,
I am using SDL Trados Studio 2019 SR2 in order to prepare some json files.
Below you can find an example of the sort of json strings I am dealing with:
{
"banner": {
"message": "Try again in a few minutes. If you keep seeing this message, contact <a title="Support Team" href="{url}">Support Team</a>."
},
"resultsPerPage": "{typeOfResult} per page"
}
As you can see above, there are cases of both embedded HTML (an anchor tag, including an interpolated url) and interpolation ({typeOfResult}).
I can use the embedded content HTML processor to process the embedded HTML but the interpolated variables are parsed as plain text and not protected. If I use the plaintext content processor and define the rules for capturing interpolated variables with regexp, then the embedded html is not processed (and I rather avoid using regexp for that because of translatable attributes like title or alt).
Any suggestions on how to successfully parsed this sort of json files so both the embedded HTML and the interpolated variables are protected?
Thanks!
Translate
