// Get the default block name.
  $menu_names = menu_block_get_all_menus();
  menu_block_set_title(t($menu_names[$config['menu_name']]));

In the shown code the menu names are translated. The problem is that menu_block_get_all_menus() already returns translated strings making a translation of the already translated name.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lund.mikkel’s picture

JohnAlbin’s picture

Status: Needs review » Fixed

Yep. I dug into the underlying function calls. You are correct.

Fixed. http://drupalcode.org/project/menu_block.git/commitdiff/f761d34

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

alexverb’s picture

Status: Closed (fixed) » Needs review
FileSize
969 bytes

It looks like this is a case of inappropriate use of the t() function. I couldn't get the menu title appear translated in any way. The following patch against 7.x-2.x fixes this issue.

I don't know if menu_get_menus() is in the wrong here but don't have time to dig in to this issue.

Hope this helps...

Dave Reid’s picture

Version: 7.x-2.3 » 7.x-2.x-dev
Issue summary: View changes
Status: Needs review » Needs work

We cannot rely on a i18n module function without it being a dependency.