Translation maintainance

Now that you have made your plugin translatable, how do you actually get it translated? In general you only need to worry about this, when developing an external plugin. For plugins in RKWard's main repository, all the magic is done for you. Here is the basic workflow for a external plugins. Note that you need the "gettext" tools, installed:

  • Mark up all strings, providing context and comments as needed

  • Run python3 scripts/update_plugin_messages.py --extract-only /path/to/my.pluginmap. scripts/update_plugin_messages.py is not currently part of the source releases, but can be found in a source repository checkout.

  • Distribute the resulting rkward__POID.pot file to your translators. For external plugins, it is recommended to place it in a subfolder "po" in inst/rkward.

  • Translator opens the file in a translation tool such as lokalize. Actually, even if you are not going to prepare any translation, yourself, you should try this step for yourself. Browse the extracted strings looking out for problems / ambiguities.

  • Translator saves the translation as rkward__POID.xx.po (where xx is the language code), and sends it back to you.

  • Copy rkward__POID.xx.po to your sources, next to rkward__POID.pot. Run python3 scripts/update_plugin_messages.py /path/to/my.pluginmap (Note: without --extract-only, this time). This will merge the translation with any interim string changes, compile the translation, and install it into DIR_OF_PLUGINMAP/po/xx/LC_MESSAGES/rkward__POID.mo (where xx is the language code, again).

  • You should also include the non-compiled translation (i.e. rkward__POID.xx.po) in your distribution, in the "po" subdirectory.

  • For any update of your plugin, run python3 scripts/update_plugin_messages.py /path/to/my.pluginmap to update the .pot file, but also the existing .po-files, and the compiled message catalogs.