Translation using gettext

From Stellarium Wiki
(Difference between revisions)
Jump to: navigation, search
(Undo revision 12340 by Thebig-J (talk))
 
(22 intermediate revisions by 11 users not shown)
Line 1: Line 1:
If you speak a non-english language, please considere contributing to the developement of Stellarium! It is quite easy :
+
==Introduction==
 +
If you speak a non-english language, please consider contributing to the development of Stellarium! It is quite easy, and thousands of people will have a chance to enjoy your work.
  
From version 0.8.0, stellarium fully supports translation into other languages. The translation is performed using gettext. All the strings used in the program are translated and saved in special .po files. These .po file can be edited using a text editor or special program such as Kbabel. An easier way (but less efficient) is to use the [http://launchpad.net/products/stellarium/+translations Rosetta] facility which allow to translate Stellarium online.
+
==How to==
 +
From version 0.8.0, Stellarium fully supports translation into other languages. The translation is performed using gettext. All the strings used in the program are translated and saved in special .po files. These .po files can be edited using a text editor or special programs such as Kbabel or POedit.  
  
Once your .po file is ready, you can compile it into a ".mo" file and test it in the program to check that everything is correct. For example, if you are french and work on "fr.po", save your compiled file "fr.mo" as "stellarium.mo" and copy it into the directory "..../stellarium/data/locale/fr/LC_MESSAGES/".
+
Once your .po file is ready, you can compile it into a ".mo" file and test it in the program to check that everything is correct. For example, if you are French and work on "fr.po", save your compiled file "fr.mo" as "stellarium.mo" and copy it into the directory "..../stellarium/data/locale/fr/LC_MESSAGES/".
  
Re-run stellarium and there you are! Don't forget to remain synchronized with the version of your .po file on Rosetta otherwise you may destroy other's people work. To keep in sync, alway restart to work from the last online version of the .po file, and always upload your modifs when you stop working on it.
+
Re-run stellarium, select your language, and there you are!
  
==software==
+
An easier way (but less efficient) is to use the [http://launchpad.net/products/stellarium/ Rosetta] facility which allows to translate Stellarium online, via a website:
  
[http://www.poedit.org/ POedit] po-file editor for Linux and Windows.
+
*[https://translations.launchpad.net/stellarium Stellarium's Rosetta page]
 +
** [https://translations.launchpad.net/stellarium/0.10/+translations Translation templates for series 0.10] (current; development in progress)
 +
** [https://translations.launchpad.net/stellarium/0.9/+translations Translation templates for series 0.9] (obsolete; as of December 2008, 0.9.1 was the last kind-of-stable release)
 +
** [https://translations.launchpad.net/stellarium/0.8/+translations Translation templates for series 0.8] (obsolete)
  
[http://kbabel.kde.org/ KBabel]  po-file editor for KDE environments
+
{| cellpadding="8"
 +
| bgcolor=#ff5a00 | '''WARNING'''
 +
If you work with an external editor like POedit or Kbabel, don't forget to remain synchronized with the online Rosetta version of your .po file. If not you may destroy the modifcations made by other contributors. To keep in sync, always restart work from the latest online version of the .po file, and always upload your modifications when you stop working on it. If you are not sure, it is safer to work only online in Rosetta.
 +
|}
 +
 
 +
==Software for translating Stellarium==
 +
*[http://www.poedit.net/ POedit]  po-file editor for Linux and Windows.
 +
*[http://kbabel.kde.org/ KBabel]  po-file editor for KDE environments
 +
 
 +
==Further reading==
 +
*[http://www.gnu.org/software/gettext/ gettext homepage]
 +
*[https://launchpad.net/rosetta Rosetta homepage]
 +
 
 +
[[Category:Development]][[Category:Translation]][[Category:Helping Stellarium]]

Latest revision as of 04:10, 5 July 2012

Contents

[edit] Introduction

If you speak a non-english language, please consider contributing to the development of Stellarium! It is quite easy, and thousands of people will have a chance to enjoy your work.

[edit] How to

From version 0.8.0, Stellarium fully supports translation into other languages. The translation is performed using gettext. All the strings used in the program are translated and saved in special .po files. These .po files can be edited using a text editor or special programs such as Kbabel or POedit.

Once your .po file is ready, you can compile it into a ".mo" file and test it in the program to check that everything is correct. For example, if you are French and work on "fr.po", save your compiled file "fr.mo" as "stellarium.mo" and copy it into the directory "..../stellarium/data/locale/fr/LC_MESSAGES/".

Re-run stellarium, select your language, and there you are!

An easier way (but less efficient) is to use the Rosetta facility which allows to translate Stellarium online, via a website:

WARNING

If you work with an external editor like POedit or Kbabel, don't forget to remain synchronized with the online Rosetta version of your .po file. If not you may destroy the modifcations made by other contributors. To keep in sync, always restart work from the latest online version of the .po file, and always upload your modifications when you stop working on it. If you are not sure, it is safer to work only online in Rosetta.

[edit] Software for translating Stellarium

  • POedit po-file editor for Linux and Windows.
  • KBabel po-file editor for KDE environments

[edit] Further reading

Personal tools
Namespaces
Variants
Actions
in this wiki
other languages
Toolbox