updated modules
views friendly_register serial address_field i18n
This commit is contained in:
@@ -10,9 +10,9 @@ files[] = i18n_string.inc
|
||||
files[] = i18n_string.test
|
||||
configure = admin/config/regional/i18n/strings
|
||||
|
||||
; Information added by Drupal.org packaging script on 2015-01-26
|
||||
version = "7.x-1.12"
|
||||
; Information added by Drupal.org packaging script on 2015-05-07
|
||||
version = "7.x-1.13"
|
||||
core = "7.x"
|
||||
project = "i18n"
|
||||
datestamp = "1422286982"
|
||||
datestamp = "1430999922"
|
||||
|
||||
|
@@ -29,7 +29,9 @@ function i18n_string_install() {
|
||||
i18n_string_update_7001();
|
||||
}
|
||||
// Create new index in {locales_source}, performance improvement in sites with i18n.
|
||||
db_add_index('locales_source', 'textgroup_context', array('textgroup', 'context'));
|
||||
if (!db_index_exists('locales_source', 'textgroup_context')) {
|
||||
db_add_index('locales_source', 'textgroup_context', array('textgroup', array('context', 50)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -106,7 +108,7 @@ function i18n_string_schema() {
|
||||
),
|
||||
'primary key' => array('lid'),
|
||||
'indexes' => array(
|
||||
'group_context' => array('textgroup', 'context'),
|
||||
'group_context' => array('textgroup', array('context', 50)),
|
||||
),
|
||||
);
|
||||
return $schema;
|
||||
@@ -238,7 +240,9 @@ function i18n_string_update_7001() {
|
||||
* Create new index in {locales_source}, performance improvement in sites with i18n.
|
||||
*/
|
||||
function i18n_string_update_7002() {
|
||||
db_add_index('locales_source', 'textgroup_context', array('textgroup', 'context'));
|
||||
if (!db_index_exists('locales_source', 'textgroup_context')) {
|
||||
db_add_index('locales_source', 'textgroup_context', array('textgroup', array('context', 50)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -269,4 +273,4 @@ function i18n_string_update_7002() {
|
||||
* Node type
|
||||
* nodetype:type:[type]:[property] -> node:type:[type]:[property]
|
||||
* Property names: title -> title_label
|
||||
*/
|
||||
*/
|
||||
|
@@ -53,6 +53,28 @@ class i18nStringTestCase extends Drupali18nTestCase {
|
||||
$this->assertEqual($translation, $translations[$key][$language->language], "The right $language->name ($language->language) translation has been retrieved for $name, $translation");
|
||||
}
|
||||
}
|
||||
|
||||
// Test that regular strings can be translated. Use 'Built-in interface' as
|
||||
// filter, and translate first one.
|
||||
$search = array(
|
||||
'language' => 'all',
|
||||
'translation' => 'all',
|
||||
'group' => 'default',
|
||||
'string' => '',
|
||||
);
|
||||
$this->drupalPost('admin/config/regional/translate/translate', $search, t('Filter'));
|
||||
$this->clickLink(t('edit'));
|
||||
// Just add a random translation.
|
||||
$translation = $this->randomString();
|
||||
$edit = array();
|
||||
foreach ($this->getOtherLanguages() as $language) {
|
||||
$langcode = $language->language;
|
||||
$edit["translations[$langcode]"] = $translation;
|
||||
}
|
||||
$this->drupalPost(NULL, $edit, t('Save translations'));
|
||||
$this->assertText(t('The string has been saved.'), t('The string has been saved.'));
|
||||
$this->assertEqual($this->getUrl(), url('admin/config/regional/translate/translate', array('absolute' => TRUE)), t('Correct page redirection.'));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user