Issue #2290849 by fran seva, YesCT: Fixed Regression: Fields missing from translation overview since 'Clarify handling of field translatability'.

8.0.x
webchick 2014-07-02 10:57:27 -07:00
parent ac7e61ef9b
commit 75346a3bd1
4 changed files with 87 additions and 3 deletions

View File

@ -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,
),

View File

@ -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']");
}
}

View File

@ -13,7 +13,7 @@ settings:
height: null
locked: false
cardinality: 1
translatable: false
translatable: true
indexes:
target_id:
- target_id

View File

@ -10,7 +10,7 @@ settings:
parent: 0
locked: false
cardinality: -1
translatable: false
translatable: true
indexes:
target_id:
- target_id