Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

Editing .po Files

...

/ Generating .mo Files

There is no need to edit .po files or generate .mo files for core Revive Adserver plugins.

When master English translation strings are added to, or updated in, core Revive Adserver plugins, and committed to the master branch, a script is automatically run to look for new strings in plugin code and add them to the .po files.

From here, translations are managed through Crowdin, and the .po and .mo files are updated for use by the core team on a regular basis.

3rd Party Plugins

...

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.

...

Generating .po Files

Accordingly, if you are developing your own plugins which are not part of core Revive Adserver, then:

  • Please see the update-plugins.php script, which can be used to generate the .po files for all languages; and
  • The poedit tool can then be used to update the non-English .po files, so that you can create translations for your plugin.

Generating .mo Files

An Once you have generated / updated your .po files, updated .mo file files can be generated from the .po file using poedit.

...

files using poedit.

Translation Strings in Plugin PHP Code

...