Révision 76df55b7
Ajouté par Benjamin Luce il y a presque 9 ans
drupal7/sites/all/modules/i18n/i18n_string/i18n_string.test | ||
---|---|---|
53 | 53 |
$this->assertEqual($translation, $translations[$key][$language->language], "The right $language->name ($language->language) translation has been retrieved for $name, $translation"); |
54 | 54 |
} |
55 | 55 |
} |
56 |
|
|
57 |
// Test that regular strings can be translated. Use 'Built-in interface' as |
|
58 |
// filter, and translate first one. |
|
59 |
$search = array( |
|
60 |
'language' => 'all', |
|
61 |
'translation' => 'all', |
|
62 |
'group' => 'default', |
|
63 |
'string' => '', |
|
64 |
); |
|
65 |
$this->drupalPost('admin/config/regional/translate/translate', $search, t('Filter')); |
|
66 |
$this->clickLink(t('edit')); |
|
67 |
// Just add a random translation. |
|
68 |
$translation = $this->randomString(); |
|
69 |
$edit = array(); |
|
70 |
foreach ($this->getOtherLanguages() as $language) { |
|
71 |
$langcode = $language->language; |
|
72 |
$edit["translations[$langcode]"] = $translation; |
|
73 |
} |
|
74 |
$this->drupalPost(NULL, $edit, t('Save translations')); |
|
75 |
$this->assertText(t('The string has been saved.'), t('The string has been saved.')); |
|
76 |
$this->assertEqual($this->getUrl(), url('admin/config/regional/translate/translate', array('absolute' => TRUE)), t('Correct page redirection.')); |
|
77 |
|
|
56 | 78 |
} |
57 | 79 |
|
58 | 80 |
/** |
Formats disponibles : Unified diff
Weekly update of contrib modules