User forums => Help => Topic started by: kingfox on November 18, 2006, 07:03:57 am
Title: The help item I added disappeared when enabled "Internationalization"
Post by: kingfox on November 18, 2006, 07:03:57 am
I added some help file into "help" menu by help plugin. At that time, I desabled the "Internationalization" option. I can see the new items in "Help" menu, shown in the first attachment.
When I enabled the "Internationalization" option and switch to Chinese UI, I found the new items in "Help" menu were disappeared. Shown as the second attachment.
Is't a bug of C::B or something is wrong with the Chinese Language Pack ?
[attachment deleted by admin]
Title: Re: The help item I added disappeared when enabled "Internationalization"
Post by: thomas on November 18, 2006, 12:12:40 pm
Is't a bug of C::B or something is wrong with the Chinese Language Pack ?
It is not a bug of Code::Blocks, as this relates to a contrib plugin, not Code::Blocks itself. It is probably not a bug in that plugin, either, though. The likely reason is that "Help" is not properly translated in the Chinese language pack, so the plugin cannot find the menu to add items to.
The plugin does something like:
Code
index = menu.FindItem(_"Help"); if(index != wxNOT_FOUND) ....
Title: Re: The help item I added disappeared when enabled "Internationalization"
Post by: kingfox on November 19, 2006, 11:00:25 am
Thank you thomas, you are right. I read the code of the HELP plugin, the plugin use " int pos = m_pMenuBar->FindMenu(_("Help"));" to find the help menu. When I use the Chinese language pack, the string "help" was translated to "帮助"(sorry I have to use Chinese to describe this situation). So the help_plugin can't find the Chinese string and then can't work well. So, may be I should make a language pack for help_plugin.