summaryrefslogtreecommitdiff
path: root/modules/translation
diff options
context:
space:
mode:
Diffstat (limited to 'modules/translation')
-rw-r--r--modules/translation/translation.module1
-rw-r--r--modules/translation/translation.test10
2 files changed, 5 insertions, 6 deletions
diff --git a/modules/translation/translation.module b/modules/translation/translation.module
index 58045f396..4b9dbecd7 100644
--- a/modules/translation/translation.module
+++ b/modules/translation/translation.module
@@ -213,7 +213,6 @@ function translation_node_prepare($node) {
$node->language = $language;
$node->translation_source = $source_node;
$node->title = $node->translation_source->title;
- $node->body = $node->translation_source->body;
// Let every module add custom translated fields.
module_invoke_all('node_prepare_translation', $node);
}
diff --git a/modules/translation/translation.test b/modules/translation/translation.test
index 73afe8409..6dc2ce456 100644
--- a/modules/translation/translation.test
+++ b/modules/translation/translation.test
@@ -60,14 +60,14 @@ class TranslationTestCase extends DrupalWebTestCase {
// to return to the page then resubmitting the form without a refresh.
$edit = array();
$edit['title'] = $this->randomName();
- $edit['body'] = $this->randomName();
+ $edit['body[0][value]'] = $this->randomName();
$this->drupalPost('node/add/page', $edit, t('Save'), array('query' => array('translation' => $node->nid, 'language' => 'es')));
$duplicate = $this->drupalGetNodeByTitle($edit['title']);
$this->assertEqual($duplicate->tnid, 0, t('The node does not have a tnid.'));
// Update original and mark translation as outdated.
$edit = array();
- $edit['body'] = $this->randomName();
+ $edit['body[0][value]'] = $this->randomName();
$edit['translation[retranslate]'] = TRUE;
$this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
$this->assertRaw(t('Page %title has been updated.', array('%title' => $node_title)), t('Original node updated.'));
@@ -78,7 +78,7 @@ class TranslationTestCase extends DrupalWebTestCase {
// Update translation and mark as updated.
$edit = array();
- $edit['body'] = $this->randomName();
+ $edit['body[0][value]'] = $this->randomName();
$edit['translation[status]'] = FALSE;
$this->drupalPost('node/' . $node_translation->nid . '/edit', $edit, t('Save'));
$this->assertRaw(t('Page %title has been updated.', array('%title' => $node_translation_title)), t('Translated node updated.'));
@@ -128,7 +128,7 @@ class TranslationTestCase extends DrupalWebTestCase {
function createPage($title, $body, $language) {
$edit = array();
$edit['title'] = $title;
- $edit['body'] = $body;
+ $edit['body[0][value]'] = $body;
$edit['language'] = $language;
$this->drupalPost('node/add/page', $edit, t('Save'));
$this->assertRaw(t('Page %title has been created.', array('%title' => $edit['title'])), t('Page created.'));
@@ -153,7 +153,7 @@ class TranslationTestCase extends DrupalWebTestCase {
$edit = array();
$edit['title'] = $title;
- $edit['body'] = $body;
+ $edit['body[0][value]'] = $body;
$this->drupalPost(NULL, $edit, t('Save'));
$this->assertRaw(t('Page %title has been created.', array('%title' => $edit['title'])), t('Translation created.'));