Skip to content

Commit ed526a2

Browse files
author
Cari Spruiell
committed
Merge remote-tracking branch 'remotes/api/MAGETWO-43683-Magento-2-Translation-Tools-Does-Not-Allow-To-Translate-Magento' into API-Bug-Branch
2 parents 0da266e + 04de8c2 commit ed526a2

File tree

4 files changed

+6
-15
lines changed

4 files changed

+6
-15
lines changed

dev/tests/integration/testsuite/Magento/Setup/Module/I18n/Dictionary/_files/expected/with_context.csv

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
Helper,Helper,module,Magento_FirstModule
2-
Model,Model,module,"Magento_FirstModule,Magento_SecondModule"
2+
Model,Model,module,Magento_FirstModule
33
"Module template","Module template",module,Magento_FirstModule
4+
Model,Model,module,Magento_SecondModule
45
"Theme template","Theme template",theme,adminhtml/default/backend
56
"Module js","Module js",module,Magento_FirstModule
6-
"Lib js","Lib js",lib,"lib/web/mage/file.js,lib/web/varien/file.js"
7+
"Lib js","Lib js",lib,lib/web/mage/file.js
8+
"Lib js","Lib js",lib,lib/web/varien/file.js
79
"Module layout label","Module layout label",module,Magento_FirstModule
810
"Module layout title","Module layout title",module,Magento_FirstModule
911
"Theme layout label","Theme layout label",theme,adminhtml/default/backend

setup/src/Magento/Setup/Module/I18n/Locale.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ class Locale
3030
*/
3131
public function __construct($locale)
3232
{
33-
if ($locale == self::DEFAULT_SYSTEM_LOCALE) {
34-
throw new \InvalidArgumentException('Target locale is system default locale.');
35-
} elseif (!preg_match('/[a-z]{2}_[A-Z]{2}/', $locale)) {
33+
if (!preg_match('/[a-z]{2}_[A-Z]{2}/', $locale)) {
3634
throw new \InvalidArgumentException('Target locale must match the following format: "aa_AA".');
3735
}
3836
$this->_locale = $locale;

setup/src/Magento/Setup/Module/I18n/Parser/Contextual.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected function _parseByTypeOptions($options)
6363
*/
6464
protected function _addPhrase($phraseData, $contextType, $contextValue)
6565
{
66-
$phraseKey = $contextType . stripslashes($phraseData['phrase']);
66+
$phraseKey = $contextType . $contextValue. stripslashes($phraseData['phrase']);
6767

6868
if (isset($this->_phrases[$phraseKey])) {
6969
/** @var \Magento\Setup\Module\I18n\Dictionary\Phrase $phrase */

setup/src/Magento/Setup/Test/Unit/Module/I18n/LocaleTest.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@
99

1010
class LocaleTest extends \PHPUnit_Framework_TestCase
1111
{
12-
/**
13-
* @expectedException \InvalidArgumentException
14-
* @expectedExceptionMessage Target locale is system default locale.
15-
*/
16-
public function testLocaleIsSystemDefaultLocaleException()
17-
{
18-
new Locale('en_US');
19-
}
20-
2112
/**
2213
* @expectedException \InvalidArgumentException
2314
* @expectedExceptionMessage Target locale must match the following format: "aa_AA".

0 commit comments

Comments
 (0)