File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
app/code/Magento/Translation Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -72,8 +72,8 @@ public function getTranslationFilePath()
72
72
/**
73
73
* @return string
74
74
*/
75
- public function getTranslationFileFullPath ()
75
+ public function getTranslationFileVersion ()
76
76
{
77
- return $ this ->fileManager ->getTranslationFileFullPath ();
77
+ return $ this ->fileManager ->getTranslationFileVersion ();
78
78
}
79
79
}
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ public function getTranslationFileTimestamp()
73
73
/**
74
74
* @return string
75
75
*/
76
- public function getTranslationFileFullPath ()
76
+ protected function getTranslationFileFullPath ()
77
77
{
78
78
return $ this ->directoryList ->getPath (DirectoryList::STATIC_VIEW ) .
79
79
\DIRECTORY_SEPARATOR .
@@ -104,4 +104,12 @@ public function updateTranslationFileContent($content)
104
104
}
105
105
$ this ->driverFile ->filePutContents ($ this ->getTranslationFileFullPath (), $ content );
106
106
}
107
+
108
+ /**
109
+ * @return string
110
+ */
111
+ public function getTranslationFileVersion ()
112
+ {
113
+ return sha1 ($ this ->getTranslationFileTimestamp () . $ this ->getTranslationFilePath ());
114
+ }
107
115
}
Original file line number Diff line number Diff line change 26
26
$.initNamespaceStorage('mage-translation-file-version');
27
27
versionObj = $.localStorage.get('mage-translation-file-version');
28
28
29
- <?php $ version = sha1 ( sha1_file ( $ block ->getTranslationFileFullPath ()) . $ block -> getTranslationFilePath () ); ?>
29
+ <?php $ version = $ block ->getTranslationFileVersion ( ); ?>
30
30
31
31
if (versionObj.version !== '<?= /* @noEscape */ $ version ?> ') {
32
32
dependencies.push(
You can’t perform that action at this time.
0 commit comments