62 $this->archiveFilePath = $progressParams[
'archiveFilePath'];
63 $this->archiveFileType = $progressParams[
'archiveFileType'];
65 $this->totalFileCount = 0;
68 $this->tmpFolder = Translate\IO\Directory::generateTemporalDirectory(
'translate');
69 if (!$this->tmpFolder->isExists() || !$this->tmpFolder->isDirectory())
72 Loc::getMessage(
'TR_ERROR_CREATE_TEMP_FOLDER', [
'#PATH#' => $this->tmpFolder->getPhysicalPath()])
77 $this->tmpFolderPath = $this->tmpFolder->getPhysicalPath();
81 if (!$this->archiveFile->isExists() || !$this->archiveFile->isFile())
87 elseif ($this->archiveFileType !==
'.tar.gz' && $this->archiveFileType !==
'.tar')
94 if ($this->archiveFile->extract($this->tmpFolder) !==
true)
96 if ($this->archiveFile->hasErrors())
98 $this->
addErrors($this->archiveFile->getErrors());
109 $this->totalFileCount = $this->archiveFile->getProcessedFileCount();
113 $this->processToken =
null;
119 'STATUS' => Translate\Controller\STATUS_COMPLETED,
120 'PROCESSED_ITEMS' => $this->totalFileCount,
121 'TOTAL_ITEMS' => $this->totalFileCount,