I have the Messages menu tab that points to the standard mywebsite/messages link.
Before installing nice_menus the tab title was showing number of new messages. With nice_menu it does not work any more.

For example when I check the menu links in the administrator/structure/menu page I have the link listed as "Messages (4 new)". But in the actual menu I still have the value of Menu link title - "Messages".

I don't exactly know how the mail module updates the menu link title so I don't know how to fix it. If I were to guess, it say that the implementation of nice_menus is missing translation function t() on the menu title.

CommentFileSizeAuthor
Screenshot.png90.13 KBpgancarski
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pgancarski’s picture

I solved the issue. It appears that Nice menus is using for the display the link_title field instead of title. Weather it is a bug or not I have no idea, but it is inconsistent with how the standard menus work.

I fix it with a following code

function mymodule_translated_menu_link_alter(&$item, $map){
    if($item['menu_name'] == 'main-menu' && $item['link_path'] == 'messages'){
        $item['link_title'] = $item['title'];
    }
}

(For the code to work, the menu link needs to have the alter flag set to TRUE)

xiukun.zhou’s picture

Status: Active » Closed (fixed)