< Celestia

From v1.5, Celestia fully supports internationalization (often abbreviated as i18n). Celestia i18n is processed using gettext, a service that allows for translation between different languages.

All the strings used in the program can be translated. For each language, the list of strings and their translation is saved in a .po file.

Using Celestia in another language

Celestia should automatically change the language it uses based on the computer's language. However, if you do not want to switch your computer's language and region, you can specially open Celestia using the command line:

MacOS X

  1. Open Terminal.
  2. Change the directory using cd to the directory that has Celestia (the Unix executable file).
  3. Type ./Celestia -AppleLanguages '(aa)', where aa refers to the language code, for example es being Spanish.
  4. Press Enter.

Windows

  1. Open Command Prompt (cmd.exe)
  2. Change the directory using cd to the directory that has Celestia
  3. Type set LC_MESSAGES=aa, where aa is the language code, and press Enter
  4. Type celestia and press Enter

Getting .po files

The .po files can be downloaded from the Celestia GitHub repository or from the table in the 'Celestia translation overview' section below.

Editing .po files

The .po files can be edited using the following software:

Updating existing .po files

The already existing .po files for a language can easily be updated to the latest version by using the celestia.pot. In poEdit this can be done with the command "Catalog/Update from POT file". This results then in the program showing a list of removed and changed or newly introduced strings. But be advised that the creation date of the .po file internally is not updated. KBabel should also have such a mechanism.

Creating a new .po file

  • Download the celestia.pot file from the GitHub repository.
  • Rename it using the ISO 639-1 code of your language.
  • Edit it as described in the above 'Editing .po files' section.

Adding completed .po files to Celestia

Either:

Building internationalization files from the source in MS Windows

  • Follow the Celestia build for Win 32 platform as described in Celestia/Development/Win32 platform. It is assumed that Celestia's source is in "c:\celestia" and other programs are installed in c drive, too.
  • Install perl (e.g. ActivePerl) and POEdit for Windows
  • Add path for POEdit (e.g. C:\Program Files\Poedit\bin). This is for msgfmt.
  • Open Windows command console (cmd.exe)
  • Execute "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"
  • Change directory with "cd C:\celestia\celestia\po" command
  • Run "perl translate_resources.pl". The translate_resources.pl script does:
    • translate resource files from po files -> src/celestia/rc/celestia_LL.rc
    • build dll files -> src/celestia/rc/celestia_LL.res -> locale/res_LL.dll
    • compile catalogs -> locale/LL/LC_MESSAGES/celestia[_constellations].mo

Building .txf font texture files

Celestia uses its own .txf font textures to display the OpenGL overlay text. Some non-Latin characters may be missing from the font textures wich are distributed with the standard Celestia package, though.
In that case, please use the following process to build celestia .txf font textures from standard .ttf fonts:

ttf2txf -w 1048 -h 1048 -f codepoints_LL.txt -s 12 -o sans12_LL.txf font.ttf
ttf2txf -w 1048 -h 1048 -f codepoints_LL.txt -s 14 -o sans14_LL.txf font.ttf
ttf2txf -w 1048 -h 1048 -f codepoints_LL.txt -s 20 -o sansbold20_LL.txf font_bold.ttf

This will create the following font textures which should be placed in the font/ dir:

  • sans12_LL.txf
  • sans14_LL.txf
  • sansbold20_LL.txf.

Note for Windows users:

  • A pre-compiled version of ttf2txf is available at: http://gvince.perso.sfr.fr/celestia/dev/ttf2txf.zip
  • The codepoints_LL.txt file is generated by running the translate_resources.pl perl script from the po/ dir. See Building internationalization files from the source in MS Windows section above.

Celestia translation overview

The translation process currently applies to Celestia 1.6.1 (development version).

>> Last celestia.pot file update: 2010-01-04

Main .po files

LanguageFileTranslatedFuzzyUntranslatedRevision DateLast Translator
arar.po58%335832006-06-05saudilink@lycos.com
bebe.po100%002010-11-15375gnu@gmail.com
bgbg.po68%284302008-01-27kumbarov@gmail.com
dede.po100%002010-01-29celestia-deutsch@gmx.net
elel.po86%12822010-01-25ckouz@uom.gr
eses.po100%002010-01-25abramson@cab.cnea.gov.ar
frfr.po100%002010-02-25gvince@sfr.fr
glgl.po100%002010-04-08xabiercs@terra.com
huhu.po100%002010-04-19zoltanszekely@hotmail.com
itit.po100%002010-03-31gvince@sfr.fr
jaja.po100%002010-03-13aqua@aqsp.net
koko.po100%002010-03-13blcktgr73@gmail.com
ltlt.po100%002010-03-02neoromancer@gmail.com
lvlv.po95%4602010-02-06sg30022@lanet.lv
nlnl.po100%002010-03-28myckel@sdf.lonestar.org
nono.po100%002010-12-05FreewareTips
plpl.po100%002010-02-05hippie_1968@hotmail.com
ptpt.po74%24642009-01-13zeraeiro@gmail.com
pt_BRpt_BR.po100%002010-04-03igorborgo@gmail.com
roro.po74%24642008-12-28oanaradu32@queeq.com
ruru.po100%002010-11-28leserg@ua.fm
sksk.po100%002010-04-13acelists@atlas.sk
svsv.po99%022010-03-27po@danielnylander.se
trtr.po28%06812011-01-02kde-i18n-doc@kde.org
ukuk.po100%002010-01-24yurchor@ukr.net
zh_CNzh_CN.po100%002010-04-047markerzli@gmail.com
zh_TWzh_TW.po100%002010-03-13iychiang1809@gmail.com

Constellation names .po files

LanguageFileTranslatedFuzzyUntranslatedRevision DateLast Translator
arar.po98%012006-06-05saudilink@lycos.com
bebe.po100%002010-11-02375gnu@gmail.com
bgbg.po100%002007-12-19kumbarov@gmail.com
dede.po100%002006-02-07schreiberste@web.de
elel.po100%002009-05-08ckouz@uom.gr
enen.po100%002005-08-06chris@teyssier.org
eses.po100%002006-02-03ElChristou
frfr.po100%002008-11-23vince.gian@free.fr
glgl.po100%002010-04-08xabiercs@terra.es
huhu.po100%002009-01-15zoltanszekely@hotmail.com
itit.po100%002006-08-11mausan66@tiscali.it
jaja.po100%002006-08-07aqua@aqsp.net
koko.po100%002010-01-26jaeuck@gmail.com
ltlt.po100%002008-12-04neoromancer@gmail.com
lvlv.po100%002006-12-14sg30022@lanet.lv
nlnl.po100%002006-08-02myckel@sdf.lonestar.org
nono.po100%002010-12-05FreewareTips
plpl.po100%002008-10-21hippie_1968@hotmail.com
ptpt.po100%002006-12-30zeraeiro@gmail.com
pt_BRpt_BR.po100%002009-02-18igorborgo@gmail.com
roro.po100%002008-12-28oanaradu32@queeq.com
ruru.po100%002006-05-27leserg@ua.fm
sksk.po100%002010-02-28acelists@atlas.sk
svsv.po100%002006-02-21po@danielnylander.se
ukuk.po100%002008-??-??dubyk@library.lviv.ua
zh_CNzh_CN.po100%002006-08-09zhaozhengxu@yahoo.com
zh_TWzh_TW.po100%002009-08-10alchen@tam.gov.tw

Other localizable files

The following files can be localized too: controls.txt, COPYING, demo.cel, guide.cel, start.cel.
These files can be edited using a simple text editor. For UTF-8 encoding, please consider using, e.g., notepad++
Once the translation is completed, just rename the file as controls_LL.txt, COPYING_LL, demo_LL.cel, guide_LL.cel, start_LL.cel, where LL represents the ISO 639-1 code of your language.
Once the translation is completed, these files can be sent to team@celestia.space.

LanguageLocalized Files
bgcontrols_bg.txtCOPYING_bgguide_bg.celstart_bg.cel
becontrols_be.txtdemo_be.celguide_be.celstart_be.cel
decontrols_de.txtCOPYING_dedemo_de.celguide_de.celstart_de.cel
escontrols_es.txtCOPYING_esdemo_es.celguide_es.celstart_es.cel
frcontrols_fr.txtCOPYING_frdemo_fr.celguide_fr.celstart_fr.cel
glcontrols_gl.txtCOPYING_gldemo_gl.celguide_gl.celstart_gl.cel
hustart_hu.cel
itcontrols_it.txtCOPYING_itdemo_it.celguide_it.celstart_it.cel
jacontrols_ja.txtCOPYING_jademo_ja.celguide_ja.celstart_ja.cel
kocontrols_ko.txtCOPYING_kodemo_ko.celguide_ko.celstart_ko.cel
ltdemo_lt.celguide_lt.celstart_lt.cel
lvdemo_lv.celstart_lv.cel
nlcontrols_nl.txtCOPYING_nldemo_nl.celguide_nl.celstart_nl.cel
nocontrols_no.txtdemo_no.cel
plcontrols_pl.txtCOPYING_pldemo_pl.celguide_pl.celstart_pl.cel
ptcontrols_pt.txtCOPYING_ptdemo_pt.celguide_pt.celstart_pt.cel
pt_BRcontrols_pt_BR.txtCOPYING_pt_BRdemo_pt_BR.celguide_pt_BR.celstart_pt_BR.cel
rucontrols_ru.txtCOPYING_rudemo_ru.celguide_ru.celstart_ru.cel
skcontrols_sk.txtdemo_sk.celguide_sk.celstart_sk.cel
svcontrols_sv.txtCOPYING_svdemo_sv.celguide_sv.celstart_sv.cel
trdemo_tr.cel
ukcontrols_uk.txtCOPYING_ukdemo_uk.celguide_uk.celstart_uk.cel
zh_CNcontrols_zh_CN.txtCOPYING_zh_CNdemo_zh_CN.celguide_zh_CN.celstart_zh_CN.cel
zh_TWcontrols_zh_TW.txtCOPYING_zh_TWdemo_zh_TW.celguide_zh_TW.celstart_zh_TW.cel
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.