diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-08-05 23:53:39 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-08-05 23:53:39 +0000 |
commit | 25171a17f626695ecf984cc44b60d3eae1310b4c (patch) | |
tree | 3268ef89294cbb96d0875d665012c4ff16d8c68a /modules/translation | |
parent | cacd044a6398df92de68c5aea31987ac0fff507a (diff) | |
download | brdo-25171a17f626695ecf984cc44b60d3eae1310b4c.tar.gz brdo-25171a17f626695ecf984cc44b60d3eae1310b4c.tar.bz2 |
Reverting #500866. Needs more discussion.
Diffstat (limited to 'modules/translation')
-rw-r--r-- | modules/translation/translation.test | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/translation/translation.test b/modules/translation/translation.test index 79a72853a..d72fd390a 100644 --- a/modules/translation/translation.test +++ b/modules/translation/translation.test @@ -35,7 +35,7 @@ class TranslationTestCase extends DrupalWebTestCase { $edit = array(); $edit['language_content_type'] = 2; $this->drupalPost('admin/structure/types/manage/page', $edit, t('Save content type')); - $this->assertRaw(t('The content type %type has been updated.', array('%type' => 'Basic page')), 'Basic page content type has been updated.'); + $this->assertRaw(t('The content type %type has been updated.', array('%type' => 'Basic page')), t('Basic page content type has been updated.')); $this->drupalLogout(); $this->drupalLogin($translator); @@ -54,7 +54,7 @@ class TranslationTestCase extends DrupalWebTestCase { // with identical query string. $languages = language_list(); $this->drupalGet('node/add/page', array('query' => array('translation' => $node->nid, 'target' => 'es'))); - $this->assertRaw(t('A translation of %title in %language already exists', array('%title' => $node_title, '%language' => $languages['es']->name)), 'Message regarding attempted duplicate translation is displayed.'); + $this->assertRaw(t('A translation of %title in %language already exists', array('%title' => $node_title, '%language' => $languages['es']->name)), t('Message regarding attempted duplicate translation is displayed.')); // Attempt a resubmission of the form - this emulates using the back button // to return to the page then resubmitting the form without a refresh. @@ -64,25 +64,25 @@ class TranslationTestCase extends DrupalWebTestCase { $edit["body[$langcode][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, 'The node does not have a tnid.'); + $this->assertEqual($duplicate->tnid, 0, t('The node does not have a tnid.')); // Update original and mark translation as outdated. $edit = array(); $edit["body[$node->language][0][value]"] = $this->randomName(); $edit['translation[retranslate]'] = TRUE; $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save')); - $this->assertRaw(t('Basic page %title has been updated.', array('%title' => $node_title)), 'Original node updated.'); + $this->assertRaw(t('Basic page %title has been updated.', array('%title' => $node_title)), t('Original node updated.')); // Check to make sure that interface shows translation as outdated $this->drupalGet('node/' . $node->nid . '/translate'); - $this->assertRaw('<span class="marker">' . t('outdated') . '</span>', 'Translation marked as outdated.'); + $this->assertRaw('<span class="marker">' . t('outdated') . '</span>', t('Translation marked as outdated.')); // Update translation and mark as updated. $edit = array(); $edit["body[$node_translation->language][0][value]"] = $this->randomName(); $edit['translation[status]'] = FALSE; $this->drupalPost('node/' . $node_translation->nid . '/edit', $edit, t('Save')); - $this->assertRaw(t('Basic page %title has been updated.', array('%title' => $node_translation_title)), 'Translated node updated.'); + $this->assertRaw(t('Basic page %title has been updated.', array('%title' => $node_translation_title)), t('Translated node updated.')); } /** @@ -104,10 +104,10 @@ class TranslationTestCase extends DrupalWebTestCase { // Make sure we're not using a stale list. drupal_static_reset('language_list'); $languages = language_list('language'); - $this->assertTrue(array_key_exists($language_code, $languages), 'Language was installed successfully.'); + $this->assertTrue(array_key_exists($language_code, $languages), t('Language was installed successfully.')); if (array_key_exists($language_code, $languages)) { - $this->assertRaw(t('The language %language has been created and can now be used. More information is available on the <a href="@locale-help">help screen</a>.', array('%language' => $languages[$language_code]->name, '@locale-help' => url('admin/help/locale'))), 'Language has been created.'); + $this->assertRaw(t('The language %language has been created and can now be used. More information is available on the <a href="@locale-help">help screen</a>.', array('%language' => $languages[$language_code]->name, '@locale-help' => url('admin/help/locale'))), t('Language has been created.')); } } elseif ($this->xpath('//input[@type="checkbox" and @name=:name and @checked="checked"]', array(':name' => 'enabled[' . $language_code . ']'))) { @@ -118,7 +118,7 @@ class TranslationTestCase extends DrupalWebTestCase { // It's installed but not enabled. Enable it. $this->assertTrue(true, 'Language [' . $language_code . '] already installed.'); $this->drupalPost(NULL, array('enabled[' . $language_code . ']' => TRUE), t('Save configuration')); - $this->assertRaw(t('Configuration saved.'), 'Language successfully enabled.'); + $this->assertRaw(t('Configuration saved.'), t('Language successfully enabled.')); } } @@ -136,11 +136,11 @@ class TranslationTestCase extends DrupalWebTestCase { $edit["body[$langcode][0][value]"] = $body; $edit['language'] = $language; $this->drupalPost('node/add/page', $edit, t('Save')); - $this->assertRaw(t('Basic page %title has been created.', array('%title' => $title)), 'Basic page created.'); + $this->assertRaw(t('Basic page %title has been created.', array('%title' => $title)), t('Basic page created.')); // Check to make sure the node was created. $node = $this->drupalGetNodeByTitle($title); - $this->assertTrue($node, 'Node found in database.'); + $this->assertTrue($node, t('Node found in database.')); return $node; } @@ -164,11 +164,11 @@ class TranslationTestCase extends DrupalWebTestCase { $edit["title"] = $title; $edit[$body_key] = $body; $this->drupalPost(NULL, $edit, t('Save')); - $this->assertRaw(t('Basic page %title has been created.', array('%title' => $title)), 'Translation created.'); + $this->assertRaw(t('Basic page %title has been created.', array('%title' => $title)), t('Translation created.')); // Check to make sure that translation was successful. $node = $this->drupalGetNodeByTitle($title); - $this->assertTrue($node, 'Node found in database.'); + $this->assertTrue($node, t('Node found in database.')); return $node; } |