Context Navigation

Short introductory guide to translating Padre

The following is intended for people who work on unix-ish operating systems and have no fear for the command line.

But even If you do not belong to that group you have no excuse for not contributing a translation since you may use ​Poedit.
Poedit is a graphical tool that supports extraction and translation of messages and runs on a variety of platforms including MS Windows. The author of this text, however, has not used Poedit himself and thus cannot provide a field report.

If you chose to work on the command line the following is a short intro which describes the steps I took. It does not cover all features of the tools used - please refer to the fine manuals of the respective program.

Before you begin, please make sure that you have the GNU gettext utilities installed.

Check out the current sources of Padre from the subversion repository.

"cd" to the directory "share/locale/" in the Padre directory.

Delete the file "messages.pot".

Exceute

find ../../lib -name '*.pm' > files.txt

to gather the list of Perl modules from which the strings will be extracted.

Execute

xgettext -o messages.pot -f files.txt

to extract the strings to translate from the given list of files and have them written to the message template file.

In case of updating a already existing language execute

msgmerge -o <lng>.po.new <lng>.po messages.pot

This will merge the already existing translations and the new template file, resulting in a new file that you now need to edit.
Be careful to check the already existing translations: The merging might produce wrong results.

In case of creating a totally new translation execute

msginit -i messages.pot -o <lng>.po -l <lng_CC>

Where <lng_CC> is the locale id with language and country ids. Eg.: de_DE or en_US.

Add new files to the repository or - if you don't have write access - either send the updated "messages.pot" and the .po file to the padre development mailing list or open a new ticket and attach the files to it.

Adding a translation

Create the .po file and add it to SVN

Add it to MANIFEST

Change lib/Padre/Wx/Mainwindow.pm (the %languages and %shortname_of )

Add yourself to lib/Padre.pm and lib/Padre/Wx/Menu/Help.pm for the credit