Author Topic: The help item I added disappeared when enabled "Internationalization"  (Read 5578 times)

Offline kingfox

  • Multiple posting newcomer
  • *
  • Posts: 41
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]

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: The help item I added disappeared when enabled "Internationalization"
« Reply #1 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)
   ....
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline kingfox

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: The help item I added disappeared when enabled "Internationalization"
« Reply #2 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.