Plugin Translations for All Plugins

We have not mentioned this here yet, but since Matt mentioned it in his State of the Word talk yesterday…

The WordPress.org plugins directory has the translations import mechanism currently enabled for all plugins. The update will happen for the plugin at the time of the next commit.

To break down what this means into details:

  • When you commit the plugin, it will get read by the translations system.
  • All the strings for the plugin will be imported into the GlotPress install at https://translate.wordpress.org.
  • The plugin will become available for translators and language packs.
  • A message detailing the import will be posted into the #meta-language-packs channel on Slack.

That last part has not been widely mentioned, but that is there for debugging and so you can find out what has happened or gone wrong.

Here is an example of a problem: (I picked this at random, I’m not judging anybody here 🙂 )

Import of ewz-rating
​_Time: Sun, 06 Dec 2015 15:23:20 +0000, Development Log_​
Code for stable (ewz-rating/tags/1.0.0/) in process...
This plugin has no text domain declaration in the file header.
This plugin doesn't use `load_plugin_textdomain()`.
Code for stable was processed.
Readme for stable (ewz-rating/tags/1.0.0/) in process...
The GlotPress projects were created.
Result of the POT import: 57 new strings added, 0 updated, 0 fuzzied, and 0 obsoleted.
Readme for stable was processed.

The problem for this one is simply that the plugin is missing the proper Text Domain header, as well as not having any calls to load the plugin text domain. So, obviously, for this plugin, language packs will not work.

Here’s one that worked fine:

Import of docu
​_Time: Sun, 06 Dec 2015 13:45:53 +0000, Development Log_​
Code for stable (docu/tags/1.5/) in process...
The GlotPress projects were created.
Result of the POT import: 37 new strings added, 0 updated, 0 fuzzied, and 0 obsoleted.
Results of the inital translations import:
Code for stable was processed.
Readme for stable (docu/tags/1.5/) in process...
The GlotPress projects were updated.
Result of the POT import: 26 new strings added, 0 updated, 0 fuzzied, and 0 obsoleted.
Readme for stable was processed.
Import of docu
​_Time: Sun, 06 Dec 2015 13:46:38 +0000, Development Log_​
Readme for dev (docu/trunk/) in process...
The GlotPress projects were updated.
Result of the POT import: 21 new strings added, 0 updated, 0 fuzzied, and 0 obsoleted.
Readme for dev was processed.

This one updated both the trunk and tagged version of the code, so it processed everything successfully. There’s a color coding indicator in the Slack channel as well. Red for a big error of some kind, orange for issues with missing headers or function calls, and green for good-to-go. 🙂

So, if you’re having trouble with the translations for your plugin, check there for your plugin’s slug. If you have updated recently, then you probably have translation access already and might just be missing a header or something.

Now, if you don’t want to get everything sent to you about all the plugins on the Slack, then you don’t actually need to join the #meta-language-packs channel. Instead, just add your plugin’s slug to your highlight keywords, and Slack will ping you when your plugin gets mentioned. This will let you see just the info about your plugin and can be a bit easier to manage.

And again, if you already have translators for your plugin, but they don’t know how to contribute, point them to the Polyglots handbook, and consider asking the polyglots team to make them Translation Editors for your plugin. This will give them access to translate the plugin easily and to approve translations to get out the language packs to your users quickly.

#glotpress, #i18n, #language-packs, #slack, #translations