Ticket #44360: 44360-wp-admin-includes-dir-patch2.diff
File 44360-wp-admin-includes-dir-patch2.diff, 16.0 KB (added by , 7 years ago) |
---|
-
src/wp-admin/includes/class-wp-comments-list-table.php
773 773 * @param WP_Comment $comment The comment object. 774 774 */ 775 775 public function column_date( $comment ) { 776 /* translators: 1: comment date, 2: comment time */777 776 $submitted = sprintf( 777 /* translators: 1: comment date, 2: comment time */ 778 778 __( '%1$s at %2$s' ), 779 779 /* translators: comment date format. See https://secure.php.net/date */ 780 780 get_comment_date( __( 'Y/m/d' ), $comment ), -
src/wp-admin/includes/class-wp-filesystem-ftpext.php
79 79 if ( ! $this->link ) { 80 80 $this->errors->add( 81 81 'connect', 82 /* translators: %s: hostname:port */83 82 sprintf( 83 /* translators: %s: hostname:port */ 84 84 __( 'Failed to connect to FTP Server %s' ), 85 85 $this->options['hostname'] . ':' . $this->options['port'] 86 86 ) … … 91 91 if ( ! @ftp_login( $this->link, $this->options['username'], $this->options['password'] ) ) { 92 92 $this->errors->add( 93 93 'auth', 94 /* translators: %s: username */95 94 sprintf( 95 /* translators: %s: username */ 96 96 __( 'Username/Password incorrect for %s' ), 97 97 $this->options['username'] 98 98 ) -
src/wp-admin/includes/class-wp-filesystem-ftpsockets.php
71 71 if ( ! $this->ftp->SetServer( $this->options['hostname'], $this->options['port'] ) ) { 72 72 $this->errors->add( 73 73 'connect', 74 /* translators: %s: hostname:port */75 74 sprintf( 75 /* translators: %s: hostname:port */ 76 76 __( 'Failed to connect to FTP Server %s' ), 77 77 $this->options['hostname'] . ':' . $this->options['port'] 78 78 ) … … 83 83 if ( ! $this->ftp->connect() ) { 84 84 $this->errors->add( 85 85 'connect', 86 /* translators: %s: hostname:port */87 86 sprintf( 87 /* translators: %s: hostname:port */ 88 88 __( 'Failed to connect to FTP Server %s' ), 89 89 $this->options['hostname'] . ':' . $this->options['port'] 90 90 ) … … 95 95 if ( ! $this->ftp->login( $this->options['username'], $this->options['password'] ) ) { 96 96 $this->errors->add( 97 97 'auth', 98 /* translators: %s: username */99 98 sprintf( 99 /* translators: %s: username */ 100 100 __( 'Username/Password incorrect for %s' ), 101 101 $this->options['username'] 102 102 ) -
src/wp-admin/includes/class-wp-filesystem-ssh2.php
121 121 if ( ! $this->link ) { 122 122 $this->errors->add( 123 123 'connect', 124 /* translators: %s: hostname:port */125 124 sprintf( 125 /* translators: %s: hostname:port */ 126 126 __( 'Failed to connect to SSH2 Server %s' ), 127 127 $this->options['hostname'] . ':' . $this->options['port'] 128 128 ) … … 134 134 if ( ! @ssh2_auth_password( $this->link, $this->options['username'], $this->options['password'] ) ) { 135 135 $this->errors->add( 136 136 'auth', 137 /* translators: %s: username */138 137 sprintf( 138 /* translators: %s: username */ 139 139 __( 'Username/Password incorrect for %s' ), 140 140 $this->options['username'] 141 141 ) … … 146 146 if ( ! @ssh2_auth_pubkey_file( $this->link, $this->options['username'], $this->options['public_key'], $this->options['private_key'], $this->options['password'] ) ) { 147 147 $this->errors->add( 148 148 'auth', 149 /* translators: %s: username */150 149 sprintf( 150 /* translators: %s: username */ 151 151 __( 'Public and Private keys incorrect for %s' ), 152 152 $this->options['username'] 153 153 ) … … 160 160 if ( ! $this->sftp_link ) { 161 161 $this->errors->add( 162 162 'connect', 163 /* translators: %s: hostname:port */164 163 sprintf( 164 /* translators: %s: hostname:port */ 165 165 __( 'Failed to initialize a SFTP subsystem session with the SSH2 Server %s' ), 166 166 $this->options['hostname'] . ':' . $this->options['port'] 167 167 ) … … 206 206 if ( ! ( $stream = ssh2_exec( $this->link, $command ) ) ) { 207 207 $this->errors->add( 208 208 'command', 209 /* translators: %s: command */210 209 sprintf( 210 /* translators: %s: command */ 211 211 __( 'Unable to perform command: %s' ), 212 212 $command 213 213 ) -
src/wp-admin/includes/class-wp-links-list-table.php
169 169 */ 170 170 public function column_cb( $link ) { 171 171 ?> 172 <label class="screen-reader-text" for="cb-select-<?php echo $link->link_id; ?>"><?php echo sprintf( __( 'Select %s' ), $link->link_name ); ?></label> 172 <label class="screen-reader-text" for="cb-select-<?php echo $link->link_id; ?>"> 173 <?php 174 printf( 175 /* translators: %s: link name */ 176 __( 'Select %s' ), 177 $link->link_name 178 ); 179 ?> 180 </label> 173 181 <input type="checkbox" name="linkcheck[]" id="cb-select-<?php echo $link->link_id; ?>" value="<?php echo esc_attr( $link->link_id ); ?>" /> 174 182 <?php 175 183 } … … 320 328 321 329 $actions = array(); 322 330 $actions['edit'] = '<a href="' . $edit_link . '">' . __( 'Edit' ) . '</a>'; 331 /*translators: %s: link name */ 323 332 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url( "link.php?action=delete&link_id=$link->link_id", 'delete-bookmark_' . $link->link_id ) . "' onclick=\"if ( confirm( '" . esc_js( sprintf( __( "You are about to delete this link '%s'\n 'Cancel' to stop, 'OK' to delete." ), $link->link_name ) ) . "' ) ) { return true;}return false;\">" . __( 'Delete' ) . '</a>'; 324 333 return $this->row_actions( $actions ); 325 334 } -
src/wp-admin/includes/class-wp-list-table.php
658 658 $approved_comments_number = number_format_i18n( $approved_comments ); 659 659 $pending_comments_number = number_format_i18n( $pending_comments ); 660 660 661 $approved_only_phrase = sprintf( _n( '%s comment', '%s comments', $approved_comments ), $approved_comments_number ); 662 $approved_phrase = sprintf( _n( '%s approved comment', '%s approved comments', $approved_comments ), $approved_comments_number ); 663 $pending_phrase = sprintf( _n( '%s pending comment', '%s pending comments', $pending_comments ), $pending_comments_number ); 661 $approved_only_phrase = sprintf( 662 /* translators: %s: number of approved comments */ 663 _n( '%s comment', '%s comments', $approved_comments ), $approved_comments_number ); 664 $approved_phrase = sprintf( 665 /* translators: %s: number of approved comments */ 666 _n( '%s approved comment', '%s approved comments', $approved_comments ), $approved_comments_number ); 667 $pending_phrase = sprintf( 668 /* translators: %s: number of pending comments */ 669 _n( '%s pending comment', '%s pending comments', $pending_comments ), $pending_comments_number ); 664 670 665 671 // No comments at all. 666 672 if ( ! $approved_comments && ! $pending_comments ) { … … 785 791 $this->screen->render_screen_reader_content( 'heading_pagination' ); 786 792 } 787 793 788 $output = '<span class="displaying-num">' . sprintf( _n( '%s item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>'; 794 $output = '<span class="displaying-num">' . sprintf( 795 /* translators: %s: number total items */ 796 _n( '%s item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>'; 789 797 790 798 $current = $this->get_pagenum(); 791 799 $removable_query_args = wp_removable_query_args(); … … 850 858 ); 851 859 } 852 860 $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) ); 853 $page_links[] = $total_pages_before . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . $total_pages_after; 861 $page_links[] = $total_pages_before . sprintf( 862 /* translators: 1: current page, 2: total pages */ 863 _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages 864 ) . $total_pages_after; 854 865 855 866 if ( $disable_next ) { 856 867 $page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">›</span>'; … … 1366 1377 1367 1378 if ( isset( $this->_pagination_args['total_items'] ) ) { 1368 1379 $response['total_items_i18n'] = sprintf( 1380 /* translators: %s: number of total items */ 1369 1381 _n( '%s item', '%s items', $this->_pagination_args['total_items'] ), 1370 1382 number_format_i18n( $this->_pagination_args['total_items'] ) 1371 1383 ); -
src/wp-admin/includes/class-wp-media-list-table.php
357 357 ?> 358 358 <label class="screen-reader-text" for="cb-select-<?php echo $post->ID; ?>"> 359 359 <?php 360 echo sprintf( __( 'Select %s' ), _draft_or_post_title() ); 360 printf( 361 /* translators: %s: post title */ 362 __( 'Select %s' ), _draft_or_post_title() ); 361 363 ?> 362 364 </label> 363 365 <input type="checkbox" name="media[]" id="cb-select-<?php echo $post->ID; ?>" value="<?php echo $post->ID; ?>" /> … … 454 456 $time = get_post_time( 'G', true, $post, false ); 455 457 if ( ( abs( $t_diff = time() - $time ) ) < DAY_IN_SECONDS ) { 456 458 if ( $t_diff < 0 ) { 457 $h_time = sprintf( __( '%s from now' ), human_time_diff( $time ) ); 459 $h_time = sprintf( 460 /* translators: %s: Human readable time difference */ 461 __( '%s from now' ), human_time_diff( $time ) ); 458 462 } else { 459 $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) ); 463 $h_time = sprintf( 464 /* translators: %s: Human readable time difference */ 465 __( '%s ago' ), human_time_diff( $time ) ); 460 466 } 461 467 } else { 462 468 $h_time = mysql2date( __( 'Y/m/d' ), $m_time ); -
src/wp-admin/includes/class-wp-ms-sites-list-table.php
278 278 ?> 279 279 <label class="screen-reader-text" for="blog_<?php echo $blog['blog_id']; ?>"> 280 280 <?php 281 printf( __( 'Select %s' ), $blogname ); 281 printf( 282 /* translators: %s: blog name */ 283 __( 'Select %s' ), $blogname ); 282 284 ?> 283 285 </label> 284 286 <input type="checkbox" id="blog_<?php echo $blog['blog_id']; ?>" name="allblogs[]" value="<?php echo esc_attr( $blog['blog_id'] ); ?>" /> -
src/wp-admin/includes/class-wp-ms-themes-list-table.php
297 297 298 298 switch ( $type ) { 299 299 case 'all': 300 $text = _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $count, 'themes' ); 300 $text = 301 /* translators: %s: number */ 302 _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $count, 'themes' ); 301 303 break; 302 304 case 'enabled': 303 $text = _n( 'Enabled <span class="count">(%s)</span>', 'Enabled <span class="count">(%s)</span>', $count ); 305 $text = 306 /* translators: %s: number */ 307 _n( 'Enabled <span class="count">(%s)</span>', 'Enabled <span class="count">(%s)</span>', $count ); 304 308 break; 305 309 case 'disabled': 306 $text = _n( 'Disabled <span class="count">(%s)</span>', 'Disabled <span class="count">(%s)</span>', $count ); 310 $text = 311 /* translators: %s: number */ 312 _n( 'Disabled <span class="count">(%s)</span>', 'Disabled <span class="count">(%s)</span>', $count ); 307 313 break; 308 314 case 'upgrade': 309 $text = _n( 'Update Available <span class="count">(%s)</span>', 'Update Available <span class="count">(%s)</span>', $count ); 315 $text = 316 /* translators: %s: number */ 317 _n( 'Update Available <span class="count">(%s)</span>', 'Update Available <span class="count">(%s)</span>', $count ); 310 318 break; 311 319 case 'broken': 312 $text = _n( 'Broken <span class="count">(%s)</span>', 'Broken <span class="count">(%s)</span>', $count ); 320 $text = 321 /* translators: %s: number */ 322 _n( 'Broken <span class="count">(%s)</span>', 'Broken <span class="count">(%s)</span>', $count ); 313 323 break; 314 324 } 315 325 … … 566 576 $theme_meta = array(); 567 577 568 578 if ( $theme->get( 'Version' ) ) { 569 $theme_meta[] = sprintf( __( 'Version %s' ), $theme->display( 'Version' ) ); 570 } 571 $theme_meta[] = sprintf( __( 'By %s' ), $theme->display( 'Author' ) ); 579 $theme_meta[] = sprintf( 580 /* translators: %s: Theme version */ 581 __( 'Version %s' ), $theme->display( 'Version' ) ); 582 } 583 $theme_meta[] = sprintf( 584 /* translators: %s: Author */ 585 __( 'By %s' ), $theme->display( 'Author' ) ); 572 586 573 587 if ( $theme->get( 'ThemeURI' ) ) { 574 588 /* translators: %s: theme name */ -
src/wp-admin/includes/class-wp-ms-users-list-table.php
139 139 140 140 $current_link_attributes = $role !== 'super' ? ' class="current" aria-current="page"' : ''; 141 141 $role_links = array(); 142 $role_links['all'] = "<a href='" . network_admin_url( 'users.php' ) . "'$current_link_attributes>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users, 'users' ), number_format_i18n( $total_users ) ) . '</a>'; 142 $role_links['all'] = "<a href='" . network_admin_url( 'users.php' ) . "'$current_link_attributes>" . sprintf( 143 /* translators: %s: total number of users */ 144 _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users, 'users' ), number_format_i18n( $total_users ) ) . '</a>'; 143 145 $current_link_attributes = $role === 'super' ? ' class="current" aria-current="page"' : ''; 144 $role_links['super'] = "<a href='" . network_admin_url( 'users.php?role=super' ) . "'$current_link_attributes>" . sprintf( _n( 'Super Admin <span class="count">(%s)</span>', 'Super Admins <span class="count">(%s)</span>', $total_admins ), number_format_i18n( $total_admins ) ) . '</a>'; 146 $role_links['super'] = "<a href='" . network_admin_url( 'users.php?role=super' ) . "'$current_link_attributes>" . sprintf( 147 /* translators: %s: total number of admins */ 148 _n( 'Super Admin <span class="count">(%s)</span>', 'Super Admins <span class="count">(%s)</span>', $total_admins ), number_format_i18n( $total_admins ) ) . '</a>'; 145 149 146 150 return $role_links; 147 151 } … … 208 212 return; 209 213 } 210 214 ?> 211 <label class="screen-reader-text" for="blog_<?php echo $user->ID; ?>"><?php echo sprintf( __( 'Select %s' ), $user->user_login ); ?></label> 215 <label class="screen-reader-text" for="blog_<?php echo $user->ID; ?>"><?php 216 printf( 217 /* translators: %S: user login name */ 218 __( 'Select %s' ), $user->user_login ); ?></label> 212 219 <input type="checkbox" id="blog_<?php echo $user->ID; ?>" name="allusers[]" value="<?php echo esc_attr( $user->ID ); ?>" /> 213 220 <?php 214 221 }