Page 1 of 2

Translating Celestia

Posted: 18.12.2007, 17:17
by Spirit
Hi, excuse me if this topic has already been discussed. I would like to translate Celestia in Bulgarian. Can you give me some guidelines how to do it? I have some coding experience in C++, but I have never worked with such large projects. I have Windows Vista Home Premium and Visual C++ 2008 Express Edition.

Thanks!

Posted: 18.12.2007, 17:42
by Christophe
See this page for translation instructions.

Sadly there is no simple way to test your own translation under Windows short of setting up a full build system, and I'm not sure if Celestia builds with VC++ 2008 EE (can anybody confirm ?).

Otherwise, you can send me your .po files and I'll send you back the dll and mo files so that you can test it.

Posted: 18.12.2007, 17:59
by Spirit
May I have the following files in English, so that I can translate them:

1. celestia.pot: core, linux and win32 GUI, Solar System objects and Earth locations

3. Other files
- start.cel
- guide.cel
- demo.cel
- controls.txt

Only the second .po file is uploaded on the website that you provided. I start translating it.

PS I am a moderator in the Bulgarian Science Online Magazine forum and we get a lot of positive feedback regarding Celestia, so I decided to translate it since several users asked about a BG version.

Posted: 18.12.2007, 18:45
by Spirit
OK, I got the files from point 3. Need only the first file with the core data.

Posted: 18.12.2007, 19:03
by Christophe
The pot files are linked in the titles.

Posted: 18.12.2007, 21:31
by Spirit
I translated the file START.CEL and replaced it with the one in the Celestia main directory, but I get the following error:

Image

What's wrong? Here is the content of START.CEL:

[code]{
# ... ?

Posted: 18.12.2007, 22:03
by Vincent
Spirit,

You need to save your start.cel file using the UTF-8 format.
If your text editor doesn't give you this option, you can use, e.g., notepad2: http://www.flos-freeware.ch/notepad2.html (Choose UTF-8 encoding from the File>Encoding Menu)

Posted: 19.12.2007, 05:19
by Spirit
I traced the problem back to a rear Cyrillic symbol that I used. Now I have to translate the rest. It's time for work :D

Posted: 19.12.2007, 14:07
by Spirit
OK, already translated bg.po and bg.pot. They are accessible here both in a single ZIP file.

I am working on the scripts now. Already completed start.cel and guide.cel.

I will appreciate any help and further instructions.

Thanks!

Posted: 19.12.2007, 16:10
by Spirit
I translated it :D Well, at least some 99%. The rest I will do during the testing. I have the following files in Bulgarian:

bg.po
bg.pot
controls.txt
COPYING
guide.cel
start.cel

They are accessible from the bg.zip file. But I have some problems with them. The script files don't print Cyrillic characters in Celestia. I can only see the dots and commas. Tried different encoding charts. Current is UTF-8. controls.txt and COPYING work only with ANSI encoding (that is not a problem - it works). And bg.po and bg.pot are with UTF-8 encoding.

I hope that we could fix the problem and get the first test version of Celestia in Bulgarian. I am planning to upload it on the BG Science website and invite the guys from the forums I write in to help me test and improve the translation.

Hopefully it will work and we will have a nice translation of Celestia in Bulgarian.

Thanks!

Best regards,
Atanas Kumbarov

Posted: 19.12.2007, 16:39
by Christophe
The correct encoding to use is UTF-8 for all files.

The problem you're seeing is that the default texture fonts do not include Cyrillic characters.

There's an online tool available here to produce new texture fonts.

First you need to produce a new codepoint file, you can start from the default WGL4 one, and simply add the list of Unicode code points required by Cyrillic. You can browse the Unicode table here, that will probably be a subset of the 0400-0513 range.

You then have to produce a 12pts and 20pts bold version of the font.

Then save the txf files produced in the fonts\ directory of your Celestia installation as "sans12_bg.txf" and ""sansbold20_bg.txf".

Posted: 19.12.2007, 16:54
by Spirit
A couple of questions:

1. What TTF font file should I use?
2. Where do I get the default WGL4 file from? I searched my HDD and found nothing.

Thanks!

Posted: 19.12.2007, 16:58
by Christophe
Hum, it looks like my font tool is not working, I haven't restored it after my last server reinstall. I'll try and fix it quickly.

Posted: 19.12.2007, 17:03
by Christophe
Spirit wrote:1. What TTF font file should I use?
2. Where do I get the default WGL4 file from? I searched my HDD and found nothing.


You can use any font which includes Cyrillic glyphs. Arial should do.

The WGL4 file is linked in the Guide section of the texture generator page.

Posted: 19.12.2007, 17:32
by Christophe
ok, it's working now.

Posted: 19.12.2007, 17:44
by Spirit
All files -> UTF-8...
Created sans12_bg.txf...
Created sansbold20_bg.txf...
Copied to fonts directory...
Tested...
Result: no text

All files: bgwithfonts.zip

PS Added 0400 to 04FF in WGF4.

Posted: 19.12.2007, 17:50
by Christophe
The texture size you chose is too small, you can check that using the preview fonction.

For example, here it what it gives for your sansbold20_bg.txf file:
Image

as you can see, it is truncated and many characters are missing.

Posted: 19.12.2007, 18:04
by Spirit
I have the textures large and I can see all characters including the Cyrillic subset, but it still does not work.

The new TXF files: fonts.zip

Posted: 19.12.2007, 19:07
by Christophe
Not working too badly:
Image

The font is selected from the language code indicated in the catalog file, so you need to have your catalog compiled and installed for the automatic font selection to work.

Otherwise you can set the fonts manualy in celestia.cfg.

In the future, please use a po editor to translate the pot files, your po had several syntax errors.

The i18n page also indicates that "LANGUAGE" and "WinLangID" must be set to special values, that wasn't the case in your file.

I'll publish the windows dll and mo files here later tonight or tomorrow night.

Posted: 20.12.2007, 23:08
by Christophe
I've uploaded updated localization files for Windows for all languages here.

Simply unzip in your main installation directory and start Celestia normaly.

Let me know if it's working for you.