News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Errors in C::B that affect translations

Started by gd_on, July 31, 2019, 05:00:22 PM

Previous topic - Next topic

gd_on

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.

gd_on


Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

oBFusCATed

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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

gd_on

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

gd_on
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

gd_on

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

You'll find all you need for testing inside http://forums.next.codeblocks.org/index.php/topic,1022.msg159075.html#msg159075
and more precisely in https://translations.launchpad.net/codeblocks-gd

gd_on
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

oBFusCATed

In svn. If you have other fixes it is best to post patches.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]