Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

On This Page:

Plugin Translations.

Managing translations for Revive Adserver plugins.

 


General Information

Translations for Revive Adserver plugins are packaged within the plugins themselves, to ensure that developers of plugins can include the required translations for the UI with their plugins, and not have to depend on the translations existing in the core Revive Adserver product.

Revive Adserver plugins use gettext .po/.mo files for managing translations.

Core Revive Adserver Plugins

Please note that for core Revive Adserver plugins, the generation of the binary .mo files is handled by the Crowdin project; so, similar to the way the core product translations are handled, it is only necessary to edit the required English language .po file(s) for the plugin in the master branch, and the changes will be automatically uploaded to Crowdin, translated by the community, and the updates made there will be periodically merged by the core Revive Adserver team into the master branch's core plugin .mo files, and will be included in the next release.

3rd Party Plugins / Core Plugin Deveopment

While the process of updating translations for core Revive Adserver plugins is relatively easy (i.e. edit the required English language .po file(s), and commit the changes to the master branch), this process is not suitable if you are developing a 3rd party plugin for Revive Adserver (i.e. one that is not going to be part of the core Revive Adserver product).

Similarly, this process does not allow developers changing core Revive Adserver plugin translations to see those changes in action before committing changes.

As a result, it may be necessary for developers to generate the .mo files for plugins manually - either because they will need these for their 3rd party plugin, or so that they can simply see the proposed changes to translations in a development environment.

Generating .mo Files

To generate a .mo file, the gettext msgfmt utility. For example:

cd plugins_repo/openxDeliveryLimitations/plugins/etc/Site/_lang
msgfmt -o en.mo po/en.po 

This will re-create the en.mo file, based on the en.po file, for the Site component of the plugin in the openxDeliveryLimitations directory.

For core Revive Adserver plugins, do NOT commit changed .mo files to the repository. See above for how .mo files are managed using Crowdin.

  • No labels