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
2121 protected function _parse ()
2222 {
2323 foreach ($ this ->_getNodes ($ this ->_file ) as $ key => $ element ) {
24-
2524 if (!$ element instanceof \SimpleXMLElement) {
2625 continue ;
2726 }
2827
2928 $ attributes = $ element ->attributes ();
30-
3129 if ((string )$ attributes ['translate ' ] === 'true ' || (string )$ attributes ['translatable ' ] === 'true ' ) {
3230 $ this ->_addPhrase ((string )$ element );
3331 } elseif ($ key === 'title ' ) {
@@ -49,17 +47,14 @@ protected function _getNodes($file)
4947 libxml_use_internal_errors (true );
5048 $ xml = simplexml_load_file ($ file );
5149 libxml_use_internal_errors (false );
52-
5350 if ($ xml ) {
5451 $ nodes = $ xml ->xpath ('//*[@translate|@translatable] ' );
55-
5652 /* To add title of all xml files in translation csv */
5753 if ($ xml ->head ) {
5854 $ nodes ['title ' ] = $ xml ->head ;
5955 }
6056
6157 unset($ xml );
62-
6358 return is_array ($ nodes ) ? $ nodes : [];
6459 }
6560
You can’t perform that action at this time.
0 commit comments