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
minor symfony#12949 [Translation] Added tip about the incompatibility of % character (welcoMattic)
This PR was submitted for the master branch but it was squashed and merged into the 4.3 branch instead (closessymfony#12949).
Discussion
----------
[Translation] Added tip about the incompatibility of % character
With the ICU MessageFormat syntax, the character `%` is not valid anymore in parameter keys. It throws a `U_PATTERN_SYNTAX_ERROR` exception
This fix must be backported on all versions from 4.2 included, since the introduction of IntlMessageFormatter
<!--
If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/roadmap for the list of maintained branches).
If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `master` for features of unreleased versions).
-->
Commits
-------
079ff73 [Translation] Added tip about the incompatibility of % character
Copy file name to clipboardExpand all lines: translation/message_format.rst
+5
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,11 @@ The basic usage of the MessageFormat allows you to use placeholders (called
70
70
'say_hello' => "Hello {name}!",
71
71
];
72
72
73
+
74
+
.. caution::
75
+
76
+
With the previous format, placeholders were often named between ``%``. This character is no longer valid with the ICU MessageFormat syntax. Be careful to rename your parameters.
77
+
73
78
Everything within the curly braces (``{...}``) is processed by the formatter
0 commit comments