wiki:TranslationIntro

Version 3 (modified by jquelin, 5 years ago) (diff)

--

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. Update the pot file with the "pot" action of "Module::Build".
    ./Build pot
    
    This will extract all strings to be translated from the Perl modules and have them written to the message template file.
    1. 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.
    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.
  3. 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 (note: only the .po file, not the .mo one).
  2. Add it to MANIFEST
  3. Change lib/Padre/Wx/Mainwindow.pm (the %languages and %shortname_of )
  4. Add yourself to lib/Padre.pm and lib/Padre/Wx/Menu/Help.pm for the credit
  5. Update the Changes file to brag about this new translation! :-)

Attachments