Issue #2290849 by fran seva, YesCT: Fixed Regression: Fields missing from translation overview since 'Clarify handling of field translatability'.
parent
ac7e61ef9b
commit
75346a3bd1
|
@ -132,7 +132,7 @@ class CommentManager implements CommentManagerInterface {
|
|||
'entity_type' => $entity_type,
|
||||
'name' => $field_name,
|
||||
'type' => 'comment',
|
||||
'translatable' => '0',
|
||||
'translatable' => TRUE,
|
||||
'settings' => array(
|
||||
'comment_type' => $comment_type_id,
|
||||
),
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\content_translation\Tests\ContentTranslationStandardFieldsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\content_translation\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
||||
/**
|
||||
* Tests the Content translation settings using the standard profile.
|
||||
*/
|
||||
class ContentTranslationStandardFieldsTest extends WebTestBase {
|
||||
|
||||
/**
|
||||
* Modules to enable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $modules = array(
|
||||
'language',
|
||||
'content_translation',
|
||||
'node',
|
||||
'comment',
|
||||
'field_ui',
|
||||
'entity_test',
|
||||
);
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $profile = 'standard';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Content Translation Settings with default profile',
|
||||
'description' => 'Test the Content Translation Settings using default profile',
|
||||
'group' => 'Content Translation UI',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
$admin_user = $this->drupalCreateUser(array(
|
||||
'access administration pages',
|
||||
'administer languages',
|
||||
'administer content translation',
|
||||
'administer content types',
|
||||
'administer node fields',
|
||||
'administer comment fields',
|
||||
'administer comments',
|
||||
'administer comment types',
|
||||
));
|
||||
$this->drupalLogin($admin_user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that translatable fields are being rendered.
|
||||
*/
|
||||
public function testFieldTranslatableArticle() {
|
||||
|
||||
$path = 'admin/config/regional/content-language';
|
||||
$this->drupalGet($path);
|
||||
|
||||
// Check comment checkbox.
|
||||
$this->assertFieldByXPath("//input[@id='edit-settings-node-article-fields-comment' and @checked='checked']");
|
||||
|
||||
// Check image checkbox.
|
||||
$this->assertFieldByXPath("//input[@id='edit-settings-node-article-fields-field-image' and @checked='checked']");
|
||||
|
||||
// Check tag checkbox.
|
||||
$this->assertFieldByXPath("//input[@id='edit-settings-node-article-fields-field-tags' and @checked='checked']");
|
||||
}
|
||||
|
||||
}
|
|
@ -13,7 +13,7 @@ settings:
|
|||
height: null
|
||||
locked: false
|
||||
cardinality: 1
|
||||
translatable: false
|
||||
translatable: true
|
||||
indexes:
|
||||
target_id:
|
||||
- target_id
|
||||
|
|
|
@ -10,7 +10,7 @@ settings:
|
|||
parent: 0
|
||||
locked: false
|
||||
cardinality: -1
|
||||
translatable: false
|
||||
translatable: true
|
||||
indexes:
|
||||
target_id:
|
||||
- target_id
|
||||
|
|
Loading…
Reference in New Issue