Skip to content

Commit

Permalink
Fixed error message for duplicates phrases not allowed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ctubio committed Apr 19, 2015
1 parent e64f88b commit c212b35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dev/tools/Magento/Tools/I18n/Pack/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ protected function createDuplicatesPhrasesError($duplicates)
/** @var \Magento\Tools\I18n\Dictionary\Phrase $phrase */
$phrase = $phrases[0];
$error .= sprintf(
"The phrase \"%s\" is translated differently in %d places.\n",
"The phrase \"%s\" is translated in %d places.\n",
$phrase->getPhrase(),
count($phrases)
);
Expand Down
4 changes: 2 additions & 2 deletions dev/tools/Magento/Tools/I18n/Test/Unit/Pack/GeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ public function testGenerateEmptyFile()
public function testGenerateWithNotAllowedDuplicatesAndDuplicatesExist()
{
$error = "Duplicated translation is found, but it is not allowed.\n"
. "The phrase \"phrase1\" is translated differently in 1 places.\n"
. "The phrase \"phrase2\" is translated differently in 1 places.\n";
. "The phrase \"phrase1\" is translated in 1 places.\n"
. "The phrase \"phrase2\" is translated in 1 places.\n";
$this->setExpectedException('\RuntimeException', $error);

$allowDuplicates = false;
Expand Down

0 comments on commit c212b35

Please sign in to comment.