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.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ plugins directory has the translations import mechanism currently enabled for all plugins. The update will happen for the pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party 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 #metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress.-language-packs channel on SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/..

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 headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes., 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 pingPing The act of sending a very small amount of data to an end point. Ping is used in computer science to illicit a response from a target server to test it’s connection. Ping is also a term used by Slack users to @ someone or send them a direct message (DM). Users might say something along the lines of “Ping me when the meeting starts.” 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 teamPolyglots Team Polyglots Team is a group of multilingual translators who work on translating plugins, themes, documentation, and front-facing marketing copy. https://make.wordpress.org/polyglots/teams/. 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