Author Topic: translation don't appear complete in the IDe  (Read 1648 times)

Offline rechtsanwaltsteyer

  • Multiple posting newcomer
  • *
  • Posts: 18
translation don't appear complete in the IDe
« on: April 15, 2025, 06:31:25 pm »
I'm using Code::Blocks 25.03 under Kubuntu and created my own translation file for german language and copied it to /usr/share/codeblocks/locale/de_DE/. Most translations are displayed in the IDE. However, the following (here under msgstr) are not. Instead the english version appears.
Here is an excerpt from the po file:
#: src_xrc.cpp:4
msgid ""
"If you right-click a Code::Blocks project/workspace in explorer, you will see\r\n"
"two extensions: \"Build\" and \"Rebuild (clean)\" (windows only).\r\n"
"The arguments configured here, are used by those two extensions.\r\n"
"You could specify, for example, a profile/personality to use for batch builds.\r\n"
"\r\n"
"The relevant command-line arguments are (all are optional):\r\n"
"\r\n"
"-na: don't perform any association checks\r\n"
"-nd: don't start a DDE server\r\n"
"-ns: don't display a splash screen while loading\r\n"
"-p : the profile to use: \"ask\" or <profile-name>\r\n"
"\r\n"
"--target: work only on <target> for \"Build\" or \"Rebuild (clean)\"\r\n"
"--no-batch-window-close: do not auto-close log window when batch build is done\r\n"
"--batch-build-notify: show message when batch build is done"

msgstr ""
"If you right-click on a Code::Blocks project/workspace in Explorer, you will see\r\n"
"two extensions: \"Build\" and \"Rebuild (clean)\" (Windows only).\r\n"
"The arguments configured here will be used by these two extensions.\r\n"
"For example, you could specify a profile/personality to use for batch builds.\r\n"
"\r\n"
"The relevant Command-line arguments are (all are optional):
"\r\n"
"-na: do not perform association checks\r\n"
"-nd: do not start a DDE server\r\n"
"-ns: do not display a splash screen on load\r\n"
"-p: the profile to use: \"ask\" or <profile-name>\r\n"
"\r\n"
"--target: only works on <target> for \"Build\" or \"Rebuild (clean)\"\r\n"
"--no-batch-window-close: do not automatically close the log window when batch build is complete\r\n"
"--batch-build-notify: display a message when batch build is complete"

The syntax seems to be correct. What could be the problem? Code::Blocks?
Greatings
Georg Michael Steyer, Rechtsanwalt

Offline gd_on

  • Lives here!
  • ****
  • Posts: 822
Re: translation don't appear complete in the IDe
« Reply #1 on: April 16, 2025, 11:19:38 am »
The message in msgid must be exactly equal to the message contained in the code. In your example, I see these lines are ended by \r\n, so Windows endlines. In the xrc file from which these strings are extracted, it's only a "&#x0A;" (xml syntax) so a \n.
I also see that in your case the line is extracted from src_xrc.cpp, but for me these strings are in app_compiler_settings.xrc.
Did you tried to use the german translation provided in https://translations.launchpad.net/codeblocks-gd? or the extracted .pot file that I regularly update?
May be, your extracting tool does not work as it should.

May be you can also participate to the common work of translating in German (you may have to create an account on https://launchpad.net/codeblocks-gd). Many strings are still not translated on Launchpad for German.
Have also a look in the C::B forum, last posts in https://forums.codeblocks.org/index.php/topic,1022.270.html. (where your name appears).
Joined the last tool I use on Windows and my last .pot file. I use generally the .bat file which calls the .bash. It needs to have a bash version on Windows. (But I can also use the .cmd which uses Windows commands but still need some unix-like tools easily found in msys2).

PS: just to be sure, strings in msgstr which are supposed to be translated in german, are here in English with only a few different letters. I suppose that it's only to show the problem you have, not the strings you want to have to be translated!
« Last Edit: April 16, 2025, 12:06:46 pm by gd_on »
Windows 11 64 bits (24H2), svn C::B (last version or almost!), wxWidgets 3.2.8 (tests with 3.3), Msys2 Compilers 15.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).