Translation en -> pt

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
zeraeiro
Posts: 32
Joined: 19.07.2006
With us: 18 years 4 months
Location: Porto, Portugal

Translation en -> pt

Post #1by zeraeiro » 27.12.2006, 22:30

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

Topic author
zeraeiro
Posts: 32
Joined: 19.07.2006
With us: 18 years 4 months
Location: Porto, Portugal

Post #2by zeraeiro » 27.12.2006, 22:34

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?

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #3by Christophe » 28.12.2006, 19:36

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.
Christophe

Topic author
zeraeiro
Posts: 32
Joined: 19.07.2006
With us: 18 years 4 months
Location: Porto, Portugal

Post #4by zeraeiro » 30.12.2006, 06:43

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

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #5by Christophe » 30.12.2006, 09:27

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.
Christophe

Topic author
zeraeiro
Posts: 32
Joined: 19.07.2006
With us: 18 years 4 months
Location: Porto, Portugal

Post #6by zeraeiro » 30.12.2006, 21:32

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?©

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #7by Christophe » 31.12.2006, 01:06

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.
Christophe

Topic author
zeraeiro
Posts: 32
Joined: 19.07.2006
With us: 18 years 4 months
Location: Porto, Portugal

Post #8by zeraeiro » 31.12.2006, 08:08

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?©

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #9by Christophe » 31.12.2006, 09:33

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.
Christophe

Topic author
zeraeiro
Posts: 32
Joined: 19.07.2006
With us: 18 years 4 months
Location: Porto, Portugal

Post #10by zeraeiro » 03.01.2007, 19:27

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?©

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #11by Christophe » 03.01.2007, 20:36

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.
Christophe

Topic author
zeraeiro
Posts: 32
Joined: 19.07.2006
With us: 18 years 4 months
Location: Porto, Portugal

Post #12by zeraeiro » 04.01.2007, 07:32

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?©

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #13by Christophe » 04.01.2007, 08:42

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.
Christophe

Topic author
zeraeiro
Posts: 32
Joined: 19.07.2006
With us: 18 years 4 months
Location: Porto, Portugal

Post #14by zeraeiro » 09.01.2007, 09:55

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 :)

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #15by Christophe » 09.01.2007, 10:21

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?
Christophe

Topic author
zeraeiro
Posts: 32
Joined: 19.07.2006
With us: 18 years 4 months
Location: Porto, Portugal

Post #16by zeraeiro » 09.01.2007, 12:58

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.

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #17by Christophe » 09.01.2007, 13:07

I sent the files to your gmail account from chris at teyssier.org on saturday morning at 0:28 CET.
Christophe

Topic author
zeraeiro
Posts: 32
Joined: 19.07.2006
With us: 18 years 4 months
Location: Porto, Portugal

Post #18by zeraeiro » 09.01.2007, 13:20

Gmail marked it as spam, Got them. How can I get the lastest pre-release? Sourceforge -> Download -> Install?

Topic author
zeraeiro
Posts: 32
Joined: 19.07.2006
With us: 18 years 4 months
Location: Porto, Portugal

Post #19by zeraeiro » 09.01.2007, 13:39

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.

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #20by Christophe » 09.01.2007, 18:40

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.
Christophe


Return to “Development”