8000 Allow new lines in Messages translated with transchoice() (replacement for #14867) by azine · Pull Request #14897 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Allow new lines in Messages translated with transchoice() (replacement for #14867) #14897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
allow new-lines in messages with pluralization
  • Loading branch information
azine committed Jun 6, 2015
commit 7ac273247f90e71dedac46f1d2fcae4ca5904d38
2 changes: 1 addition & 1 deletion src/Symfony/Component/Translation/MessageSelector.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function choose($message, $number, $locale)
foreach ($parts as $part) {
$part = trim($part);

if (preg_match('/^(?P<interval>'.Interval::getIntervalRegexp().')\s*(?P<message>.*?)$/x', $part, $matches)) {
if (preg_match('/^(?P<interval>'.Interval::getIntervalRegexp().')\s*(?P<message>.*?)$/xs', $part, $matches)) {
$explicitRules[$matches['interval']] = $matches['message'];
} elseif (preg_match('/^\w+\:\s*(.*?)$/', $part, $matches)) {
$standardRules[] = $matches[1];
Expand Down
0