Page 1 of 2

Translation en -> pt

Posted: 27.12.2006, 22:30
by zeraeiro
Hi,

I'm going to translate Celestia from English to Portuguese. I'm an astronomy educator and I'm also a professional translator from en to pt. I was going to use the partial translation from http://celestia.teyssier.org/i18n/ but it has some of the following:

msgid "Oct"
msgstr "Objectos"

Oct being October and "Objectos" being Objects. It is a really poor translation and therefore I'm doing it from scratch. I'm using this http://l10n.kde.org/docs/translation-howto// as a guide. But as far as I understood all you have to do is to insert the translation in front of msgstr.

I've already volunteered to translate celestia website to portuguese but chris haven't replied to me yet. Does he post here?

Thanks,

Jos?© Raeiro

Posted: 27.12.2006, 22:34
by zeraeiro
I'm trying to use poedit. It doesn't seem to want to open the pot file. May I open the celestia.pot file and then save it as pt.po, or should I use another scheme?

Posted: 28.12.2006, 19:36
by Christophe
Hi Jos?©,

I think the previous Portuguese translation was done by a Windows user at a time when i18n wasn't available under Windows. That may explain the poor quality of the translation. Of course you're very welcome to provide a new one.

Regarding the edition of the pot file; yes, you may rename it to pt.po and then POEdit should be able to open it.

Posted: 30.12.2006, 06:43
by zeraeiro
Hi,

The translation is almost ready, but I would like to give it a test drive before submitting it. How can I do so under windows?

Thanks,

Jos?© Raeiro

Posted: 30.12.2006, 09:27
by Christophe
That's not very easy to do. You need a full build system as the translations are stored in a DLL under Windows. Just send me the po file, I'll compile it and send the dll back to you.

Posted: 30.12.2006, 21:32
by zeraeiro
I've installed linux ubuntu. Is it easier to use the translations? I can't even find compiled packages for debian. I've searched google and this forum...

Thanks,

Z?©

Posted: 31.12.2006, 01:06
by Christophe
Yes, it is easier on Debian, but only in the sense that getting a build environment is easier.

There seems to be only an old version available for debian. This won't be of any help. The best is to build directly from CVS.

Packages you might want to install:

Code: Select all

aptitude install liblua50-dev kde-devel libtheora-dev g++ automake1.9 autoconf cvs


Then retrieve the source from CVS:

Code: Select all

cvs -d:pserver:anonymous@celestia.cvs.sourceforge.net:/cvsroot/celestia login
cvs -z3 -d:pserver:anonymous@celestia.cvs.sourceforge.net:/cvsroot/celestia co -P celestia


Generate the configure script:

Code: Select all

cd celestia
make -f Makefile.cvs


If you get errors about undefined macros (usualy GTK or GNOME macros), you'll need to install the corresponding devel packages and rerun make -f Makefile.cvs

Then you can proceed with the installation:

Code: Select all

./configure --with-kde --with-lua --prefix=/usr/local/kde/ --with-theora
make
sudo make install


Remember to add /usr/local/kde to your KDEDIRS variable, or use --prefix=$(kde-config --prefix)

To test your translation, simply place your po files in the po and po2 directories and rerun make/make install.

Posted: 31.12.2006, 08:08
by zeraeiro
Thank you very much for your explanation, with helps like this, one feels highly motivated to contribute.

I've managed to perform all commands, but I didn't understand the "Remember to add /usr/local/kde to your KDEDIRS variable, or use --prefix=$(kde-config --prefix)" part. How can I do this? Also, after make install how do I run celestia? I typed /.celestia in the working directory, and although it runs, I get a lot of errors before the celestia window appears, and in the GUI there aren't any celestia menus. I'm using ubuntu and gnome.

And what about the "normal" users? How can they have celestia translated with the normal download? Wouldn't it be easier to have a drop down menu to select the language? Is there any thread/how-to about this? If there isn't shouldn't we make one?

Thanks again,

Z?©

Posted: 31.12.2006, 09:33
by Christophe
zeraeiro wrote:I've managed to perform all commands, but I didn't understand the "Remember to add /usr/local/kde to your KDEDIRS variable, or use --prefix=$(kde-config --prefix)" part. How can I do this?

With the configure command I gave you, Celestia is installed in /usr/local/kde, which by default isn't known to KDE. KDE looks for data files only in its main directory which is usually /usr, you can find out what it is on your system by running 'kde-config --prefix'.

When installing software manualy, it is best to install under /usr/local, to avoid breaking software installed by a package (they never put files there).

To tell KDE that you have software in an alternate directory, you must set the KDEDIRS variable which, like the PATH variable, should be a list of directories separated by colons. You can set it either system wide: add "KDEDIRS=/usr/local/kde" to /etc/environment, or at the user level: add "export KDEDIRS=/usr/local/kde" to ~/.bashrc

You may also add /usr/local/kde/bin to PATH in /etc/environment or ~/.bashrc

zeraeiro wrote:Also, after make install how do I run celestia? I typed /.celestia in the working directory, and although it runs, I get a lot of errors before the celestia window appears, and in the GUI there aren't any celestia menus. I'm using ubuntu and gnome.

The broken GUI comes from the fact that KDEDIRS being not set, Celestia can't find its data files.

zeraeiro wrote:And what about the "normal" users? How can they have celestia translated with the normal download? Wouldn't it be easier to have a drop down menu to select the language?

"Normal" users aren't supposed to install software this way, if correctly packaged, Celestia behaves like any other app and automatically starts in the system's language if available.

You can manually change it by setting the LANG environment variable:

Code: Select all

$ LANG=pt ./celestia


zeraeiro wrote:Is there any thread/how-to about this? If there isn't shouldn't we make one?


No, there probably should be one, but those instructions vary from distribution to distribution, so it's difficult to be comprehensive.

Also note that, if you're not running KDE, you probably also need to install kde-i18n-pt to get the full menu of Celestia in Portuguese.

Posted: 03.01.2007, 19:27
by zeraeiro
Thanks for the how-to Christophe, I'm already test-driving the translation. I can't seem to find certain terms in the .pot file. Some menus are also not translated...will that be because of some subterms being marked fuzzy?

I've sent to celestia i18n the translation of the constellations. Did you receive it?

I would appreciate if you could compile the windows translation so that I could test it.

No, there probably should be one, but those instructions vary from distribution to distribution, so it's difficult to be comprehensive.


How about windows? Is it the same deal? Does Celestia run in the OS language when available?

Thanks,

Z?©

Posted: 03.01.2007, 20:36
by Christophe
zeraeiro wrote:Thanks for the how-to Christophe, I'm already test-driving the translation. I can't seem to find certain terms in the .pot file. Some menus are also not translated...will that be because of some subterms being marked fuzzy?

Can you give some examples? Some entries may have been added recently and may be missing from the pot, but it shouldn't be more than a couple.

Fuzzy entries are entries which were translated automatically based on the similarity with another msgid, in that case msgstr is displayed even if it may be an incorrect translation.

zeraeiro wrote:I've sent to celestia i18n the translation of the constellations. Did you receive it?

No, I haven't. At what address and what time did you send it?

zeraeiro wrote:I would appreciate if you could compile the windows translation so that I could test it.

No pb.

zeraeiro wrote:How about windows? Is it the same deal? Does Celestia run in the OS language when available?


Yes, the translation is selected from the system's language setting.

Posted: 04.01.2007, 07:32
by zeraeiro
No, I haven't. At what address and what time did you send it?

I've resent them just now from zeraeiro clixpt.

Yes, the translation is selected from the system's language setting


Imo there should be the option to choose the language as there is in various software. At least here in Portugal, there is a lot of people running legacy os's in english. My main objective doing this translation is to make it available for educational purposes, schools, kids @home etc. I always use en versions. Is the installation process for windows available in Portuguese? If not I'll gladly translate the installer.

Later on I'll translate the controls and the scripts.

Cheers,

Z?©

Posted: 04.01.2007, 08:42
by Christophe
zeraeiro wrote:I've resent them just now from zeraeiro clixpt.

Ok, GMail had flaged it as spam. I have it now. I'll commit it tonight. You can send me the other file too if you want me to compile the Windows dll.

zeraeiro wrote:Imo there should be the option to choose the language as there is in various software. At least here in Portugal, there is a lot of people running legacy os's in english. My main objective doing this translation is to make it available for educational purposes, schools, kids @home etc. I always use en versions. Is the installation process for windows available in Portuguese? If not I'll gladly translate the installer.


I understand the poblem. Setting the language in the installer is probably the best solution. The installer would produce a simple .bat file which sets the LANG environment variable before starting Celestia, and it would place a shortcut to this bat instead of the exe in the start menu. But I'm not familiar with the way the installer is made, this is Chris' job.

Posted: 09.01.2007, 09:55
by zeraeiro
Ok, I'll try to talk with Chris (I've sent him several messages concerning the translation of the website but couldn't get any feedback).

I've read somewhere that I could put the .po file online and then you could check it for changes from time to time. Is this possible? If it is you will be able to find it @ http://www.raeiro.com/celestia/files/pt.po

I've finished checking the translation and already sent it to you/uploaded it. I'll translate the controls file and the scripts and I'll send/upload them.

Some menus still appear in english. How about when the .pot file changes? Is there anyway to refresh it using poedit or anyother program under linux?

Thanks for your help :)

Posted: 09.01.2007, 10:21
by Christophe
zeraeiro wrote:I've read somewhere that I could put the .po file online and then you could check it for changes from time to time. Is this possible? If it is you will be able to find it @ http://www.raeiro.com/celestia/files/pt.po

Ok, it's still best to send me a notification when you update it. I haven't automated the process yet.

zeraeiro wrote:I've finished checking the translation and already sent it to you/uploaded it. I'll translate the controls file and the scripts and I'll send/upload them.

Ok, have you been able to test the Windows version with the files I sent you?

zeraeiro wrote:Some menus still appear in english. How about when the .pot file changes? Is there anyway to refresh it using poedit or anyother program under linux?


Did that happen under Linux or Windows? Can you give examples of the menu entries that are not translated?

Posted: 09.01.2007, 12:58
by zeraeiro
Ok, have you been able to test the Windows version with the files I sent you?


I haven't received any...when did and from what address did you send them?

I sent you a couple of minutes ago the other files.

Posted: 09.01.2007, 13:07
by Christophe
I sent the files to your gmail account from chris at teyssier.org on saturday morning at 0:28 CET.

Posted: 09.01.2007, 13:20
by zeraeiro
Gmail marked it as spam, Got them. How can I get the lastest pre-release? Sourceforge -> Download -> Install?

Posted: 09.01.2007, 13:39
by zeraeiro
Did that happen under Linux or Windows? Can you give examples of the menu entries that are not translated?


I only tested it under linux until now. For example almost the whole menu "Settings" is in English. Then there are things like "open" "quit" "view" and so forth.

Posted: 09.01.2007, 18:40
by Christophe
zeraeiro wrote:
Did that happen under Linux or Windows? Can you give examples of the menu entries that are not translated?

I only tested it under linux until now. For example almost the whole menu "Settings" is in English. Then there are things like "open" "quit" "view" and so forth.


Those entries are standard entries, they are already translated by KDE. All you have to do is install kde-i18n-pt.