Variables injection and curly braces syntax

Hi, I’m new with transifex and I noticed that when I do a translation of a string, the original string is replaced by the translated one in the HTML code when I switch language.

The problem is that I have several strings that are injected from javascript through curly braces syntax:

<p>{{ content.text }}</p>

In the html code, this syntax is indistinguishable from a simple paragraph with text. However, replacing it with a plain text, especially if different from the original, may break the logic of the application.

Is there a way either to translate a string without changing the html file in the browser or to translate the content.text variable in the javascript file instead of the html one?

Thanks.

Hello,

Thank you for reaching out to Transifex.

Could you please share a URL of your Transifex resource with such an example that I can understand better your question?

Thank you.

Kind regards,
Panagiotis

Hi Panagiotis,
I recorded my screen because the error happen when logged in already.
You can replicate it if you’re willing to register and start a survey to www.foodbook24.com
Don’t worry, is a university research project to investigate on the Irish food habits.

The error consists in a silent error: when you try to add a food to your meal, if the selected language is English, it go through with no issue but if it is another language it won’t work. The request is not even sent in the network tab.

https://drive.google.com/file/d/1_ocKzLuUUDg60Y1tR1eqBpI2z71fhLg3/view?usp=sharing

Thank you @fabiom91 for the quick reply and for the video-recording, but what I actually need to understand the issue you mentioned in your first post, is a URL from your Transifex project, including an example of a translated string with HTML code.

Thank you in advance.,

Kind regards,
Panagiotis