updated modules

views friendly_register serial address_field i18n
This commit is contained in:
Bachir Soussi Chiadmi
2015-05-26 19:56:22 +02:00
parent c9f8dc21ed
commit 706c96d663
58 changed files with 584 additions and 367 deletions

View File

@@ -8,9 +8,9 @@ files[] = i18n_object.inc
files[] = i18n.test
configure = admin/config/regional/i18n
; 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"

View File

@@ -362,6 +362,7 @@ class Drupali18nTestCase extends DrupalWebTestCase {
function resetCaches() {
drupal_static_reset('locale_url_outbound_alter');
drupal_static_reset('language_list');
drupal_language_initialize();
}
/**

View File

@@ -8,9 +8,9 @@ files[] = i18n_block.inc
files[] = i18n_block.test
; 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"

View File

@@ -5,9 +5,9 @@ dependencies[] = i18n_string
package = Multilingual - Internationalization
core = 7.x
; 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"

View File

@@ -6,9 +6,9 @@ package = Multilingual - Internationalization
core = 7.x
files[] = i18n_field.inc
files[] = i18n_field.test
; 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"

View File

@@ -7,9 +7,9 @@ package = Multilingual - Internationalization
core = 7.x
files[] = i18n_forum.test
; 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"

View File

@@ -10,9 +10,9 @@ core = 7.x
files[] = i18n_menu.inc
files[] = i18n_menu.test
; 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"

View File

@@ -588,7 +588,7 @@ function _i18n_menu_link_localizable_properties($link) {
// If the title callback is 't' and the link title matches the router title
// it will be localized by core, not by i18n_menu.
if (!$router ||
(empty($router['title_callback']) || $router['title_callback'] != 't') ||
(empty($router['title_callback']) || ($router['title_callback'] != 't' || !empty($link['customized']))) ||
(empty($router['title']) || $router['title'] != $link['link_title'])
) {
$props[] = 'title';
@@ -597,7 +597,7 @@ function _i18n_menu_link_localizable_properties($link) {
if (!empty($link['options']['attributes']['title'])) {
// If the description matches the router description, it will be localized
// by core.
if (!$router || empty($router['description']) || $router['description'] != $link['options']['attributes']['title']) {
if (!$router || empty($router['description']) || ($router['description'] != $link['options']['attributes']['title']) || !empty($link['customized'])) {
$props[] = 'description';
}
}

View File

@@ -9,9 +9,9 @@ configure = admin/config/regional/i18n/node
files[]=i18n_node.test
files[]=i18n_node.variable.inc
; 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"

View File

@@ -6,9 +6,9 @@ core = 7.x
files[] = i18n_path.inc
files[] = i18n_path.test
; 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"

View File

@@ -4,9 +4,9 @@ dependencies[] = i18n
package = Multilingual - Internationalization
core = 7.x
; 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"

View File

@@ -6,9 +6,9 @@ core = 7.x
configure = admin/config/regional/i18n/select
files[] = i18n_select.test
; 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"

View File

@@ -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"

View File

@@ -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
*/
*/

View File

@@ -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.'));
}
/**

View File

@@ -10,9 +10,9 @@ files[] = i18n_sync.install
files[] = i18n_sync.module.inc
files[] = i18n_sync.node.inc
files[] = i18n_sync.test
; 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"

View File

@@ -11,9 +11,9 @@ files[] = i18n_taxonomy.pages.inc
files[] = i18n_taxonomy.admin.inc
files[] = i18n_taxonomy.test
; 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"

View File

@@ -6,9 +6,9 @@ core = 7.x
files[] = i18n_translation.inc
; 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"

View File

@@ -4,9 +4,9 @@ core = 7.x
package = Multilingual - Internationalization
dependencies[] = i18n_variable
; 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"

View File

@@ -54,7 +54,7 @@ function i18n_user_user_mail_tokens(&$replacements, $data, $options) {
*/
function i18n_user_user_pass_reset_url($account) {
$timestamp = REQUEST_TIME;
return url("user/reset/$account->uid/$timestamp/" . user_pass_rehash($account->pass, $timestamp, $account->login), array('absolute' => TRUE, 'language' => i18n_language($account->language)));
return url("user/reset/$account->uid/$timestamp/" . user_pass_rehash($account->pass, $timestamp, $account->login, $account->uid), array('absolute' => TRUE, 'language' => i18n_language($account->language)));
}
/**
@@ -65,5 +65,5 @@ function i18n_user_user_pass_reset_url($account) {
*/
function i18n_user_user_cancel_url($account) {
$timestamp = REQUEST_TIME;
return url("user/$account->uid/cancel/confirm/$timestamp/" . user_pass_rehash($account->pass, $timestamp, $account->login), array('absolute' => TRUE, 'language' => i18n_language($account->language)));
return url("user/$account->uid/cancel/confirm/$timestamp/" . user_pass_rehash($account->pass, $timestamp, $account->login, $account->uid), array('absolute' => TRUE, 'language' => i18n_language($account->language)));
}

View File

@@ -10,9 +10,9 @@ configure = admin/config/regional/i18n/variable
files[] = i18n_variable.class.inc
files[] = i18n_variable.test
; 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"

View File

@@ -7,9 +7,9 @@ package = Testing
core = 6.x
hidden = TRUE
; 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"