WordPress.org

Making WordPress.org


Ignore:
Timestamp:
01/24/2017 10:59:27 AM (3 years ago)
Author:
dd32
Message:

Plugin Directory: Use translated data for the api.wordpress.org info endpoint.

  • Also translates screenshot titles on the front end
  • Also uses plugin tags in API info endpoint rather than defunct categories.

See #2112
Fixes #2415

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-i18n.php

    r3511 r4764  
    1616     */
    1717    static function translate_term( $term ) {
     18        if ( 'en_US' == get_locale() ) {
     19            return $term;
     20        }
     21
    1822        if ( 'plugin_category' == $term->taxonomy ) {
    1923            $term->name = esc_html( translate_with_gettext_context( html_entity_decode( $term->name ), 'Plugin Category Name', 'wporg-plugins' ) );
Note: See TracChangeset for help on using the changeset viewer.