Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: nanyu on September 22, 2008, 07:58:25 am

Title: a little bug of "help plugin"
Post by: nanyu on September 22, 2008, 07:58:25 am
in the file : 
codeblocks\src\plugins\contrib\help_plugin\help_plugin.cpp
line : 364  in function : HelpPlugin::AddToHelpMenu(...)

int pos = m_pMenuBar->FindMenu(_("Help"));

-------

now , I try to convert the language of C::B from english to chinese,

m_pMenuBar->FindMenu(_("Help")) maybe return a -1?





[attachment deleted by admin]
Title: Re: a little bug of "help plugin"
Post by: WNiva on November 09, 2008, 10:27:04 pm
I have found the same bug with german translation.
I have insert "&" in the line:
  int pos = m_pMenuBar->FindMenu(_("&Help"));
With the current SVN version compiled works with german translation perfect.

But where can insert this change in the current version ?
(I can not transmit my changes to SVN)
Title: Re: a little bug of "help plugin"
Post by: Ceniza on November 10, 2008, 08:26:39 pm
There you go. Revision 5300.
Title: Re: a little bug of "help plugin"
Post by: nanyu on November 10, 2008, 10:44:11 pm
thanks! very good! 

But almost all the plug-in's menu item can find the same bug.
Could Ceniza notice all plug-in 's authors this bug and solve it?

thanks again.
Title: Re: a little bug of "help plugin"
Post by: killerbot on November 11, 2008, 09:43:55 am
thanks! very good! 

But almost all the plug-in's menu item can find the same bug.
Could Ceniza notice all plug-in 's authors this bug and solve it?

thanks again.


can you say which plug-ins ? I will try to fix them.
Title: Re: a little bug of "help plugin"
Post by: nanyu on November 11, 2008, 03:25:43 pm
Really good! I am a part-time teachers. I teach my students to learn c + +, but also teach them to learn how to use the Code:: Blocks.

A . File

(1)  Item "Open with the HexEditor" will become the last position after translate.
      why? I guess it was "FindMenu(something)" return -1.

(2) (3) Before translate,  Item "Import project" and "Save" was been separated, but now in a group.

(4)  Item "Export" was lost after translate.

----
to be continue...

[attachment deleted by admin]
Title: Re: a little bug of "help plugin"
Post by: nanyu on November 11, 2008, 03:36:34 pm
B . View
(1), (2)  the items in the red rectangle were lost after translate.

[attachment deleted by admin]
Title: Re: a little bug of "help plugin"
Post by: nanyu on November 11, 2008, 03:54:18 pm
C. Search

(1),(2) "Incremental search" and "Thread search" were lost...

(3) : the items in the blue rectangle cann't  be translate although I have make translation in codeblocks.mo file.
         (The same thing happened in many of the plug-ins interface/dialog)


[attachment deleted by admin]
Title: Re: a little bug of "help plugin"
Post by: killerbot on November 11, 2008, 03:58:13 pm
rev 5301 ; can you check for the "Open with hexEditor", that one should be fixed.
rev 5302 : Export should survive ;-)
rev 5303 : Import project/save fixed
rev 5304 : BrowseTracker done
rev 5305 : View menu should be ok now
rev 5306 : Search menu : the disappearing entries are solved
rev 5307 : Project menu : done
rev 5308 : menu entry "Edit startup script" can now be translated

More to come ....
Title: Re: a little bug of "help plugin"
Post by: nanyu on November 11, 2008, 04:18:59 pm
D. Project

Autoversioning
Increment Version
Changes Log
-----------there were lost after translate

E. Build . everthing OK.  :D
F. Debug everthing OK.  :D :D

G. wxSmith
   "wxSmith" can be translate well. and the last item : "&Configure wxSmith for current project " OK also.
   But these three items:
   Add wxPanel
   Add wxDialog
   Add wxFrame
   Can't been translate even if I have make translation in codeblocks.mo file.

H. Tools .. OK!   (do not require the menu items come from user's config)
I. Plugin .. OK!  (do not ...)

K. Setting :
   file : "...\Application Data\codeblocks\share\codeblocks\scripts\startup.script"
   line  17 : + _T("/-Edit startup script"), _T("edit_startup_script.script"), false);
    change to -------->
            + _T("/-") + _("Edit startup script"), _T("edit_startup_script.script"), false);
 
   now , the menu item "Edit startup script"  can be translate .

L. Help
   I have already described about "Help" menu item.

 ----------------------------------------------------------
Windows XP + Code::Blocks (5299) + Mingw32 gcc (3.4x)
 ----------------------------------------------------------
attach : codeblocks.mo / .po (zh_CN)


[attachment deleted by admin]
Title: Re: a little bug of "help plugin"
Post by: nanyu on November 11, 2008, 04:38:38 pm
killerbot ,  Really solved? your action really faster! could you send a Nightly build version to me? I am waitting.
here is my msn: nanyu1234#hotmail.com  (#->@)
Title: Re: a little bug of "help plugin"
Post by: killerbot on November 11, 2008, 04:41:16 pm
you don't build them yourself, so you need a nightly ?

Will build one later today.

Currently I fixed the ones that move position and the ones that disappear.
The ones that can NOT be translated aren't fixed yet.
Title: Re: a little bug of "help plugin"
Post by: killerbot on November 11, 2008, 04:46:09 pm
For the moment I can't figure out why some entries in the search menu refuse to be translated. in code it looks the same :
Code
    pos = menuBar->FindMenu(_("Sea&rch"));
    if (pos != wxNOT_FOUND)
    {
        m_SearchMenu = menuBar->GetMenu(pos);
        m_SearchMenu->Append(idMenuGotoFunction, _("Goto function...\tCtrl-Alt-G"));
        m_SearchMenu->Append(idMenuGotoPrevFunction, _("Goto previous function\tCtrl-PgUp"));
        m_SearchMenu->Append(idMenuGotoNextFunction, _("Goto next function\tCtrl-PgDn"));
        m_SearchMenu->Append(idMenuGotoDeclaration, _("Goto declaration\tCtrl-Shift-."));
        m_SearchMenu->Append(idMenuGotoImplementation, _("Goto implementation\tCtrl-."));
        m_SearchMenu->Append(idMenuOpenIncludeFile, _("Open include file\tCtrl-Alt-."));
    }

The "Goto function..." is translated but the other are NOT.
Title: Re: a little bug of "help plugin"
Post by: killerbot on November 11, 2008, 04:57:18 pm
maybe the wx :Add wxXXX can be translated now : note each consists out of 2 parts "Add" and "wxXXX" (rev 5309)
Title: Re: a little bug of "help plugin"
Post by: nanyu on November 11, 2008, 05:05:40 pm
"The "Goto function..." is translated but the other are NOT. "

oh, I see now. this isn't a bug of c::b.   they can NOT be translated  just because

in my “.mo” file, the caption of these menu item was without "hot key"

etc :"Goto previous function\tCtrl-PgUp" in my mo file, it is ""Goto previous function" since these commands
maybe have no hot key long long ago.

(yes.. "Goto..." menu items now can be translated, aft I append the part of hot key)

-------------------
btw I was build c::b by myself, but have a link fail: "cannot find -lwxmsw28u".
and the linker setting, i found "wxmsw28$(WX_SUFFIX)" ... HOW the WX_SUFFIX work?
and the search directoies , i found $(#WX.lib)\gcc_dll$(WX_CFG)\msw$(WX_SUFFIX), I don't understand them...sorry. can you give me some hints?
i am in winxp + mingw32 + gcc, and i have the wxWidgets build (version 2.8.8 and 2.8.9) thks!

------------
:D i known the WX_SUFFIX = 'u' , and next step, i need a mono wxWidgets dll. ...