Author Topic: Code::Blocks' translation  (Read 315737 times)

Offline gd_on

  • Regular
  • ***
  • Posts: 494
Re: Code::Blocks' translation
« Reply #105 on: September 28, 2008, 10:25:25 am »
Thanks jens, I will try this.
I know "Internationalization" on the Wiki but I thought I could not use it because I don't have wxrc. But, finally I have found it's sources in wxwidgets install folder. So may be ... But, the batch file needs a serious update.
Nevertheless, it could be better if launchpad site was updated. Like this, translation work can be shared.

For the location of codeblocks.mo under Redhat pro 4.7, I tried both solutions (with fr_FR in my case), but without success. The strange thing is that it worked with Redhat pro 5 !

Gd_on
« Last Edit: September 28, 2008, 10:29:10 am by gd_on »
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Code::Blocks' translation
« Reply #106 on: September 28, 2008, 10:42:47 am »
I don't know the package layout of Redhat, but on debian (I use the packages from wxwidgets.org) "wxrc" is in package "wx-common".

Offline gd_on

  • Regular
  • ***
  • Posts: 494
Re: Code::Blocks' translation
« Reply #107 on: September 28, 2008, 07:48:07 pm »
My main machine is on Windows (Linux is at work, and I'm only a simple user, not an admin !!!)
Well, but on Windows XP (SP3), I have in my wxwidget install folder in utils\wxrc a source for wxrc and a .dsp file that I imported in C::B. Compilation is OK (but a few warnings). But at link time its says ld.exe cannot find -lwxbase28u_xml. So I suppose I need to build that library (or that dll), but I have not found how to do this. May be there is somewhere in the install folder a makefile or something else to build this wxrc.exe and all dll needed, but I have not found it.
I also tried to find on the web a wxrc.exe ready to use, but without success.

gd_on
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Code::Blocks' translation
« Reply #108 on: September 28, 2008, 09:23:44 pm »
I have only wx2.8.9 available, so with 2.8.8 it might differ, but I don't think so.

If you have wxWidgets build yourself it's quite easy:

  • open a console
  • change directory to the folder with the sources for wxrc ("[wxWidgets-root]/src/utils/wxrc")
  • type "mingw32-make -f makefile.gcc [the switches you used for wxWidgets]" (in my case "SHARED=1 MONOLITHIC=1 BUILD=Release UNICODE=1")
  • that creates a folder (e.g. "gcc_mswudll") including the "wxrc.exe"

If you put "wxrc.exe" somewhere in your searchpath (e.g. MingW's bin directory) you should be able to use it from any folder.

Offline gd_on

  • Regular
  • ***
  • Posts: 494
Re: Code::Blocks' translation
« Reply #109 on: September 29, 2008, 08:04:49 pm »
That's OK now. Thanks.
I had a few problems because there was a sh.exe in my MinGW\bin folder, causing a conflict (or an other problem) in the makefile. But after renaming it in shxxx.exe, it's ok.
A simple test on a few .xrc files gave me strings with a quite good look, so I think I can go further now....

gd_on
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline gd_on

  • Regular
  • ***
  • Posts: 494
Re: Code::Blocks' translation
« Reply #110 on: October 04, 2008, 04:47:28 pm »
I have built an updated version of the .pot file, used to localize Code::Blocks. Here, chains have been extracted from SVN 5241.
To built it, I have made a compromise between intl.bat, found on the wiki (Internationalization, see earlier) and the file extract.bash found on Code::Block SVN (in i18n folder).
On my Windows PC, as in SVN file, extract.bash is launched by an extract.bat file (but it's easy to have a pure .bat file, without bash !).
To use this .bash file on Windows, you need :
- bash.exe (a tool from bash Msys, found with MinGW32 on sourceforge)
- grep.exe, xargs (tools from Msys Core, found with MinGW) : the version I have does not support -P option (as used in extract.bash from i18n folder from Code::Blocks SVN), so I have to use it twice, first to work on .cpp files, and then on .h files separately)
- find.exe (a tool in findutils, found with MinGW)
- xgettext, msgcat (tools from gettext, found with MinGW but also with poedit software) : I use only the --keyword=_ option, and not --keyword=_T because I think that only the first type of strings (those beginning only by _), need to be translated, not  the second one (but may be I'm wrong !).
- wxrc (you can build it from wxWidgets, using the makefile.gcc found in wxWidgets\utils\wxrc (thanks to jens ! for helping me on that point). Wxrc uses wxmsw28u_gcc_cb.dll (or by default wxmsw28u_gcc_custom.dll depending how you customize config.gcc in wxWidgets\build\msw).
- poedit to translate and build the .mo file.

I copied .bat and .bash file within my codeblocks_svn folder at the same level than i18n folder. I called this folder i18n_gd (but it can be an other name).
Executables bash, grep, find, xgettext, msgcat, some libraries (.dll) used by xgettext (but found in the same folder than poedit), wxrc, wxmsw28u_gcc_cb.dll (or wxmsw28u_gcc_custom.dll), must be accessed with your path environment variable (in my case, I have a C:\MinGW\bin folder, declared within path, where all theses executables are put).
In my i18n_gd folder, I execute extract.bat. At the end, I obtain an All_codeblocks.pot file with all extracted character chains that may be translated. Don't worry if you see a few (many  :() warnings. It's not very important.
I had also to delete a few lines, in the .pot file, containing "#, c-format" (without quotes) because, in poedit, some strings were not correctly interpreted when building .mo file.
wxrc extract also some chains with a beginning $$, thought it should certainly be $ (not double $).
Those 2 operations are done manually on the pot file in a text editor. This could certainly be done automatically, using some tool !!!

With poedit, you can then merge this .pot file with a previous codeblocks.po file (after saving the initial versions, one never knows !).

It works quite well, but I'm not totally satisfied with the result, because :
- I think that some character chains do not need to be translated, but are extracted anyway (especially some ones found in .xrc resource files) ;
- when merging in poedit, some strings have slightly changed from the previous .po file and poedit does not always make the good choice, but anyway consider them as approximate translations. The problem, is that those strings do not appear as translated in the .mo file, and it's frustrating because it's a sort of regression compared to the previous .mo file where they were correctly translated.
- some operations are still manual (changing $$ by $, and suppressing "#, c-format" lines).

Anyway, I think the result is quite good, but now there is a great work to verify, update and translate new strings.

If it was possible to merge this .pot file with the previous one on launchpad site, it could be easier to share the translation work.

In the different zip files, you'll find the .bat and .bash files, the file All_codeblocks.pot obtained, and a preversion of All_codeblocks.po file for French (there are still more than 900 strings to verify and/or translate !!!). :shock:

gd_on


[attachment deleted by admin]
« Last Edit: October 16, 2008, 10:04:55 pm by gd_on »
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline gd_on

  • Regular
  • ***
  • Posts: 494
Re: Code::Blocks' translation
« Reply #111 on: October 04, 2008, 04:52:01 pm »
Oops ! My third file is too big for the previous post. May be ....

Gd_on

[attachment deleted by admin]
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline gd_on

  • Regular
  • ***
  • Posts: 494
Re: Code::Blocks' translation
« Reply #112 on: October 16, 2008, 10:01:48 pm »
OK. It seems very few persons are interested (1 download !!! :( )
Never mind, I continue. 8) 8) 8)
I have made new versions of the raw .pot file, and french .po and .mo files.
The tool, used to replace extract.bat and extract.bash in folder i18n (from svn) is here. It's the same as in a previous post describing the "How to" : http://forums.codeblocks.org/index.php/topic,1022.msg66337.html#msg66337
The .pot file extracted from svn 5273 is  here.
The .po and .mo file extracted from svn 5273 and partially translated in French is  here.
There is a total of 4795 character chains in the .pot file. In .po and .mo french files 318 are not translated and 5 are marked as approximately translated (As I don't use them currently :x, I'm not sure of the exact signification  :shock:). As you can see, we are very far from launchpad web site where there is "only" 2173 characters chains. Many work has been made by developpers. Thanks to them...To be honest, not all chains need to be translated, so the real number is less than 4795. :o

gd_on
« Last Edit: October 16, 2008, 10:07:55 pm by gd_on »
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline jfouche

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Code::Blocks' translation
« Reply #113 on: October 17, 2008, 01:37:01 pm »
OK. It seems very few persons are interested (1 download !!! :( )
It was me ;)

I read it, and didn't find errors, but as you know, it is a huge file. And I don't read the whole file in 1 time. I will continue to check your translation.

Good luck
--
Jérémie

Offline gd_on

  • Regular
  • ***
  • Posts: 494
Re: Code::Blocks' translation
« Reply #114 on: October 17, 2008, 04:30:25 pm »
Thanks. Look at the last files. It's better (I hope  :D)
But the base is the work found on launchpad. So, all is not my own work. Many guys have also contributed, but if their names are in Launchpad, they are not listed here in the .po file (and .mo of course). Sorry. :?

gd_on
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline blend

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Code::Blocks' translation
« Reply #115 on: October 30, 2008, 09:41:29 am »
I have installed your translation. This seems to be pretty good :)

There are just some strings I wouldn't have translated the same way:
 -(in "Extensions") Gestion des plugins -> Gérer les extensions instead of "Gestion des plugins" (why use "Extension" and "plugins"? Just use "Extensions" :) ),
 -(in the plugin manager) "Si un plugin est mal écrit, il peut faire planter Code::Blocks when performing any operation on it..." -> "Si une extension est défectueuse, celle-ci peut faire planter Code::Blocks lors de son usage..."

 -(in "Paramètres") "Compilateur et débugger" -> "Compilateur et débogueur" (typo),
 -(in the dialog box accessed via "Paramètres->Edition de scripts" sripts instead of scripts (caption typo),
 -(in "Paramètres") the string "Edit startup script" have not been translated I propose "Editer le script de démarrage",
 -(in "Paramètres->Environnement->Paramètres généraux") "Ne permet l'éxecution..." -> "Ne permettre l'éxecution...",
 -(in "Fichier") "Import project" -> "Importer un projet"
 -(in "Edition") "Mode surlignage" -> "Mode de coloration"
  "Commentaire" -> "Commenter"
  "Uncomment" -> "Dé-commenter"
  "Stream comment" -> "Placer la sélection en commentaire"
  (in the compiler options) "Replier tous les symboles..." -> "Retirer tous les symboles..."

If I find other things to report I will do it.

Anyway, it's good to see Code::Blocks translated in french :)
I hope Code::Blocks will be translated in others languages as there are lot of people who doesn't like Code::Blocks (and go to MS VS) because it is not translated into their language...

Offline gd_on

  • Regular
  • ***
  • Posts: 494
Re: Code::Blocks' translation
« Reply #116 on: October 30, 2008, 05:25:45 pm »
Thanks four your remarks.
I have included some of them (and some others) in my new versions (see below). As you know, many translations were already present on launchpad. So, a few inconsistencies are quite normal between translators.
OK for "Extensions" instead of plugins. Many corrections have been made in the .po file.
For "Import project", it's not my fault ! It was a problem in C::B because the string was identified by a _T and not a single _ . So this string is not translatable. Nevertheless, this has been corrected by "killerbot" and is available on svn (but apparently not in the last compiled nightly for Windows). Similar problem for the sentence beginning in French and ending in English. Here too, correction made by "killerbot".
For "Edist startup script", I agree with you and I had translated like that, but I seems this strings is not translatable (so, it has been eliminated by poedit. May be a _T here too and not a single _, but I'm not sure !
For "Mode surlignage", I prefer to keep my own word:
1) because there are other "surligner" elsewhere
2) I think "coloration" may be confused with "Colorisation", a word which is good for syntax highlighting. Here, in the usage context, it's more something to show selected words to the user, by a specific colorization (text and background), that's true, but "surligner" seems better for me.

Updated version of the tool is here. Need also sed tool. You'll find also a specific tool for windows (no bash need, but always MinGW supplementary tools as find, xargs, xgettext, sed,...).
Updated version of the .pot file, for svn 5295 is here : the raw extracted strings.
Updated version of the .po and .mo files, partially translated in French are here.

It could be better to update the .pot file on launchpad site, but I have not any idea how to do that, even if I can do that.

gd_on
« Last Edit: October 30, 2008, 06:00:24 pm by gd_on »
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline blend

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Code::Blocks' translation
« Reply #117 on: October 30, 2008, 07:23:21 pm »
Good job :) !

Now, C::B devers must do a step too... Please update .pot files on lunchpad and fix what need it! Would be much more easy for everybody :) .
I've downloaded PoEdit, I understand now why translating an app' is so hard... I will try to bring my contribution to the translation effort.

ps:  Why not create (a) translators team(s) by the way?
« Last Edit: October 30, 2008, 08:43:15 pm by blend »

Offline gd_on

  • Regular
  • ***
  • Posts: 494
Re: Code::Blocks' translation
« Reply #118 on: November 12, 2008, 07:22:24 pm »
A few updates to the .pot file extracted from svn 5309 are here.
Translation in French, also updated from svn 5309 in the .po and .mo file is here.
No changes to the extracting tools. see previous post.

gd_on
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline Xaviou

  • Regular
  • ***
  • Posts: 302
    • X@v's wxStuff
Re: Code::Blocks' translation
« Reply #119 on: January 26, 2009, 10:12:08 am »
Hi all.

I've tested this french translation, and it works fine : thanks !

There are some improvements to make to the C::B source to make it perfect  (I don't know if it is the right place to report this) :

First, the "New class wizard" doesn't works properly : when adding a new class witch inherits from another, the "scope" keyword (public, protected or private) is translated (but of course it shouldn't). This appends only for the scope keyword, not inside the class declaration.
For example, creating a class B inherited from a class A should be :
Code: [Select]
class B : public A
{
public:
B();
virtual ~B();
protected:
private:
};
But with the french translation, the code generated is :
Code: [Select]
class B : publique A
{
public:
B();
virtual ~B();
protected:
private:
};

Then, I think that the "Start here" page should also be translated. And for now, the only way to do this is editing the corresponding html file, and replacing the following texts :
  • Create a new project
  • Open an existing project
  • Visit the Code::Blocks forums
  • Report a bug
  • Request a new feature
And even when doing this, it is not fully translated : the "Recent projects" and "Recent files" titles stay in english.

Neverless, great work, gd_on, for the french translation ;)

Regards
Xav'

The french wxWidgets site : http://www.wxdev.fr
My wxWidgets's stuff : https://wxstuff.xaviou.fr/