From c212b354803c246d68ae726b8f8999c31f9a2789 Mon Sep 17 00:00:00 2001 From: analpaper Date: Mon, 13 Apr 2015 01:54:01 +0200 Subject: [PATCH] Fixed error message for duplicates phrases not allowed. --- dev/tools/Magento/Tools/I18n/Pack/Generator.php | 2 +- dev/tools/Magento/Tools/I18n/Test/Unit/Pack/GeneratorTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tools/Magento/Tools/I18n/Pack/Generator.php b/dev/tools/Magento/Tools/I18n/Pack/Generator.php index fce8d3d556b94..bc257a637ace6 100644 --- a/dev/tools/Magento/Tools/I18n/Pack/Generator.php +++ b/dev/tools/Magento/Tools/I18n/Pack/Generator.php @@ -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) ); diff --git a/dev/tools/Magento/Tools/I18n/Test/Unit/Pack/GeneratorTest.php b/dev/tools/Magento/Tools/I18n/Test/Unit/Pack/GeneratorTest.php index e5a4f9bd2442c..4ca23c946a99b 100644 --- a/dev/tools/Magento/Tools/I18n/Test/Unit/Pack/GeneratorTest.php +++ b/dev/tools/Magento/Tools/I18n/Test/Unit/Pack/GeneratorTest.php @@ -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;