Skip to content

Incorrect translation with HTML tags and string interpolation around dynamic variables #66

@Guigeek973

Description

@Guigeek973

Hello again :) Sorry if i bother/spam you ^^

I've catched another issue :

Description:
I'm experiencing an issue with the translation plugin in my Angular app. When translating a string containing HTML tags and dynamic variables (e.g., {{min}} and {{max}}), the translation adds extra curly braces.

Example:
Original string:
"modules.teleconsultation-assistee.minAndMax": "<strong>{{min}}</strong> and <strong>{{max}}</strong>"

Incorrect translation:
"modules.teleconsultation-assistee.minAndMax": "<strong>{{min}}</strong>} and <strong>{{max}}}</strong>}"

Issue:
The translation seems correct at first, but extra } characters are added around the dynamic variables ({{min}} and {{max}}).

This may be caused by the plugin not properly handling dynamic variables inside HTML tags.
The documentation mentions it supports HTML, but it looks like the presence of {{}} inside HTML elements might be causing the issue.

Expected behavior:
The translated string should keep the correct syntax without extra curly braces, like:

"modules.teleconsultation-assistee.minAndMax": "<strong>{{min}}</strong> and <strong>{{max}}</strong>"

Suggestion:
Maybe check how the plugin handles dynamic variables inside HTML tags and ensure it doesn’t add unnecessary characters.

Thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions