Making WordPress.org


Ignore:
Timestamp:
02/20/2018 11:00:59 PM (7 years ago)
Author:
ocean90
Message:

Plugin Directory: Use the default translation set of a locale for readme translations.

Fixes #3438.
Fixes #3472.

File:
1 edited

Legend:

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

    r6530 r6701  
    225225
    226226        $translation_set_id = $wpdb->get_var( $wpdb->prepare(
    227             'SELECT id FROM ' . GLOTPRESS_TABLE_PREFIX . 'translation_sets WHERE project_id = %d AND locale = %s',
     227            'SELECT id FROM ' . GLOTPRESS_TABLE_PREFIX . 'translation_sets WHERE project_id = %d AND locale = %s AND slug = "default"',
    228228            $branch_id, $locale
    229229        ) );
     
    233233            // Don't give up yet. Might be given fr_FR, which actually exists as locale=fr in GP.
    234234            $translation_set_id = $wpdb->get_var( $wpdb->prepare(
    235                 'SELECT id FROM ' . GLOTPRESS_TABLE_PREFIX . 'translation_sets WHERE project_id = %d AND locale = %s',
     235                'SELECT id FROM ' . GLOTPRESS_TABLE_PREFIX . 'translation_sets WHERE project_id = %d AND locale = %s AND slug = "default"',
    236236                $branch_id, preg_replace( '/^([^-]+)(-.+)?$/', '\1', $locale )
    237237            ) );
Note: See TracChangeset for help on using the changeset viewer.