Hello Team...
We have some volunteers and some skeleton programming effort done to support internationalization of the text strings in
opencpn.
The purpose of this thread is to educate potential translators, coordinate the effort, and discuss the issue in general.
So, here is my proposal:
Translation Workflow.
1. Each Beta and Production release of
opencpn will include a .pot (message template) file called
This file is in a Uniform standard format and generated by xgettext run against the
current opencpn source tree.
This file may be retrieved from the sourceforge cvs tree by the following command (from linux)
Code:
cvs -z3 -d:pserver:anonymous@opencpn.cvs.sourceforge.net:/cvsroot/opencpn checkout -P opencpn/po/opencpn.pot
2. Those wishing to supply translations for opencpn messages (translators) should do the following:
copy the opencpn.pot file to another file whose name follows a standard format.
For example, a French translator will do this:
$cp opencpn.pot opencpn_fr_FR.po
UK
English translator will do something like:
$cp opencpn.pot opencpn_en_GB.po
etc.
3. Translators will edit the copied file, supplying translations for the indicated strings. You may use any text editor, or you may use poedit, whcih is a nice wxWidgets GUI application built just for this purpose.
For example, here is a piece of opencpn.pot
#: src/chart1.cpp:910
msgid "Cannot create opencpn home directory"
msgstr ""
Translator's job is to fill in the entry msgstr"" with a translated string. Easy, if you know both languages well.
4. Last step is to compile the .po file into a .mo file. This may be done from within poedit, or you may use the
linux CLI utility msgfmt for the job.
5. Send the resulting .po and .mo files to me by
email, and I will integrate them into the build and next release of opencpn.
6. You may test the .mo file locally by copying it into the directory:
Code:
{wherever opencpn executable lives}/lang
Set your system locale to the desired language_region. Run opencpn as usual. Admire your
work.
7. When we make a new release, your
work up to this point will not be
lost. We plan to merge the existing .po files with a new .pot master file, creating new .po files which will be available for CVS checkout, edit, and update.
This is a new process for me, so there will doubtless be hiccups as we bring it online. I welcome comments/shortcuts/clarifications from others who may have done this work before.
Lets give this a try and iron out the wrinkles as we find them.....
Dave