+ /** @var \Drupal\Core\Entity\ContentEntityForm $form_object */
+ $form_object = $form_state->getFormObject();
+ /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
+ $entity = $form_object->getEntity();
+ $display_translatability_clue = !$entity->isDefaultTranslationAffectedOnly();
+ $hide_untranslatable_fields = $entity->isDefaultTranslationAffectedOnly() && !$entity->isDefaultTranslation();
+ $translation_form = $form_state->get(['content_translation', 'translation_form']);
+ $display_warning = FALSE;
+
+ // We use field definitions to identify untranslatable field widgets to be
+ // hidden. Fields that are not involved in translation changes checks should
+ // not be affected by this logic (the "revision_log" field, for instance).
+ $field_definitions = array_diff_key($entity->getFieldDefinitions(), array_flip($this->getFieldsToSkipFromTranslationChangesCheck($entity)));
+