Commit de3558c2 authored by alexpott's avatar alexpott
Browse files

Issue #2024867 by vijaycs85: Rename translation_entity() to content_translation().

parent a9b5c816
......@@ -63,7 +63,7 @@ class EntityType extends Plugin {
* Defaults to \Drupal\Core\Entity\EntityAccessController.
* - translation: The name of the controller class that should be used to
* handle the translation process. The class must implement
* \Drupal\translation_entity\EntityTranslationControllerInterface.
* \Drupal\content_translation\ContentTranslationControllerInterface.
*
* @todo Interfaces from outside \Drupal\Core or \Drupal\Component should not
* be used here.
......@@ -148,7 +148,7 @@ class EntityType extends Plugin {
public $translatable = FALSE;
/**
* @todo translation_entity_entity_info_alter() uses this but it is undocumented.
* @todo content_translation_entity_info_alter() uses this but it is undocumented.
*
* @var array
*/
......
......@@ -8,22 +8,22 @@
namespace Drupal\custom_block;
use Drupal\Core\Entity\EntityInterface;
use Drupal\translation_entity\EntityTranslationControllerNG;
use Drupal\content_translation\ContentTranslationControllerNG;
/**
* Defines the translation controller class for custom blocks.
*/
class CustomBlockTranslationController extends EntityTranslationControllerNG {
class CustomBlockTranslationController extends ContentTranslationControllerNG {
/**
* Overrides EntityTranslationController::getAccess().
* Overrides ContentTranslationController::getAccess().
*/
public function getAccess(EntityInterface $entity, $op) {
return user_access('administer blocks');
}
/**
* Overrides EntityTranslationController::entityFormAlter().
* Overrides ContentTranslationController::entityFormAlter().
*/
public function entityFormAlter(array &$form, array &$form_state, EntityInterface $entity) {
parent::entityFormAlter($form, $form_state, $entity);
......@@ -40,7 +40,7 @@ public function entityFormAlter(array &$form, array &$form_state, EntityInterfac
}
/**
* Overrides EntityTranslationController::entityFormTitle().
* Overrides ContentTranslationController::entityFormTitle().
*/
protected function entityFormTitle(EntityInterface $entity) {
$block_type = entity_load('custom_block_type', $entity->type->value);
......
......@@ -52,7 +52,7 @@ public function form(array $form, array &$form_state) {
'#description' => t('Create a new revision by default for this block type.')
);
if (module_exists('translation_entity')) {
if (module_exists('content_translation')) {
$form['language'] = array(
'#type' => 'details',
'#title' => t('Language settings'),
......
......@@ -7,13 +7,13 @@
namespace Drupal\custom_block\Tests;
use Drupal\translation_entity\Tests\EntityTranslationUITest;
use Drupal\content_translation\Tests\ContentTranslationUITest;
use Drupal\custom_block\Plugin\Core\Entity\CustomBlock;
/**
* Tests the Custom Block Translation UI.
*/
class CustomBlockTranslationUITest extends EntityTranslationUITest {
class CustomBlockTranslationUITest extends ContentTranslationUITest {
/**
* The name of the test block.
......@@ -27,7 +27,7 @@ class CustomBlockTranslationUITest extends EntityTranslationUITest {
*/
public static $modules = array(
'language',
'translation_entity',
'content_translation',
'block',
'field_ui',
'custom_block'
......@@ -56,7 +56,7 @@ public function setUp() {
}
/**
* Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::getTranslatorPermission().
* Overrides \Drupal\content_translation\Tests\ContentTranslationUITest::getTranslatorPermission().
*/
public function getTranslatorPermissions() {
return array_merge(parent::getTranslatorPermissions(), array(
......@@ -93,7 +93,7 @@ protected function createCustomBlock($title = FALSE, $bundle = FALSE) {
}
/**
* Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::getNewEntityValues().
* Overrides \Drupal\content_translation\Tests\ContentTranslationUITest::getNewEntityValues().
*/
protected function getNewEntityValues($langcode) {
return array('info' => $this->name) + parent::getNewEntityValues($langcode);
......@@ -117,8 +117,8 @@ public function testDisabledBundle() {
$disabled_custom_block = $this->createCustomBlock(FALSE, $bundle->id());
// Make sure that only a single row was inserted into the
// {translation_entity} table.
$rows = db_query('SELECT * FROM {translation_entity}')->fetchAll();
// {content_translation} table.
$rows = db_query('SELECT * FROM {content_translation}')->fetchAll();
$this->assertEqual(1, count($rows));
$this->assertEqual($enabled_custom_block->id(), reset($rows)->entity_id);
}
......
......@@ -139,7 +139,7 @@ function comment_admin_overview($form, &$form_state, $arg) {
'href' => 'comment/' . $comment->id() . '/edit',
'query' => $destination,
);
if (module_invoke('translation_entity', 'translate_access', $comment)) {
if (module_invoke('content_translation', 'translate_access', $comment)) {
$links['translate'] = array(
'title' => t('translate'),
'href' => 'comment/' . $comment->id() . '/translations',
......
......@@ -954,7 +954,7 @@ function comment_links(Comment $comment, EntityInterface $node) {
}
// Add translations link for translation-enabled comment bundles.
if (module_exists('translation_entity') && translation_entity_translate_access($comment)) {
if (module_exists('content_translation') && content_translation_translate_access($comment)) {
$links['comment-translations'] = array(
'title' => t('translate'),
'href' => 'comment/' . $comment->id() . '/translations',
......@@ -1059,10 +1059,10 @@ function comment_form_node_type_form_alter(&$form, $form_state) {
),
);
// @todo Remove this check once language settings are generalized.
if (module_exists('translation_entity')) {
if (module_exists('content_translation')) {
$comment_form = $form;
$comment_form_state['translation_entity']['key'] = 'language_configuration';
$form['comment'] += translation_entity_enable_widget('comment', 'comment_node_' . $form['#node_type']->type, $comment_form, $comment_form_state);
$comment_form_state['content_translation']['key'] = 'language_configuration';
$form['comment'] += content_translation_enable_widget('comment', 'comment_node_' . $form['#node_type']->type, $comment_form, $comment_form_state);
array_unshift($form['#submit'], 'comment_translation_configuration_element_submit');
}
}
......@@ -1083,11 +1083,11 @@ function comment_translation_configuration_element_submit($form, &$form_state) {
// settings.
$key = 'language_configuration';
$comment_form_state = array(
'translation_entity' => array('key' => $key),
'content_translation' => array('key' => $key),
'language' => array($key => array('entity_type' => 'comment', 'bundle' => 'comment_node_' . $form['#node_type']->type)),
'values' => array($key => array('translation_entity' => $form_state['values']['translation_entity'])),
'values' => array($key => array('content_translation' => $form_state['values']['content_translation'])),
);
translation_entity_language_configuration_element_submit($form, $comment_form_state);
content_translation_language_configuration_element_submit($form, $comment_form_state);
}
/**
......
......@@ -360,12 +360,12 @@ function comment_views_data() {
),
);
if (Drupal::moduleHandler()->moduleExists('translation_entity')) {
if (Drupal::moduleHandler()->moduleExists('content_translation')) {
$data['comment']['translation_link'] = array(
'title' => t('Translation link'),
'help' => t('Provide a link to the translations overview for comments.'),
'field' => array(
'id' => 'translation_entity_link',
'id' => 'content_translation_link',
),
);
}
......
......@@ -9,15 +9,15 @@
namespace Drupal\comment;
use Drupal\Core\Entity\EntityInterface;
use Drupal\translation_entity\EntityTranslationControllerNG;
use Drupal\content_translation\ContentTranslationControllerNG;
/**
* Defines the translation controller class for comments.
*/
class CommentTranslationController extends EntityTranslationControllerNG {
class CommentTranslationController extends ContentTranslationControllerNG {
/**
* Overrides EntityTranslationController::entityFormTitle().
* Overrides ContentTranslationController::entityFormTitle().
*/
protected function entityFormTitle(EntityInterface $entity) {
return t('Edit comment @subject', array('@subject' => $entity->label()));
......
......@@ -7,12 +7,12 @@
namespace Drupal\comment\Tests;
use Drupal\translation_entity\Tests\EntityTranslationUITest;
use Drupal\content_translation\Tests\ContentTranslationUITest;
/**
* Tests the Comment Translation UI.
*/
class CommentTranslationUITest extends EntityTranslationUITest {
class CommentTranslationUITest extends ContentTranslationUITest {
/**
* The subject of the test comment.
......@@ -24,7 +24,7 @@ class CommentTranslationUITest extends EntityTranslationUITest {
*
* @var array
*/
public static $modules = array('language', 'translation_entity', 'node', 'comment');
public static $modules = array('language', 'content_translation', 'node', 'comment');
public static function getInfo() {
return array(
......@@ -44,7 +44,7 @@ function setUp() {
}
/**
* Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::setupBundle().
* Overrides \Drupal\content_translation\Tests\ContentTranslationUITest::setupBundle().
*/
function setupBundle() {
parent::setupBundle();
......@@ -52,14 +52,14 @@ function setupBundle() {
}
/**
* Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::getTranslatorPermission().
* Overrides \Drupal\content_translation\Tests\ContentTranslationUITest::getTranslatorPermission().
*/
protected function getTranslatorPermissions() {
return array_merge(parent::getTranslatorPermissions(), array('post comments', 'administer comments'));
}
/**
* Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::setupTestFields().
* Overrides \Drupal\content_translation\Tests\ContentTranslationUITest::setupTestFields().
*/
function setupTestFields() {
parent::setupTestFields();
......@@ -69,7 +69,7 @@ function setupTestFields() {
}
/**
* Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::createEntity().
* Overrides \Drupal\content_translation\Tests\ContentTranslationUITest::createEntity().
*/
protected function createEntity($values, $langcode, $node_bundle = NULL) {
if (!isset($node_bundle)) {
......@@ -82,7 +82,7 @@ protected function createEntity($values, $langcode, $node_bundle = NULL) {
}
/**
* Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::getNewEntityValues().
* Overrides \Drupal\content_translation\Tests\ContentTranslationUITest::getNewEntityValues().
*/
protected function getNewEntityValues($langcode) {
// Comment subject is not translatable hence we use a fixed value.
......@@ -93,7 +93,7 @@ protected function getNewEntityValues($langcode) {
}
/**
* Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::assertPublishedStatus().
* Overrides \Drupal\content_translation\Tests\ContentTranslationUITest::assertPublishedStatus().
*/
protected function assertPublishedStatus() {
parent::assertPublishedStatus();
......
......@@ -2,7 +2,7 @@
/**
* @file
* The entity translation administration forms.
* The content translation administration forms.
*/
use Drupal\Core\Entity\EntityInterface;
......@@ -21,7 +21,7 @@
* @return array
* A form element to configure field synchronization.
*/
function translation_entity_field_sync_widget(Field $field, FieldInstance $instance) {
function content_translation_field_sync_widget(Field $field, FieldInstance $instance) {
$element = array();
if (!empty($field['settings']['column_groups']) && count($field['settings']['column_groups']) > 1) {
......@@ -42,10 +42,10 @@ function translation_entity_field_sync_widget(Field $field, FieldInstance $insta
'#default_value' => !empty($instance['settings']['translation_sync']) ? $instance['settings']['translation_sync'] : $default,
'#attached' => array(
'library' => array(
array('translation_entity', 'drupal.translation_entity.admin'),
array('content_translation', 'drupal.content_translation.admin'),
),
'js' => array(
array('data' => array('translationEntityDependentOptions' => $settings), 'type' => 'setting'),
array('data' => array('contentTranslationDependentOptions' => $settings), 'type' => 'setting'),
),
),
);
......@@ -57,21 +57,21 @@ function translation_entity_field_sync_widget(Field $field, FieldInstance $insta
/**
* (proxied) Implements hook_form_FORM_ID_alter().
*/
function _translation_entity_form_language_content_settings_form_alter(array &$form, array &$form_state) {
function _content_translation_form_language_content_settings_form_alter(array &$form, array &$form_state) {
// Inject into the content language settings the translation settings if the
// user has the required permission.
if (!user_access('administer entity translation')) {
if (!user_access('administer content translation')) {
return;
}
$default = $form['entity_types']['#default_value'];
foreach ($default as $entity_type => $enabled) {
$default[$entity_type] = $enabled || translation_entity_enabled($entity_type) ? $entity_type : FALSE;
$default[$entity_type] = $enabled || content_translation_enabled($entity_type) ? $entity_type : FALSE;
}
$form['entity_types']['#default_value'] = $default;
$form['#attached']['library'][] = array('translation_entity', 'drupal.translation_entity.admin');
$form['#attached']['js'][] = array('data' => drupal_get_path('module', 'translation_entity') . '/translation_entity.admin.js', 'type' => 'file');
$form['#attached']['library'][] = array('content_translation', 'drupal.content_translation.admin');
$form['#attached']['js'][] = array('data' => drupal_get_path('module', 'content_translation') . '/content_translation.admin.js', 'type' => 'file');
$dependent_options_settings = array();
foreach ($form['#labels'] as $entity_type => $label) {
......@@ -80,7 +80,7 @@ function _translation_entity_form_language_content_settings_form_alter(array &$f
// Here we do not want the widget to be altered and hold also the "Enable
// translation" checkbox, which would be redundant. Hence we add this key
// to be able to skip alterations.
$form['settings'][$entity_type][$bundle]['settings']['language']['#translation_entity_skip_alter'] = TRUE;
$form['settings'][$entity_type][$bundle]['settings']['language']['#content_translation_skip_alter'] = TRUE;
// Only show the checkbox to enable translation if the bundles in the
// entity might have fields and if there are fields to translate.
......@@ -89,7 +89,7 @@ function _translation_entity_form_language_content_settings_form_alter(array &$f
if ($fields) {
$form['settings'][$entity_type][$bundle]['translatable'] = array(
'#type' => 'checkbox',
'#default_value' => translation_entity_enabled($entity_type, $bundle),
'#default_value' => content_translation_enabled($entity_type, $bundle),
);
// @todo Exploit field definitions once all core entities and field
......@@ -101,7 +101,7 @@ function _translation_entity_form_language_content_settings_form_alter(array &$f
'#type' => 'checkbox',
'#default_value' => $field['translatable'],
);
$column_element = translation_entity_field_sync_widget($field, $instance);
$column_element = content_translation_field_sync_widget($field, $instance);
if ($column_element) {
$form['settings'][$entity_type][$bundle]['columns'][$field_name] = $column_element;
......@@ -115,18 +115,18 @@ function _translation_entity_form_language_content_settings_form_alter(array &$f
}
}
$settings = array('dependent_selectors' => $dependent_options_settings);
$form['#attached']['js'][] = array('data' => array('translationEntityDependentOptions' => $settings), 'type' => 'setting');
$form['#validate'][] = 'translation_entity_form_language_content_settings_validate';
$form['#submit'][] = 'translation_entity_form_language_content_settings_submit';
$form['#attached']['js'][] = array('data' => array('contentTranslationDependentOptions' => $settings), 'type' => 'setting');
$form['#validate'][] = 'content_translation_form_language_content_settings_validate';
$form['#submit'][] = 'content_translation_form_language_content_settings_submit';
}
/**
* (proxied) Implements hook_preprocess_HOOK();
*/
function _translation_entity_preprocess_language_content_settings_table(&$variables) {
function _content_translation_preprocess_language_content_settings_table(&$variables) {
// Alter the 'build' variable injecting the translation settings if the user
// has the required permission.
if (!user_access('administer entity translation')) {
if (!user_access('administer content translation')) {
return;
}
......@@ -237,11 +237,11 @@ function _translation_entity_preprocess_language_content_settings_table(&$variab
}
/**
* Form validation handler for translation_entity_admin_settings_form().
* Form validation handler for content_translation_admin_settings_form().
*
* @see translation_entity_admin_settings_form_submit()
* @see content_translation_admin_settings_form_submit()
*/
function translation_entity_form_language_content_settings_validate(array $form, array &$form_state) {
function content_translation_form_language_content_settings_validate(array $form, array &$form_state) {
$settings = &$form_state['values']['settings'];
foreach ($settings as $entity_type => $entity_settings) {
foreach ($entity_settings as $bundle => $bundle_settings) {
......@@ -267,11 +267,11 @@ function translation_entity_form_language_content_settings_validate(array $form,
}
/**
* Form submission handler for translation_entity_admin_settings_form().
* Form submission handler for content_translation_admin_settings_form().
*
* @see translation_entity_admin_settings_form_validate()
* @see content_translation_admin_settings_form_validate()
*/
function translation_entity_form_language_content_settings_submit(array $form, array &$form_state) {
function content_translation_form_language_content_settings_submit(array $form, array &$form_state) {
$entity_types = $form_state['values']['entity_types'];
$settings = &$form_state['values']['settings'];
......@@ -296,12 +296,12 @@ function translation_entity_form_language_content_settings_submit(array $form, a
}
}
_translation_entity_update_field_translatability($settings);
_content_translation_update_field_translatability($settings);
drupal_set_message(t('Settings successfully updated.'));
}
/**
* Stores entity translation settings.
* Stores content translation settings.
*
* @param array $settings
* An associative array of settings keyed by entity type and bundle. At bundle
......@@ -315,7 +315,7 @@ function translation_entity_form_language_content_settings_submit(array $form, a
* @todo Remove this migration entirely once the Field API is converted to the
* Entity Field API.
*/
function _translation_entity_update_field_translatability($settings) {
function _content_translation_update_field_translatability($settings) {
$fields = array();
foreach ($settings as $entity_type => $entity_settings) {
foreach ($entity_settings as $bundle => $bundle_settings) {
......@@ -344,10 +344,10 @@ function _translation_entity_update_field_translatability($settings) {
// data back to Language::LANGCODE_NOT_SPECIFIED before making a field
// untranslatable lest we lose information.
$field_operations = array(
array('translation_entity_translatable_switch', array($translatable, $field_name)),
array('content_translation_translatable_switch', array($translatable, $field_name)),
);
if ($field->hasData()) {
$field_operations[] = array('translation_entity_translatable_batch', array($translatable, $field_name));
$field_operations[] = array('content_translation_translatable_batch', array($translatable, $field_name));
$field_operations = $translatable ? $field_operations : array_reverse($field_operations);
}
$operations = array_merge($operations, $field_operations);
......@@ -355,13 +355,13 @@ function _translation_entity_update_field_translatability($settings) {
}
// As last operation store the submitted settings.
$operations[] = array('translation_entity_save_settings', array($settings));
$operations[] = array('content_translation_save_settings', array($settings));
$batch = array(
'title' => t('Updating translatability for the selected fields'),
'operations' => $operations,
'finished' => 'translation_entity_translatable_batch_done',
'file' => drupal_get_path('module', 'translation_entity') . '/translation_entity.admin.inc',
'finished' => 'content_translation_translatable_batch_done',
'file' => drupal_get_path('module', 'content_translation') . '/content_translation.admin.inc',
);
batch_set($batch);
}
......@@ -369,7 +369,7 @@ function _translation_entity_update_field_translatability($settings) {
/**
* Form constructor for the confirmation of translatability switching.
*/
function translation_entity_translatable_form(array $form, array &$form_state, $field_name) {
function content_translation_translatable_form(array $form, array &$form_state, $field_name) {
$field = field_info_field($field_name);
$t_args = array('%name' => $field_name);
......@@ -396,7 +396,7 @@ function translation_entity_translatable_form(array $form, array &$form_state, $
}
/**
* Form submission handler for translation_entity_translatable_form().
* Form submission handler for content_translation_translatable_form().
*
* This submit handler maintains consistency between the translatability of an
* entity and the language under which the field data is stored. When a field is
......@@ -407,7 +407,7 @@ function translation_entity_translatable_form(array $form, array &$form_state, $
* untranslatable will cause all of its translations to be permanently removed,
* with the exception of the one corresponding to the entity language.
*/
function translation_entity_translatable_form_submit(array $form, array $form_state) {
function content_translation_translatable_form_submit(array $form, array $form_state) {
// This is the current state that we want to reverse.
$translatable = $form_state['values']['translatable'];
$field_name = $form_state['field']['field_name'];
......@@ -429,8 +429,8 @@ function translation_entity_translatable_form_submit(array $form, array $form_st
// to Language::LANGCODE_NOT_SPECIFIED before making a field untranslatable lest we lose
// information.
$operations = array(
array('translation_entity_translatable_batch', array(!$translatable, $field_name)),
array('translation_entity_translatable_switch', array(!$translatable, $field_name)),
array('content_translation_translatable_batch', array(!$translatable, $field_name)),
array('content_translation_translatable_switch', array(!$translatable, $field_name)),
);
$operations = $translatable ? $operations : array_reverse($operations);
......@@ -440,8 +440,8 @@ function translation_entity_translatable_form_submit(array $form, array $form_st
$batch = array(
'title' => $title,
'operations' => $operations,
'finished' => 'translation_entity_translatable_batch_done',
'file' => drupal_get_path('module', 'translation_entity') . '/translation_entity.admin.inc',
'finished' => 'content_translation_translatable_batch_done',
'file' => drupal_get_path('module', 'content_translation') . '/content_translation.admin.inc',
);
batch_set($batch);
......@@ -458,7 +458,7 @@ function translation_entity_translatable_form_submit(array $form, array $form_st
* @param string $field_name
* Field machine name.
*/
function translation_entity_translatable_switch($translatable, $field_name) {
function content_translation_translatable_switch($translatable, $field_name) {
$field = field_info_field($field_name);
if ($field['translatable'] !== $translatable) {
$field['translatable'] = $translatable;
......@@ -475,7 +475,7 @@ function translation_entity_translatable_switch($translatable, $field_name) {
* @param string $field_name
* Field machine name.
*/
function translation_entity_translatable_batch($translatable, $field_name, &$context) {
function content_translation_translatable_batch($translatable, $field_name, &$context) {
$field = field_info_field($field_name);
$column = isset($field['columns']['value']) ? 'value' : key($field['columns']);
$query_field = "$field_name.$column";
......@@ -554,10 +554,10 @@ function translation_entity_translatable_batch($translatable, $field_name, &$con
// language.
$entity->{$field_name}[$langcode] = $entity->{$field_name}[Language::LANGCODE_NOT_SPECIFIED];
// Store the original value.
_translation_entity_update_field($entity_type, $entity, $field_name);
_content_translation_update_field($entity_type, $entity, $field_name);
$entity->{$field_name}[Language::LANGCODE_NOT_SPECIFIED] = array();
// Remove the language neutral value.
_translation_entity_update_field($entity_type, $entity, $field_name);
_content_translation_update_field($entity_type, $entity, $field_name);
}
elseif (!$translatable && isset($entity->{$field_name}[$langcode])) {
// The field has been marked untranslatable and has data in the entity
......@@ -565,14 +565,14 @@ function translation_entity_translatable_batch($translatable, $field_name, &$con
// other translations.
$entity->{$field_name}[Language::LANGCODE_NOT_SPECIFIED] = $entity->{$field_name}[$langcode];
// Store the original value.
_translation_entity_update_field($entity_type, $entity, $field_name);
_content_translation_update_field($entity_type, $entity, $field_name);
// Remove translations.
foreach ($entity->{$field_name} as $langcode => $items) {
if ($langcode != Language::LANGCODE_NOT_SPECIFIED) {
$entity->{$field_name}[$langcode] = array();
}
}
_translation_entity_update_field($entity_type, $entity, $field_name);
_content_translation_update_field($entity_type, $entity, $field_name);
}
else {
// No need to save unchanged entities.
......@@ -587,7 +587,7 @@ function translation_entity_translatable_batch($translatable, $field_name, &$con
/**
* Stores the given field translations.
*/
function _translation_entity_update_field($entity_type, EntityInterface $entity, $field_name) {
function _content_translation_update_field($entity_type, EntityInterface $entity, $field_name) {
$empty = 0;
$translations = $entity->getTranslationLanguages();
......@@ -609,7 +609,7 @@ function _translation_entity_update_field($entity_type, EntityInterface $entity,
/**
* Batch finished callback: Checks the exit status of the batch operation.
*/
function translation_entity_translatable_batch_done($success, $results, $operations) {
function content_translation_translatable_batch_done($success, $results, $operations) {
if ($success) {
drupal_set_message(t("Successfully changed field translation setting."));
}
......
......@@ -5,9 +5,9 @@
/**
* Forces applicable options to be checked as translatable.
*/
Drupal.behaviors.translationEntityDependentOptions = {
Drupal.behaviors.contentTranslationDependentOptions = {
attach: function (context, settings) {
var $options = settings.translationEntityDependentOptions;
var $options = settings.contentTranslationDependentOptions;
var $collections = [];
// We're given a generic name to look for so we find all inputs containing
......@@ -24,11 +24,11 @@ Drupal.behaviors.translationEntityDependentOptions = {
var $dependent_columns = $collection.dependent_columns;
$fields.change(function() {
Drupal.behaviors.translationEntityDependentOptions.check($fields, $dependent_columns, $(this));
Drupal.behaviors.contentTranslationDependentOptions.check($fields, $dependent_columns, $(this));