-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
When translating long strings that can be pluralized, splitting the parts often improves readability (and compliance with maximum line length code style rules):
$translator->trans(
'There must be at least one lower case letter.|'.
'There must be at least %count% lower case letter.',
['%count%' => $constraint->getMin()]
);
instead of
$translator->trans(
'There must be at least one lower case letter.|There must be at least %count% lower case letter.',
['%count%' => $constraint->getMin()]
);
The ContainerAwareTrans and ContainerAwareTransChoice extractors (I have not tested the others) do not recognize the string concatenation, but sets the message to null
in the extracted translations.
Metadata
Metadata
Assignees
Labels
No labels