Version 2 (modified by szabgab, 5 years ago) (diff)

adding a translation

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.

  1. Check out the current sources of Padre from the subversion repository.
  2. "cd" to the directory "share/locale/" in the Padre directory.
  3. Delete the file "messages.pot".
  4. Exceute
    find ../../lib -name '*.pm' > files.txt
    to gather the list of Perl modules from which the strings will be extracted.
  5. 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.
    1. In case of updating a already existing language execute
      msgmerge -o <lng> <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.
    2. 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.
  6. 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

  1. Create the .po file and add it to SVN
  2. Add it to MANIFEST
  3. Change lib/Padre/Wx/ (the %languages and %shortname_of )
  4. Add yourself to lib/ and lib/Padre/Wx/Menu/ for the credit
  5. Changes