uppdated modules
This commit is contained in:
@@ -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 2016-10-22
|
||||
version = "7.x-1.14"
|
||||
core = "7.x"
|
||||
project = "i18n"
|
||||
datestamp = "1422286982"
|
||||
datestamp = "1477154943"
|
||||
|
||||
|
||||
@@ -180,6 +180,7 @@ function i18n_menu_menu_link_alter(&$item) {
|
||||
// We just make sure every link has a valid language property.
|
||||
if (!i18n_object_langcode($item)) {
|
||||
$item['language'] = LANGUAGE_NONE;
|
||||
$item['i18n_tsid'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -515,9 +516,11 @@ function _i18n_menu_link_description($link, $langcode = NULL) {
|
||||
* Check whether this link is to be processed by i18n_menu and start processing.
|
||||
*/
|
||||
function _i18n_menu_link_process(&$link) {
|
||||
// Only visible links that have a language property and haven't been processed
|
||||
// before. We also check that they belong to a menu with language options.
|
||||
if (empty($link['i18n_menu']) && !empty($link['language']) && !empty($link['access']) && empty($link['hidden']) && i18n_menu_mode($link['menu_name'])) {
|
||||
// Only links that have a language property and haven't been processed before.
|
||||
// We also translate links marked as hidden because core breadcrumbs ignore
|
||||
// that flag and excluding them would basically interfere with core behaviour.
|
||||
// We also check that they belong to a menu with language options.
|
||||
if (empty($link['i18n_menu']) && !empty($link['language']) && !empty($link['access']) && i18n_menu_mode($link['menu_name'])) {
|
||||
// Mark so it won't be processed twice.
|
||||
$link['i18n_menu'] = TRUE;
|
||||
// Skip if administering this menu or this menu item.
|
||||
@@ -588,7 +591,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 +600,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';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user