Skip to content

Commit 74031c5

Browse files
committed
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 (closes symfony#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
2 parents a4cce1e + 079ff73 commit 74031c5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

translation/message_format.rst

+5
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ The basic usage of the MessageFormat allows you to use placeholders (called
7070
'say_hello' => "Hello {name}!",
7171
];
7272
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+
7378
Everything within the curly braces (``{...}``) is processed by the formatter
7479
and replaced by its placeholder::
7580

0 commit comments

Comments
 (0)