30 private $directoryList;
40 private $translationFile;
49 \
Magento\Framework\View\Asset\Repository $assetRepo,
51 \
Magento\Framework\Filesystem\Driver\File $driverFile,
52 \
Magento\Translation\Model\
Inline\File $translationFile =
null 54 $this->assetRepo = $assetRepo;
55 $this->directoryList = $directoryList;
56 $this->driverFile = $driverFile;
67 return $this->assetRepo->createArbitrary(
81 if ($this->driverFile->isExists($translationFilePath)) {
82 $statArray = $this->driverFile->stat($translationFilePath);
83 if (array_key_exists(
'mtime', $statArray)) {
84 return $statArray[
'mtime'];
95 \DIRECTORY_SEPARATOR .
96 $this->assetRepo->getStaticViewFileContext()->getPath() .
97 \DIRECTORY_SEPARATOR .
106 return $this->assetRepo->getStaticViewFileContext()->getPath();
116 \DIRECTORY_SEPARATOR .
117 $this->assetRepo->getStaticViewFileContext()->getPath();
118 if (!$this->driverFile->isExists($this->getTranslationFileFullPath())) {
119 $this->driverFile->createDirectory($translationDir);
132 $translationFileHash =
'';
134 if ($this->driverFile->isExists($translationFile)) {
135 $translationFileHash = sha1_file($translationFile);
getTranslationFileVersion()
getTranslationFileFullPath()
__construct(\Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\App\Filesystem\DirectoryList $directoryList, \Magento\Framework\Filesystem\Driver\File $driverFile, \Magento\Translation\Model\Inline\File $translationFile=null)
updateTranslationFileContent($content)
getTranslationFileTimestamp()
createTranslateConfigAsset()
const DICTIONARY_FILE_NAME
const TRANSLATION_CONFIG_FILE_NAME