protected function LingotekConfigManagementForm::getSourceStatusText in Lingotek Translation 3.0.x
Same name and namespace in other branches
- 8 src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getSourceStatusText()
- 8.2 src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getSourceStatusText()
- 4.0.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getSourceStatusText()
- 3.1.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getSourceStatusText()
- 3.2.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getSourceStatusText()
- 3.3.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getSourceStatusText()
- 3.4.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getSourceStatusText()
- 3.5.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getSourceStatusText()
- 3.6.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getSourceStatusText()
- 3.7.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getSourceStatusText()
- 3.8.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getSourceStatusText()
1 call to LingotekConfigManagementForm::getSourceStatusText()
- LingotekConfigManagementForm::getSourceStatus in src/
Form/ LingotekConfigManagementForm.php - Gets the source status of an config in a format ready to display.
File
- src/
Form/ LingotekConfigManagementForm.php, line 1386
Class
- LingotekConfigManagementForm
- Form for bulk management of content.
Namespace
Drupal\lingotek\FormCode
protected function getSourceStatusText(ConfigMapperInterface $mapper, $status) {
$is_config_entity = $mapper instanceof ConfigEntityMapper;
$entity = $is_config_entity ? $mapper
->getEntity() : NULL;
switch ($status) {
case Lingotek::STATUS_UNTRACKED:
case Lingotek::STATUS_REQUEST:
return $this
->t('Upload');
case Lingotek::STATUS_DISABLED:
return $this
->t('Disabled, cannot request translation');
case Lingotek::STATUS_EDITED:
return $is_config_entity ? $this->translationService
->getDocumentId($entity) : $this->translationService
->getConfigDocumentId($mapper) ? $this
->t('Re-upload (content has changed since last upload)') : $this
->t('Upload');
case Lingotek::STATUS_IMPORTING:
return $this
->t('Source importing');
case Lingotek::STATUS_CURRENT:
return $this
->t('Source uploaded');
case Lingotek::STATUS_ERROR:
return $this
->t('Error');
case Lingotek::STATUS_CANCELLED:
return $this
->t('Cancelled by user');
default:
return ucfirst(strtolower($status));
}
}