Making WordPress.org

Opened 6 years ago

Closed 6 years ago

#4206 closed enhancement (fixed)

Return translated plugin details when using a locale variant

Reported by: ocean90's profile ocean90 Owned by: ocean90's profile ocean90
Milestone: Priority: normal
Component: Plugin Directory Keywords:
Cc:

Description

If a locale variant is used to retrieve plugin details the result will always be in English. Locale variants are currently only defined in https://meta.trac.wordpress.org/browser/sites/trunk/api.wordpress.org/public_html/translations/lib.php?rev=5881#L54 which means the plugin directory don't know about them.

Let's move the definition of locale variants into a central place, a custom locales.php so this issue can be fixed.

Change History (9)

#1 @ocean90
6 years ago

In 8339:

Translate: Add a copy of GlotPress' locales.php to be used for custom locale definitions.

See #4206.

#2 @ocean90
6 years ago

In 8340:

Translate: Define locale variants in locales.php.

See #4206.

#3 @ocean90
6 years ago

In 8341:

Plugin Directory: To get a translation set ID, split the locale into locale and locale slug to support locale variants.

See #4206.

#4 @ocean90
6 years ago

In 8344:

Translate: Add missing clone keyword.

See #4206.

#5 @ocean90
6 years ago

In 8345:

Translate: Add the ca_valencia locale.

See #4206.

#6 @ocean90
6 years ago

In 8347:

Translate: Add mu-plugin to load custom locales from locales/locales.php.

Also filter get_available_languages to include all possible WordPress locales. This is required to make switch_to_locale() work with locales which are not directly used on WordPress.org.

See #4206.

#7 @ocean90
6 years ago

In 8348:

Translate: Remove workarounds for locale variants.

GP_Locales returns the correct locale now.

See #4206.

#8 @ocean90
6 years ago

In 8349:

API: Remove workarounds for language variants.

GP_Locales returns the correct locale now.

See #4206.

#9 @ocean90
6 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.