Retrieves information about a translation job.
Services based translators with remote states should place a Poll button here to sync the job state.
\Drupal\tmgmt\JobInterface $job: The translation job.
Overrides TranslatorPluginUiBase::checkoutInfo
public function checkoutInfo(JobInterface $job) {
$tuid = $job
->getSetting('translator');
if ($tuid && ($translator = User::load($tuid))) {
$form['job_status'] = array(
'#type' => 'item',
'#title' => t('Job status'),
'#markup' => t('Translation job is assigned to %name.', array(
'%name' => $translator
->getDisplayName(),
)),
);
}
else {
$form['job_status'] = array(
'#type' => 'item',
'#title' => t('Job status'),
'#markup' => t('Translation job is not assigned to any user.'),
);
}
if ($job
->getSetting('job_comment')) {
$form['job_comment'] = array(
'#type' => 'item',
'#title' => t('Job comment'),
'#markup' => Xss::filter($job
->getSetting('job_comment')),
);
}
return $form;
}