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
fixed test
  • Loading branch information
azine committed Jun 8, 2015
commit b9a01563fc8e1794c1cbcf59d48b633d2fb9687e
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,15 @@ public function getChooseTests()
array('There are no apples', '{0.0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0),

// Test texts with new-lines
array('This is text with a
new-line in it. Selector = 0.', '{0}This is a text with a
array('This is text with a\n new-line in it. Selector = 0.', '{0}This is a text with a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\n is not evaluated when using single-quoted strings (see the failing tests).

new-line in it. Selector = 0.|{1}This is a text with a
new-line in it. Selector = 1.|[1,Inf]This is a text with a
new-line in it. Selector > 1.', 0),
array('This is text with a
new-line in it. Selector = 1.', '{0}This is a text with a
array('This is text with a\n new-line in it. Selector = 1.', '{0}This is a text with a
new-line in it. Selector = 0.|{1}This is a text with a
new-line in it. Selector = 1.|[1,Inf]This is a text with a
new-line in it. Selector > 1.', 1),
array('This is text with a
new-line in it. Selector > 1.', '{0}This is a text with a
array('This is text with a\n new-line in it. Selector > 1.', '{0}This is a text with a
new-line in it. Selector = 0.|{1}This is a text with a
new-line in it. Selector = 1.|[1,Inf]This is a text with a
new-line in it. Selector > 1.', 5),
Expand Down
0