File tree Expand file tree Collapse file tree 1 file changed +0
-5
lines changed
setup/src/Magento/Setup/Module/I18n/Parser/Adapter Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,11 @@ class Xml extends AbstractAdapter
21
21
protected function _parse ()
22
22
{
23
23
foreach ($ this ->_getNodes ($ this ->_file ) as $ key => $ element ) {
24
-
25
24
if (!$ element instanceof \SimpleXMLElement) {
26
25
continue ;
27
26
}
28
27
29
28
$ attributes = $ element ->attributes ();
30
-
31
29
if ((string )$ attributes ['translate ' ] === 'true ' || (string )$ attributes ['translatable ' ] === 'true ' ) {
32
30
$ this ->_addPhrase ((string )$ element );
33
31
} elseif ($ key === 'title ' ) {
@@ -49,17 +47,14 @@ protected function _getNodes($file)
49
47
libxml_use_internal_errors (true );
50
48
$ xml = simplexml_load_file ($ file );
51
49
libxml_use_internal_errors (false );
52
-
53
50
if ($ xml ) {
54
51
$ nodes = $ xml ->xpath ('//*[@translate|@translatable] ' );
55
-
56
52
/* To add title of all xml files in translation csv */
57
53
if ($ xml ->head ) {
58
54
$ nodes ['title ' ] = $ xml ->head ;
59
55
}
60
56
61
57
unset($ xml );
62
-
63
58
return is_array ($ nodes ) ? $ nodes : [];
64
59
}
65
60
You can’t perform that action at this time.
0 commit comments