Skip to content

Contributing Translations

Sam Stuewe edited this page Nov 8, 2016 · 2 revisions

pbpst supports translations through gettext. The following procedure will walk you through the process to contribute translations.

Clone the Repo

$ git clone 'https://github.com/HalosGhost/pbpst.git'

If you wish to submit your translations in a PR at the end of this process, you should fork the repository first, and clone your fork rather than upstream.

Generate the .pot file

A .pot file is the template from which all .po files should descend. Rather than commiting this file to the repo itself, we provide a make target to generate it:

$ make pot

Copy the .pot to your .po

The .po file should be named for the language code. For example, if you were to translate pbpst for fr_FR, you would do the following:

$ msginit -i i18n/pbpst.pot -o i18n/fr_FR.po

msginit will ask you a few questions to make sure it gets the metadata correct.

Complete the translation

Use whatever editor you most prefer to complete the translations. This can be done with something as simple as vim or as powerful as poedit; use whatever you prefer.

Submit your translation

You can either commit the code on your fork and open a PR, or you can generate a patch file with git diff and attach it to an issue here proposing the translation (or an email sent to the repo owner).

Though PRs are preferred because they make the workflow simpler upstream, whichever works best for you is fine!

???

Profit! Please open an issue if you have any troubles!