Changeset 4066
- Timestamp:
- 09/14/2016 07:38:37 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-ratings-compat.php
r4061 r4066 140 140 $ratings_count = isset( $this->ratings_counts[ $rating ] ) ? $this->ratings_counts[ $rating ] : 0; 141 141 $ratings_count_total = isset( $this->ratings_counts ) ? array_sum( $this->ratings_counts) : 0; 142 $stars_title = sprintf( _n( 'Click to see reviews that provided a rating of %d star', 'Click to see reviews that provided a rating of %d stars', $rating, 'wporg-forums' ), $rating ); 142 $stars_title = sprintf( 143 /* translators: %s: number of stars */ 144 _n( 'Click to see reviews that provided a rating of %d star', 145 'Click to see reviews that provided a rating of %d stars', 146 $rating, 147 'wporg-forums' ), 148 $rating 149 ); 150 /* translators: %d: number of stars */ 143 151 $stars_text = sprintf( __( '%d stars', 'wporg-forums' ), $rating ); 144 152 $width = 0; … … 163 171 <div class="col-5"> 164 172 <div style="font-weight:bold;"><?php _e( 'Average Rating', 'wporg-forums' ); ?></div> 165 <?php echo \WPORG_Ratings::get_dashicons_stars( $this->avg_rating ); ?><?php echo sprintf( __( '%s out of <span itemprop="bestRating">5</span> stars', 'wporg-forums' ), round( isset( $this->avg_rating ) ? $this->avg_rating : 0, 1 ) ); ?> 173 <?php 174 echo \WPORG_Ratings::get_dashicons_stars( $this->avg_rating ); 175 /* translators: %s: number of stars */ 176 printf( __( '%s out of <span itemprop="bestRating">5</span> stars', 'wporg-forums' ), 177 round( isset( $this->avg_rating ) ? $this->avg_rating : 0, 1 ) 178 ); 179 ?> 166 180 <div class="reviews-submit-link"> 167 181 <?php … … 173 187 echo '<span class="reviews-need-login">'; 174 188 printf( 175 /* translators: %s: translation of verb string "log in or register"*/176 __( 'You must %sto submit a review.', 'wporg-forums' ),177 sprintf(178 ' <a href="https://login.wordpress.org/?redirect_to=%s">%s</a>',189 /* translators: %s: login URL */ 190 __( 'You must <a href="%s">log in or register</a> to submit a review.', 'wporg-forums' ), 191 add_query_arg( 192 'redirect_to', 179 193 urlencode( esc_url_raw( sprintf( 'https://wordpress.org/support/%s/%s/reviews/', $this->compat, $this->slug ) ) ), 180 esc_html_x( 'log in or register', 'verb: You must log in or register to submit a review.', 'wporg-forums' )194 'https://login.wordpress.org/' 181 195 ) 182 196 ); … … 193 207 echo '<div class="col-9 reviews-filtered-msg" style="font-style:italic;margin-top:24px;">'; 194 208 printf( 195 _n( 'You are currently viewing the reviews that provided a rating of <strong>%d star</strong>. <a href="%s">Click here</a> to see all reviews.', 196 'You are currently viewing the reviews that provided a rating of <strong>%d stars</strong>. <a href="%s">Click here</a> to see all reviews.', 197 'wporg-forums' ), $filter, esc_url ( sprintf( '//wordpress.org/support/%s/%s/reviews/', $this->compat, $this->slug ) ) ); 209 /* translators: %d: number of stars */ 210 _n( 'You are currently viewing the reviews that provided a rating of <strong>%d star</strong>.', 211 'You are currently viewing the reviews that provided a rating of <strong>%d stars</strong>.', 212 $filter, 213 'wporg-forums' ), 214 $filter 215 ); 216 printf( 217 /* translators: %s: plugin/theme reviews URL */ 218 __( '<a href="%s">Click here</a> to see all reviews.', 'wporg-forums' ), 219 esc_url( sprintf( '//wordpress.org/support/%s/%s/reviews/', $this->compat, $this->slug ) ) 220 ); 198 221 echo "</div>\n"; 199 222 } … … 229 252 echo '<p>'; 230 253 printf( 231 /* translators: %s: translation of verb string "log in or register"*/232 __( 'You must %sto submit a review.', 'wporg-forums' ),233 sprintf(234 ' <a href="https://login.wordpress.org/?redirect_to=%s">%s</a>',254 /* translators: %s: login URL */ 255 __( 'You must <a href="%s">log in or register</a> to submit a review.', 'wporg-forums' ), 256 add_query_arg( 257 'redirect_to', 235 258 urlencode( esc_url_raw( sprintf( 'https://wordpress.org/support/%s/%s/reviews/', $this->compat, $this->slug ) ) ), 236 esc_html_x( 'log in or register', 'verb: You must log in or register to submit a review.', 'wporg-forums' )259 'https://login.wordpress.org/' 237 260 ) 238 261 ); … … 268 291 switch( $this->compat ) { 269 292 case 'plugin' : 270 $report = __( 'If you are reporting an issue with this plugin, please post %s instead.', 'wporg-forums' ); 293 /* translators: %s: plugin support forum URL */ 294 $report = __( 'If you are reporting an issue with this plugin, please post <a href="%s">here</a> instead.', 'wporg-forums' ); 271 295 $rate = __( 'In order to rate a plugin, you must also submit a review.', 'wporg-forums' ); 272 296 break; 273 297 case 'theme' : 274 $report = __( 'If you are reporting an issue with this theme, please post %s instead.', 'wporg-forums' ); 298 /* translators: %s: theme support forum URL */ 299 $report = __( 'If you are reporting an issue with this theme, please post <a href="%s">here</a> instead.', 'wporg-forums' ); 275 300 $rate = __( 'In order to rate a theme, you must also submit a review.', 'wporg-forums' ); 276 301 break; … … 279 304 <p><?php _e( 'When posting a review, follow these guidelines:', 'wporg-forums' ); ?></p> 280 305 <ul> 281 <li><?php printf( esc_html( $report ), sprintf( '<a href="%s">%s</a>', 282 esc_url( sprintf( 'https://wordpress.org/support/%s/%s/', $this->compat, $this->slug ) ), 283 _x( 'here', 'please post here instead', 'wporg-forums' ) 284 ) ); ?></li> 306 <li><?php printf( esc_html( $report ), esc_url( sprintf( 'https://wordpress.org/support/%s/%s/', $this->compat, $this->slug ) ) ); ?></li> 285 307 <li><?php echo esc_html( $rate ); ?></li> 286 308 <li><?php esc_html_e( 'Please provide as much detail as you can to justify your rating and to help others.', 'wporg-forums' ); ?></li>
Note: See TracChangeset
for help on using the changeset viewer.