From fc61af29d693430c7718d15d68e218c347264d97 Mon Sep 17 00:00:00 2001 From: koenner01 Date: Mon, 27 Feb 2017 14:50:43 +0100 Subject: [PATCH 1/3] Update Dictionary.php --- lib/internal/Magento/Framework/App/Language/Dictionary.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/App/Language/Dictionary.php b/lib/internal/Magento/Framework/App/Language/Dictionary.php index 564299b5ab528..cd87f422b6e03 100644 --- a/lib/internal/Magento/Framework/App/Language/Dictionary.php +++ b/lib/internal/Magento/Framework/App/Language/Dictionary.php @@ -140,9 +140,10 @@ private function collectInheritedPacks($languageConfig, &$result, $level = 0, ar 'language' => $languageConfig, 'key' => $packKey, ]; - foreach ($languageConfig->getUses() as $reuse) { + foreach ($languageConfig->getUses() as $index => $reuse) { if (isset($this->packList[$reuse['vendor']][$reuse['package']])) { $parentLanguageConfig = $this->packList[$reuse['vendor']][$reuse['package']]; + $parentLanguageConfig->setSortOrder($index); $this->collectInheritedPacks($parentLanguageConfig, $result, $level + 1, $visitedPacks); } } From 3b7ca5e61bdd65ef547b3ef361f837a3710fe29b Mon Sep 17 00:00:00 2001 From: koenner01 Date: Mon, 27 Feb 2017 14:51:25 +0100 Subject: [PATCH 2/3] Update Config.php --- lib/internal/Magento/Framework/App/Language/Config.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/internal/Magento/Framework/App/Language/Config.php b/lib/internal/Magento/Framework/App/Language/Config.php index 20f70bd48c89c..c5debea96c986 100644 --- a/lib/internal/Magento/Framework/App/Language/Config.php +++ b/lib/internal/Magento/Framework/App/Language/Config.php @@ -141,4 +141,14 @@ public function getUses() { return $this->_data['use']; } + + /** + * Set sort order + * + * @param string|int $value + */ + public function setSortOrder($value) + { + $this->_data['sort_order'] = $value; + } } From ea407adcfd7364993dd6bed587bf7a398ff6e522 Mon Sep 17 00:00:00 2001 From: koenner01 Date: Mon, 27 Feb 2017 16:15:28 +0100 Subject: [PATCH 3/3] Added missing return for static unit test --- lib/internal/Magento/Framework/App/Language/Config.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/internal/Magento/Framework/App/Language/Config.php b/lib/internal/Magento/Framework/App/Language/Config.php index c5debea96c986..3626d5696fa27 100644 --- a/lib/internal/Magento/Framework/App/Language/Config.php +++ b/lib/internal/Magento/Framework/App/Language/Config.php @@ -146,6 +146,7 @@ public function getUses() * Set sort order * * @param string|int $value + * @return void */ public function setSortOrder($value) {