Closed (fixed)
Project:
Internationalization
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
27 May 2008 at 07:09 UTC
Updated:
9 Jul 2008 at 09:32 UTC
Jump to comment: Most recent
Hi,
in i18nmenu.module there is a little typo that prevents the menu strings from being refreshed on the "Translate interface" page. The following patch replaces "profile" by "menu" in hook_locale.
| Comment | File | Size | Author |
|---|---|---|---|
| i18nmenu.locale_refresh.patch | 374 bytes | Frank Steiner |
Comments
Comment #1
Anonymous (not verified) commentedOk, I see that this is actually not enough because even if the locale hook is now running, it fails to find menu strings that were created when creating a new page. If you select a menu title for the page, it will be stored with the
customized=falseso the checkif ($link['customized'])ini18nmenu_localize_treewill fail. Therefore such menu strings won't be found when refreshing the strings.customizedis only set to true if a menu entry is somehow edited on the Site Building>>Menus pages, but of course this is not nice. A user usually creates a page with a menu entry and a language, then goes to "Translate interface" and expects to find the menu title there, so that it can be localized before translating the page.So we have two options: Remove the
if ($link['customized'])fromi18nmenu_localize_treeor define$item['customized']=1;in the function18nmenu_menu_link_alter. Maybe that's what you plan todo with// @ TO DO: Refresh textsthat's noted in this function.I'm not sure what's the right solution, so I don't offer a patch here. For my purposes I've removed the check in
i18nmenu_localize_treewhich seems to work fine. Now I can immediately find and translate every new menu that I've created when creating a new page.Comment #2
AaronCollier commentedEither of those solutions sounds complicated (I mean maybe effecting other things as well). Not sure which way I'd vote. Could you do a patch for both and we could try testing both?
Comment #3
Anonymous (not verified) commentedHmm, I don't now what's wrong at the moment, but I cannot attach the patches. They just don't show up after atacching and posting the comment. I will try again later :-)
Comment #4
Anonymous (not verified) commentedOk, I don't know what's wrong with those files :-( I can attach other patches in other posts, but not the i18n patches here, so I post them.
Patch 1:
Patch 2:
Comment #5
AaronCollier commentedGenerally, when providing patches, you can assign issues to yourself.
Comment #6
Anonymous (not verified) commentedAh, I didn't know that!
Comment #7
jose reyero commentedApplied the first patch, about the typo in locale hook.
About the second part, menu items for nodes (is it what we are talking about?) don't need to go through menu translation as the menu system will just show the menu items for the nodes in the current language.
So I mark this one as fixed, please reopen if you want to follow up with the second part.
(Frank, you can assign issues to yourself any time you are willing to work and follow up on them, just to let us know someone's taking care of the issue....)
Thanks
Comment #8
Anonymous (not verified) commentedHi Jose,
> menu items for nodes (is it what we are talking about?) don't need to go through
> menu translation as the menu system will just show the menu items for the nodes in the current language.
yes, we are talking about menu items for nodes. And with what you just stated, I'm even more confused what exactly "Localized menus" should be :-) Maybe you can say sth. about it in this thread: http://drupal.org/node/230868
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.