public function ContextUploader::isReadyAcceptContext in TMGMT Translator Smartling 8.2
Same name and namespace in other branches
- 8.4 src/Context/ContextUploader.php \Drupal\tmgmt_smartling\Context\ContextUploader::isReadyAcceptContext()
- 8 src/Context/ContextUploader.php \Drupal\tmgmt_smartling\Context\ContextUploader::isReadyAcceptContext()
- 8.3 src/Context/ContextUploader.php \Drupal\tmgmt_smartling\Context\ContextUploader::isReadyAcceptContext()
Parameters
$filename:
Return value
bool
File
- src/
Context/ ContextUploader.php, line 282
Class
Namespace
Drupal\tmgmt_smartling\ContextCode
public function isReadyAcceptContext($filename, $proj_settings) {
try {
$api = $this
->getApi($proj_settings);
$res = $api
->getStatusAllLocales($filename);
if (!$res) {
$this->logger
->warning('File "@filename" is not ready to accept context. Most likely it is being processed by Smartling right now.', [
'@filename' => $filename,
]);
}
return $res;
} catch (Exception $e) {
$this->logger
->warning($e
->getMessage());
return FALSE;
}
}