How can I exclude {text_like_this} in HTML?

I frequently have snippets of HTML code that require translation. These snippets contain {text_like_this} which is going to be replaced by the executing code before the HTML is served. These placeholders are not to be translated, and I want to protect them, if at all possible without resorting to add-ons, just using the file types. Placeholders can appear anywhere, even in attribute values such as <a href="{URL_here}">

To my surprise, I did not manage to achieve this using the HTML file type in Studio 2021. I attached a sample file.

<div>
<p>Sender: {sender_name}, {sender_email}</p>
<p>Message: {your_message}</p>
<p>Message: <strong>{another_message}</strong></p>
</div>

8311.sample.zip

emoji
Parents Reply
  •   

    Kind of. Not all instances are in paragraphs. Sorry, my sample file was lacking in this respect. Some elements can't be in paragraphs, like lists etc.

    What I have is this:

    Screenshot of Trados Studio showing Segment 9 with text 'cart_contents' outside of paragraph tags, indicating a potential formatting issue.

    Segement 9 is just in a div, the whole HTML code is not exemplary, but even with perfect HTML you can encounter text outside of paragraphs. What I was looking for is a catch-all solution, not one where I have to add and add and add... I do this when I have this code as HTML embedded in XML, I can catch them all with one line. That's what I was looking for here.

    Daniel

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 9:03 AM (GMT 0) on 29 Feb 2024]
Children