Proposal: Mini translation packages

Why localizationLocalization Localization (sometimes shortened to "l10n") is the process of adapting a product or service to a particular language, culture, and desired local "look-and-feel." matters

Although it is always possible to learn a new skill, it becomes increasingly difficult as we grow older. As with math and science, early exposure to technology increases the likelihood of proficiency in these areas later in life exponentially.

However, before many children around the world can get the opportunity to learn to code, they first need to learn English.

Translating WordPress is a natural, low-friction opportunity to narrow the digital divide, increasing diversity within the WordPress landscape – empowering youth by giving them opportunities to learn.

The challenges

As WordPress grows, so do the number of stringsString A string is a translatable part of the software. A translation consists of a multitude of localized strings..
This makes it increasingly difficult to translate WordPress into new languages.

Proposing a solution

Mini translation packages

We identified the 110 most visible strings on 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/ for International Translation Day 2020.

A somewhat similar approach could also be applied to WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., plugins, themes and apps.

It should be noted, however, that it will take multiple, complementary solutions to make this work.

Focusing on highly visible, high-impact strings can make translation more meaningful.

Our proposed approach can help lower barriers to entry, helping to keep contributors motivated and serves users by not letting the perfect be the enemy of the good.

Identifying highly visible, high-impact strings

We propose adding a new priority for strings, called “high impact”.
These are strings that are either visible on the front end, or on the pages in wp-admin that are accessible from the admin menu.

It would not include rare notices, or advanced functions that are not readily accessible from wp-admin (e.g. the REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/.).

A mini translation package should be generated for a project once all “high impact” strings have been translated.

This approach is preferable to and more meaningful than setting a percentage requirement, because it focuses on what is really needed – something which may vary from project to project.

For Core, only members of a central Polyglots Global task team should be able to assign priorities to strings.

For plugins and themes PTEProject Translation Editor A Project Translation Editor (often referred to as PTE) is a person, who has access to validate strings on a specific project (for example BuddyPress, WooCommerce or Twenty Fourteen) for one specific locale. A project translation editor can approve strings that are added by translation contributors. Per project translation, editors are appointed by a general translation editor after a request by the project author or by the contributors themselves.-caps (any localeLocale Locale = language version, often a combination of a language code and a region code, for instance es_MX denotes Spanish as it’s used in Mexico. A list of all locales supported by WordPress in https://make.wordpress.org/polyglots/teams/) should be required to assign priorities to strings.

This would mean that 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 and theme authors would only need one person on staff with PTE caps to be able to set stringString A string is a translatable part of the software. A translation consists of a multitude of localized strings. priorities for their plugin or theme, should they wish to do so.

Smart resource-sharing

Using a dedicated text domain to have a shared library of strings would require plugin and theme authors to make changes to their code.

The essential, cohesion and expansion libraries could act in a similar way to a central text domain, without the drawback of having to update all of the code in the repositoryWordPress Localization Repository The WordPress Localization Repository at https://i18n.svn.wordpress.org/ is a Subversion repository where official WordPress translations are maintained. See Working with the Translation Repository for details..

Basically, the essential / cohesion / expansion packages would be a “fall-back” (default) at the time a translation package is generated.
Strings contained in these packages should be:

  • Limited in number; and
  • Should be context-neutral.
Essential library

This would be most suitable for strings that should not be overridden in most circumstances. (GTEGeneral Translation Editor A General Translation Editor (often referred to as GTE) is a person, who has global access to validate strings on all projects for a specific locale.+ caps required)
Good candidates may be countries and colours.

Cohesion library:

This would be most suitable for:

  • Non-core strings (plugins / themes / apps);
  • Translations that may need to be overridden (PTE+ caps required for plugins, themes and apps. GTE+ caps required for Core);
  • Strings that are likely to be included in the default /wp-admin/ pages.
  • For example, “settings”, “rate this plugin” and “upgrade to pro” (and similar variants) are strings that often appear on the Plugins’ page. However, as these strings are added by plugins, the page often appears as a mishmash of English and the site / user language, leading to a poor user experience.
Expansion library

This would be suitable for strings that:

  • Are not included in the essential or cohesion libraries;
  • Have a high frequency (likely more applicable to themes than plugins);
  • Are not highly context-dependent;
  • Should be possible to override (PTE+ caps required for plugins, themes and apps. GTE+ caps required for Core);
  • Can add value as a shared resource.
  • For example, this may include words and phrases from the various team glossaries.
  • For this library to be effective, the part of speech (e.g. verb vs. noun) would need to be available, as English often uses the same word for multiple parts of speech.

How you can help

There are a number of implementation details that still need to be ironed out. Examples of these would include publishing more detailed criteria for classifying strings and possible alternatives to creating a new translate.wordpress.orgtranslate.wordpress.org The platform for contributing to the translation of WordPress core, themes and plugins. project for the libraries.

Engagement is important for a project like this. Please add any concerns, suggestions, disagreement or support below. All of it matters.