6
6
namespace Magento \Test \Integrity \App \Language ;
7
7
8
8
use Magento \Framework \App \Utility \Files ;
9
- use Magento \Setup \Module \I18n ;
10
- use Magento \Setup \Module \I18n \Pack \Writer ;
11
9
use Magento \Setup \Module \I18n \Dictionary \Options \ResolverFactory ;
10
+ use Magento \Setup \Module \I18n \Locale ;
11
+ use Magento \Setup \Module \I18n \Pack \Writer \File \Csv ;
12
12
13
13
/**
14
14
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -80,7 +80,7 @@ protected function buildFilePath($phrase, $context)
80
80
{
81
81
$ path = $ this ->getContext ()->buildPathToLocaleDirectoryByContext ($ phrase ->getContextType (), $ context );
82
82
$ sourcePath = Files::init ()->getPathToSource ();
83
- return $ sourcePath . '/ ' . $ path . I18n \ Locale::DEFAULT_SYSTEM_LOCALE . '. ' . Writer \ File \ Csv::FILE_EXTENSION ;
83
+ return $ sourcePath . '/ ' . $ path . Locale::DEFAULT_SYSTEM_LOCALE . '. ' . Csv::FILE_EXTENSION ;
84
84
}
85
85
86
86
/**
@@ -89,7 +89,7 @@ protected function buildFilePath($phrase, $context)
89
89
protected function getContext ()
90
90
{
91
91
if ($ this ->context === null ) {
92
- $ this ->context = new I18n \Context ();
92
+ $ this ->context = new \ Magento \ Setup \ Module \ I18n \Context ();
93
93
}
94
94
return $ this ->context ;
95
95
}
@@ -99,19 +99,23 @@ protected function getContext()
99
99
*/
100
100
protected function prepareParser ()
101
101
{
102
- $ filesCollector = new I18n \FilesCollector ();
102
+ $ filesCollector = new \ Magento \ Setup \ Module \ I18n \FilesCollector ();
103
103
104
- $ phraseCollector = new I18n \Parser \Adapter \Php \Tokenizer \PhraseCollector (
105
- new I18n \Parser \Adapter \Php \Tokenizer ()
104
+ $ phraseCollector = new \ Magento \ Setup \ Module \ I18n \Parser \Adapter \Php \Tokenizer \PhraseCollector (
105
+ new \ Magento \ Setup \ Module \ I18n \Parser \Adapter \Php \Tokenizer ()
106
106
);
107
107
$ adapters = [
108
- 'php ' => new I18n \Parser \Adapter \Php ($ phraseCollector ),
109
- 'js ' => new I18n \Parser \Adapter \Js (),
110
- 'xml ' => new I18n \Parser \Adapter \Xml (),
111
- 'html ' => new I18n \Parser \Adapter \Html (),
108
+ 'php ' => new \ Magento \ Setup \ Module \ I18n \Parser \Adapter \Php ($ phraseCollector ),
109
+ 'js ' => new \ Magento \ Setup \ Module \ I18n \Parser \Adapter \Js (),
110
+ 'xml ' => new \ Magento \ Setup \ Module \ I18n \Parser \Adapter \Xml (),
111
+ 'html ' => new \ Magento \ Setup \ Module \ I18n \Parser \Adapter \Html (),
112
112
];
113
113
114
- $ parserContextual = new I18n \Parser \Contextual ($ filesCollector , new I18n \Factory (), new I18n \Context ());
114
+ $ parserContextual = new \Magento \Setup \Module \I18n \Parser \Contextual (
115
+ $ filesCollector ,
116
+ new \Magento \Setup \Module \I18n \Factory (),
117
+ new \Magento \Setup \Module \I18n \Context ()
118
+ );
115
119
foreach ($ adapters as $ type => $ adapter ) {
116
120
$ parserContextual ->addAdapter ($ type , $ adapter );
117
121
}
0 commit comments