Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Contributing Translations

kamalgill edited this page Sep 11, 2014 · 6 revisions

The Eucalyptus Management Console uses the standard gettext system for managing translations.

To contribute a translation...

  1. Review the locales listed at https://github.com/eucalyptus/eucaconsole/tree/develop/locale . If your locale isn't listed, submit a Jira ticket to add a new locale.
  2. Navigate to the locale's eucaconsole.po file you wish to add translations for. e.g. to contribute to the Italian translation, go to https://github.com/eucalyptus/eucaconsole/blob/develop/locale/it/LC_MESSAGES/eucaconsole.po
  3. If you have write access to the repo, click the "Edit" button and add your translation by filling in the msgstr placeholders in the .po file and save your changes by clicking the "Commit changes" button. A pull request will be opened, and the console team will compile the .po files into .mo files to complete the process.
  4. If you don't have write access to the repo, you'll need to fork the repo and make changes to the eucaconsole.po file in your fork, then open a pull request to submit your changes.

To contribute and test a translation…

  1. Fork the eucaconsole repo and follow the instructions to set up a development environment for running the console in the README, paying specific attention to the notes in the i18n section
  2. Review the locales listed at https://github.com/eucalyptus/eucaconsole/tree/develop/locale . If your locale isn't listed, you can add a locale by running the following command… python setup.py init_catalog -l [LOCALE_CODE] For example, to add a Portuguese locale, run python setup.py init_catalog -l pt
  3. Create the locale's eucaconsole.po files by running python setup.py update_catalog
  4. Add your translations to the eucaconsole.po file for your locale. For example, the Spanish locale's eucaconsole.po file is at https://github.com/eucalyptus/eucaconsole/blob/develop/locale/es/LC_MESSAGES/eucaconsole.po
  5. Run python setup.py compile_catalog to compile the eucaconsole.po file into a eucaconsole.mo file
  6. Commit your changes and open a pull request to contribute your translations

Notes

When editing translations, you can use smart gettext editors such as poedit or Loco instead of directly editing the eucaconsole.po files, although you may still need to run compile_catalog since the free versions of the editors may lack the compilation feature.

You may need to restart your console if you are testing translations on a local install, since the new translations aren't automatically picked up, even when the console is launched via the --reload flag