You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Symfony version(s) affected: Tested on 5.1.3, but most likely in previous versions.
Description
This issue was reported before in #36461 but was closed too early I think. The documentation says in https://symfony.com/doc/current/translation/message_format.html that in ICU format, placeholders should be enclosed in curly braces, and that those will be removed by the translator. But this isn't the case, the curly braces are still there in the resulting message.
How to reproduce
Follow the example in the linked doc.
Possible Solution
Either the docs are right, then this is a bug and the curly braces should be removed. Or the docs need to be adjusted.
edit: I just checked the example from the "Selecting Different Messages Based on a Condition" section. There the curly braces are indeed removed from e.g. female {{organizer_name} has invited you for her party!} (called the translator passing organizer_name, not {organizer_name} and no braces are output). So for consistency (and simplicity) reasons it would be great if curly braces were removed in all cases.
The text was updated successfully, but these errors were encountered:
I don't really understand what this issue is trying to say. Curly braces aren't removed, they are just indicators of different "message scopes" (e.g. the verbatim scope, the variable scope, the action scope, etc). Just like {{ ... }} and {% ... %} in Twig.
What I was trying to say was that I had the same issue as the commenter here: #36461 (comment)
But I just retried and to my surprise the problem vanished. I honestly don't know what changed in the meantime (maybe I used the messages domain before instead of messages+intl-icu - the docs are a bit short on how to use the Translation component without framework bundle).
Sorry for the false alert and thanks for taking time for answering.
Uh oh!
There was an error while loading. Please reload this page.
Symfony version(s) affected: Tested on 5.1.3, but most likely in previous versions.
Description
This issue was reported before in #36461 but was closed too early I think. The documentation says in https://symfony.com/doc/current/translation/message_format.html that in ICU format, placeholders should be enclosed in curly braces, and that those will be removed by the translator. But this isn't the case, the curly braces are still there in the resulting message.
How to reproduce
Follow the example in the linked doc.
Possible Solution
Either the docs are right, then this is a bug and the curly braces should be removed. Or the docs need to be adjusted.
edit: I just checked the example from the "Selecting Different Messages Based on a Condition" section. There the curly braces are indeed removed from e.g.
female {{organizer_name} has invited you for her party!}
(called the translator passingorganizer_name
, not{organizer_name}
and no braces are output). So for consistency (and simplicity) reasons it would be great if curly braces were removed in all cases.The text was updated successfully, but these errors were encountered: