Making WordPress.org

Changeset 5717


Ignore:
Timestamp:
07/26/2017 01:21:37 AM (9 years ago)
Author:
tellyworth
Message:

Plugin directory: Add "help improve this translation" links to the locale banner. Props @SergeyBiryukov.

Fixes #2921

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-locale-banner.php

    r5322 r5717  
    9595                                if ( $is_plugin_request ) {
    9696                                        $suggest_string = sprintf(
    97                                                 $this->translate( 'This plugin is also available in %s.', $locale ),
     97                                                $this->translate( 'This plugin is also available in %1$s. <a href="%2$s">Help improve the translation!</a>', $locale ),
    9898                                                sprintf(
    9999                                                        '<a href="https://%s.wordpress.org%s%s/">%s</a>',
     
    102102                                                        $plugin_slug,
    103103                                                        $language
    104                                                 )
     104                                                ),
     105                                                esc_url( 'https://translate.wordpress.org/projects/wp-plugins/' . $plugin_slug )
    105106                                        );
    106107                                } else {
     
    135136
    136137                                        $suggest_string = sprintf(
    137                                                 $this->translate( 'This plugin is also available in %1$s (also: %2$s).', $primary_locale ),
     138                                                $this->translate( 'This plugin is also available in %1$s (also: %2$s). <a href="%3$s">Help improve the translation!</a>', $primary_locale ),
    138139                                                sprintf(
    139140                                                        '<a href="https://%s.wordpress.org%s%s/">%s</a>',
     
    143144                                                        $primary_language
    144145                                                ),
    145                                                 trim( $other_suggest, ' ,' )
     146                                                trim( $other_suggest, ' ,' ),
     147                                                esc_url( 'https://translate.wordpress.org/projects/wp-plugins/' . $plugin_slug )
    146148                                        );
    147149                                } else {
Note: See TracChangeset for help on using the changeset viewer.