When using the default 'Main menu' menu, and outputting that on the sitemap, the title, or menu name, isn't translated. There's is no way to change this title either (at least not that I can find). Adding t() around $menu['title'] isn't really good, since that could be a user defined string, but this needs a solution for core defined menus (Main menu, Navigation and User menu)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

blackdog’s picture

Status: Active » Needs review
FileSize
910 bytes

Here's a patch that runs the three core defined menus titles through t().

andypost’s picture

marked as duplicate #1094496: missing t()

andypost’s picture

marked as duplicate #1094496: missing t()

feo’s picture

Status: Needs review » Reviewed & tested by the community

+1 for this solution, nobrainer
Confirmation of the bug.
Patch tested, problem was resolved.

andypost’s picture

This approach is wrong - core should not translate user-entered strings. I think module should use the same as node/add

andypost’s picture

Priority: Normal » Major
Status: Reviewed & tested by the community » Needs review
FileSize
903 bytes

Core translates menu names so we should use the same as menu_block_info

Also there's a i18n code already comited in #1343588: Show menu names translated

current patch uses standard core's translation for menu names but allows i18n to work first

andypost’s picture

Priority: Major » Critical
FileSize
916 bytes

Menu title should be check_plain()'ed because render layer does not do this so this leads to security issue - user input could be printed directly

Currently without i18n module a menu title is printed directly, so this issue MUST be fixed.

darrell_ulm’s picture

Status: Needs review » Fixed

This is fixed in the latest 7.x-1.x-dev release.

Status: Fixed » Closed (fixed)

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