Changeset 9667 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-locale-banner.php
- Timestamp:
- 04/01/2020 02:41:55 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-locale-banner.php
r7125 r9667 81 81 $current_locale_is_translated = in_array( $current_locale, $translated_locales ); 82 82 83 // Check to see if the plugin is localizable. 84 $current_plugin_is_translatable = true; 85 if ( ! $current_locale_is_translated ) { 86 $current_plugin_is_translatable = (bool) $wpdb->get_var( $wpdb->prepare( 87 'SELECT id 88 FROM translate_projects 89 WHERE path IN( %s, %s ) AND active = 1 90 LIMIT 1', 91 'wp-plugins/' . $plugin_slug . '/dev', 92 'wp-plugins/' . $plugin_slug . '/stable' 93 ) ); 94 } 95 83 96 // Get the native language names of the locales. 84 97 $suggest_named_locales = []; … … 189 202 190 203 // Localized directory. 191 } elseif ( ! $current_locale_is_suggested && ! $current_locale_is_translated && $is_plugin_request ) {204 } elseif ( ! $current_locale_is_suggested && ! $current_locale_is_translated && $is_plugin_request && $current_plugin_is_translatable ) { 192 205 $suggest_string = sprintf( 193 206 $this->translate( 'This plugin is not translated into %1$s yet. <a href="%2$s">Help translate it!</a>', $current_locale ),
Note: See TracChangeset
for help on using the changeset viewer.