-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
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.