Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f551f2d

Browse filesBrowse files
committed
Merge branch '4.2'
* 4.2: Fix wrong dump for PO files
2 parents b045aca + 4c3a48a commit f551f2d
Copy full SHA for f551f2d

File tree

Expand file treeCollapse file tree

4 files changed

+7
-4
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+7
-4
lines changed

‎src/Symfony/Component/Translation/Dumper/PoFileDumper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Dumper/PoFileDumper.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function formatCatalogue(MessageCatalogue $messages, $domain, array $opti
4040
$newLine = true;
4141
}
4242
$output .= sprintf('msgid "%s"'."\n", $this->escape($source));
43-
$output .= sprintf('msgstr "%s"', $this->escape($target));
43+
$output .= sprintf('msgstr "%s"'."\n", $this->escape($target));
4444
}
4545

4646
return $output;

‎src/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class PoFileDumperTest extends TestCase
2020
public function testFormatCatalogue()
2121
{
2222
$catalogue = new MessageCatalogue('en');
23-
$catalogue->add(['foo' => 'bar']);
23+
$catalogue->add(['foo' => 'bar', 'bar' => 'foo']);
2424

2525
$dumper = new PoFileDumper();
2626

‎src/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function testLoad()
2323
$resource = __DIR__.'/../fixtures/resources.po';
2424
$catalogue = $loader->load($resource, 'en', 'domain1');
2525

26-
$this->assertEquals(['foo' => 'bar'], $catalogue->all('domain1'));
26+
$this->assertEquals(['foo' => 'bar', 'bar' => 'foo'], $catalogue->all('domain1'));
2727
$this->assertEquals('en', $catalogue->getLocale());
2828
$this->assertEquals([new FileResource($resource)], $catalogue->getResources());
2929
}

‎src/Symfony/Component/Translation/Tests/fixtures/resources.po

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Tests/fixtures/resources.po
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ msgstr ""
55
"Language: en\n"
66

77
msgid "foo"
8-
msgstr "bar"
8+
msgstr "bar"
9+
10+
msgid "bar"
11+
msgstr "foo"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.