Changeset 35549 for trunk/src/wp-admin/edit-comments.php
- Timestamp:
- 11/06/2015 12:22:44 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-comments.php
r34891 r35549 118 118 $draft_or_post_title = wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '…' ); 119 119 if ( $comments_count->moderated > 0 ) { 120 $title = sprintf(121 __( 'Comments (%s) on “%s”' ),120 /* translators: 1: comments count 2: post title */ 121 $title = sprintf( __( 'Comments (%1$s) on “%2$s”' ), 122 122 number_format_i18n( $comments_count->moderated ), 123 123 $draft_or_post_title 124 124 ); 125 125 } else { 126 $title = sprintf( __( 'Comments on “%s”' ), $draft_or_post_title ); 126 /* translators: %s: post title */ 127 $title = sprintf( __( 'Comments on “%s”' ), 128 $draft_or_post_title 129 ); 127 130 } 128 131 } else { 129 132 $comments_count = wp_count_comments(); 130 133 if ( $comments_count->moderated > 0 ) { 131 $title = sprintf(132 134 /* translators: %s: comments count */ 135 $title = sprintf( __( 'Comments (%s)' ), 133 136 number_format_i18n( $comments_count->moderated ) 134 137 ); … … 177 180 <div class="wrap"> 178 181 <h1><?php 179 if ( $post_id ) 180 echo sprintf( __( 'Comments on “%s”' ), 181 sprintf( '<a href="%s">%s</a>', 182 if ( $post_id ) { 183 /* translators: %s: link to post */ 184 printf( __( 'Comments on “%s”' ), 185 sprintf( '<a href="%1$s">%2$s</a>', 182 186 get_edit_post_link( $post_id ), 183 187 wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '…' ) 184 188 ) 185 189 ); 186 else 190 } else { 187 191 _e( 'Comments' ); 188 189 if ( isset($_REQUEST['s']) && $_REQUEST['s'] ) 190 echo '<span class="subtitle">' . sprintf( __( 'Search results for “%s”' ), wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '…' ) ) . '</span>'; ?> 191 </h1> 192 } 193 194 if ( isset($_REQUEST['s']) && $_REQUEST['s'] ) { 195 echo '<span class="subtitle">'; 196 /* translators: %s: search keywords */ 197 printf( __( 'Search results for “%s”' ), 198 wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '…' ) 199 ); 200 echo '</span>'; 201 } 202 ?></h1> 192 203 193 204 <?php … … 217 228 218 229 if ( $approved > 0 || $deleted > 0 || $trashed > 0 || $untrashed > 0 || $spammed > 0 || $unspammed > 0 || $same > 0 ) { 219 if ( $approved > 0 ) 230 if ( $approved > 0 ) { 231 /* translators: %s: number of comments approved */ 220 232 $messages[] = sprintf( _n( '%s comment approved', '%s comments approved', $approved ), $approved ); 233 } 221 234 222 235 if ( $spammed > 0 ) { 223 236 $ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0; 237 /* translators: %s: number of comments marked as spam */ 224 238 $messages[] = sprintf( _n( '%s comment marked as spam.', '%s comments marked as spam.', $spammed ), $spammed ) . ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=unspam&ids=$ids", "bulk-comments" ) ) . '">' . __('Undo') . '</a><br />'; 225 239 } 226 240 227 if ( $unspammed > 0 ) 241 if ( $unspammed > 0 ) { 242 /* translators: %s: number of comments restored from the spam */ 228 243 $messages[] = sprintf( _n( '%s comment restored from the spam', '%s comments restored from the spam', $unspammed ), $unspammed ); 244 } 229 245 230 246 if ( $trashed > 0 ) { 231 247 $ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0; 248 /* translators: %s: number of comments moved to the Trash */ 232 249 $messages[] = sprintf( _n( '%s comment moved to the Trash.', '%s comments moved to the Trash.', $trashed ), $trashed ) . ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=untrash&ids=$ids", "bulk-comments" ) ) . '">' . __('Undo') . '</a><br />'; 233 250 } 234 251 235 if ( $untrashed > 0 ) 252 if ( $untrashed > 0 ) { 253 /* translators: %s: number of comments restored from the Trash */ 236 254 $messages[] = sprintf( _n( '%s comment restored from the Trash', '%s comments restored from the Trash', $untrashed ), $untrashed ); 237 238 if ( $deleted > 0 ) 255 } 256 257 if ( $deleted > 0 ) { 258 /* translators: %s: number of comments permanently deleted */ 239 259 $messages[] = sprintf( _n( '%s comment permanently deleted', '%s comments permanently deleted', $deleted ), $deleted ); 260 } 240 261 241 262 if ( $same > 0 && $comment = get_comment( $same ) ) {
Note: See TracChangeset
for help on using the changeset viewer.