Developer forums (C::B DEVELOPMENT STRICTLY!) > Contributions to C::B

Errors in C::B that affect translations


These problems have been discovered by Swen Kupke when triing to adapt the german translation of C::B. May be present already since a long time, but I have not remarked them before.

Translating "&Edit" put some menu items at the wrong place, at the end of the "File" menu.
The problem comes from ccmanager.cpp, line 303 : should be _("&Edit") not wxT("&Edit")                => misplaced Show tooltips, Next call tip, Previous call tip in other languages than original English.

Translating "R&ecent file" put also some menu items at the wrong place.
The problem apparently comes from projectsimporter.cpp, line 73 : should be _("R&ecent files") not _T("R&ecent files") : wrong menuId result.

Strings Open... and &Open.... There is a potential problem with the test in line 140 in HexEditor.cpp : if ( label.Contains( _("Open...")) )
If in a translation file, the & is not in front of the 1rst letter, it will not work. For example in French, &Ouvrir... and Ouvrir... will be OK, but  &Ouvrir... and O&uvrir... won't ( for example because the translator has already used the O in another place and choosen to place the _ under the u (for Alt usage)).
More subtle with this same string : The current german file for "&Open..." contains "Öffnen…" and for "Open..." contains "Öffnen...". There is no &, but the problem is not here : it's the difference between "…" (1 character) and "..." (3 characters) which cause the problem in the test at line 140 in HexEditor.cpp. Here, correcting the translation file is sufficient, but may be the test could be less content dependent. Not obvious with this & character ! And there are other menu strings containing "Open..." !

Also in HexEditor.cpp, not an error but could be better, the string "Open With Hex Editor" appears 3 times but with 2 different cases (lines 111, 142 and 144) which needs 2 different translations strings. Only one could be better.


Post a patch please. I don't have time to turn your description into a patch and commit it.
Also I don't have any available translations to test the changes.

Here are a patch, for 3 cpp files.
In HexEditor, the problem with Open... and &Open... is not treated : need more reflexion.



--- Code: ---Also I don't have any available translations to test the changes.

--- End code ---
You'll find all you need for testing inside,1022.msg159075.html#msg159075
and more precisely in


In svn. If you have other fixes it is best to post patches.


[0] Message Index

Go to full version