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

Plugin Translations on WordPress.org

Howdy 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 authors!

In case you haven’t heard, 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/ will be expanding the services we provide to you, offering language packs to all plugins. This post is to outline exactly what the plan is and when your plugin will take part.

For a bit of background, see this post on make/meta and this one on make/themes.

Over the past few months, 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. team has been working behind the scenes to enable language packs for themes and plugins, just like the ones coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. has. Language packs on WordPress.org are powered by translate.wordpress.org and the polyglots team, who translate WordPress.

As of today, all themes have been imported into translate.wordpress.org and can take advantage of language packs (see also). We chose to import themes first to work out any weirdness with translate.wordpress.org, which has never seen this many projects. There were a few bumps along the way, but language packs are now flowing for themes and we’ve added a number of improvements to translate.wordpress.org to make it the process easier for translators.

Now, it’s time to do the same for plugins.

The gist of plugin translations are as follows (see the FAQ below for more information):

  1. Eventually, all active plugins will be imported into translate.wordpress.org and made available for translation. However, we will import them in phases.
  2. Upon import, if you have any translations, we will import them into translate.wordpress.org. This only happens during initial import.
  3. Before importing your plugin, we will email you when your plugin is in the next “batch” of imports. You should ensure that all translations are up-to-date.
  4. If you do not wish to use language packs, you may continue to ship translations with your plugin.

I am sure there are some questions. Let me try and address them:

Why do I want WordPress.org managing translations for my plugin?

WordPress.org provides translations in dozens of languages and is ever expanding as new contributors join. (There are currently 140 locales on translate.wordpress.org, but not all are active.) While you may have translated your plugin into a few languages (or none at all), there are likely more translators on WordPress.org in more languages.

But that’s not all! Plugins in the WordPress.org directory will be able to take advantage of language packs! That means smaller download sizes for users, because plugins will no longer need to ship translations. Eventually, we also plan to give priority to localized plugins in localized directories; e.g., someone searching the Romanian plugin directory will see Romanian plugins prioritized over English-only plugins.

A great example of what your plugin will look like in a translated directory is Akismet.

When will you import my plugin into translate.wordpress.org?

We will import plugins in order, by the number of active installs they have, starting with the most active installs and working down to the least active installs. You will be emailed when your plugin is in the next batch of imports. Be sure to keep translations up-to-date.

Will you import my plugin ahead of time?

We’re importing in stages to monitor our systems and ensure the entire site does not break. We will not import your plugin out of order.

How do you define “active” plugins?

Plugins are considered “active” if they have been updated in the last two years. This is the same standard that the plugin directory uses when showing plugins in the search results.

My plugin doesn’t have any strings to translate. Does this apply to me?

Yes! Translators have the ability to translate your plugin’s readme.txt file and even its name.

What if my plugin already ships translations?

Translations that are already shipped in plugins will be initially imported into translate.wordpress.org. Again: we’ll import the strings and the translations on the initial import. We won’t continue to do that because the end goal would be for plugin authors to remove the translations from their download, allowing language packs to fill the void.

What if I don’t want language packs?

As mentioned, you can opt out of language packs and plugin translations on WordPress.org, by shipping translations in your plugin, just as you do now.

I currently ship translations with my plugin. How do I enable language packs?

WordPress ships with a mechanism that gives priority to shipped translations over language packs. If you wish to take advantage of language packs, you must remove the languages from your plugin zip.

How do I add support for translations and language packs?

@Otto42 wrote up a great post on the topic back in 2013. (Wow, it’s been a long time!) There’s also a great page in the plugin developer handbook which walks through how to internationalize your plugin.

Keep in mind, your plugin’s textdomain must match its slug and, as mentioned above, to fully support language packs, you’ll want to remove translations from your plugin after the import, when language packs are going out (language packs go out as soon as a translation is at 100%).

What if I want my translators to approve translations on WordPress.org?

Many plugins already have their own translators and will want to bring them over to translate.wordpress.org. We’ve written up a plan for working with 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 enable this. There will be some initial pain in adding new, project-specific (aka plugin-specific) translation editors, but afterwards, your translators will join a growing group of WordPress translators and help make the entire ecosystem better.


If you have any other questions, you’re probably not the only one, so leave them in the comments below.

Cheers!

#translations