Changeset 45926 for trunk/src/wp-admin/update-core.php
- Timestamp:
- 09/01/2019 05:12:43 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/update-core.php
r45734 r45926 62 62 } else { 63 63 if ( $current ) { 64 /* translators: %s: WordPress version */ 64 65 $message = sprintf( __( 'If you need to re-install version %s, you can do so here:' ), $version_string ); 65 66 $submit = __( 'Re-install Now' ); … … 79 80 ); 80 81 81 /* translators: %s: Update PHP page URL */ 82 $php_update_message = '</p><p>' . sprintf( __( '<a href="%s">Learn more about updating PHP</a>.' ), esc_url( wp_get_update_php_url() ) ); 82 $php_update_message = '</p><p>' . sprintf( 83 /* translators: %s: Update PHP page URL */ 84 __( '<a href="%s">Learn more about updating PHP</a>.' ), 85 esc_url( wp_get_update_php_url() ) 86 ); 83 87 84 88 $annotation = wp_get_update_php_annotation(); … … 88 92 89 93 if ( ! $mysql_compat && ! $php_compat ) { 90 /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number */ 91 $message = sprintf( __( 'You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.' ), $version_url, $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version ) . $php_update_message; 94 $message = sprintf( 95 /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number */ 96 __( 'You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.' ), 97 $version_url, 98 $update->current, 99 $update->php_version, 100 $update->mysql_version, 101 $php_version, 102 $mysql_version 103 ) . $php_update_message; 92 104 } elseif ( ! $php_compat ) { 93 /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number */ 94 $message = sprintf( __( 'You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher. You are running version %4$s.' ), $version_url, $update->current, $update->php_version, $php_version ) . $php_update_message; 105 $message = sprintf( 106 /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number */ 107 __( 'You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher. You are running version %4$s.' ), 108 $version_url, 109 $update->current, 110 $update->php_version, 111 $php_version 112 ) . $php_update_message; 95 113 } elseif ( ! $mysql_compat ) { 96 /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number */ 97 $message = sprintf( __( 'You cannot update because <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.' ), $version_url, $update->current, $update->mysql_version, $mysql_version ); 114 $message = sprintf( 115 /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number */ 116 __( 'You cannot update because <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.' ), 117 $version_url, 118 $update->current, 119 $update->mysql_version, 120 $mysql_version 121 ); 98 122 } else { 99 /* translators: 1: URL to WordPress release notes, 2: WordPress version number including locale if necessary */ 100 $message = sprintf( __( 'You can update to <a href="%1$s">WordPress %2$s</a> automatically:' ), $version_url, $version_string ); 123 $message = sprintf( 124 /* translators: 1: URL to WordPress release notes, 2: WordPress version number including locale if necessary */ 125 __( 'You can update to <a href="%1$s">WordPress %2$s</a> automatically:' ), 126 $version_url, 127 $version_string 128 ); 101 129 } 102 130 if ( ! $mysql_compat || ! $php_compat ) { … … 134 162 } elseif ( 'en_US' == $update->locale && get_locale() != 'en_US' && ( ! $update->packages->partial && $wp_version == $update->partial_version ) ) { 135 163 // Partial builds don't need language-specific warnings. 136 echo '<p class="hint">' . sprintf( __( 'You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.' ), $update->response != 'development' ? $update->current : '' ) . '</p>'; 164 echo '<p class="hint">' . sprintf( 165 /* translators: %s: WordPress version */ 166 __( 'You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.' ), 167 $update->response != 'development' ? $update->current : '' 168 ) . '</p>'; 137 169 } 138 170 echo '</form>'; … … 241 273 } elseif ( ! $updates ) { 242 274 list( $normalized_version ) = explode( '-', $wp_version ); 243 echo '<p>' . sprintf( __( '<a href="%1$s">Learn more about WordPress %2$s</a>.' ), esc_url( self_admin_url( 'about.php' ) ), $normalized_version ) . '</p>'; 275 echo '<p>' . sprintf( 276 /* translators: 1: URL to About screen, 2: WordPress version */ 277 __( '<a href="%1$s">Learn more about WordPress %2$s</a>.' ), 278 esc_url( self_admin_url( 'about.php' ) ), 279 $normalized_version 280 ) . '</p>'; 244 281 } 245 282 dismissed_updates(); … … 300 337 // Get plugin compat for running version of WordPress. 301 338 if ( isset( $plugin_data->update->tested ) && version_compare( $plugin_data->update->tested, $cur_wp_version, '>=' ) ) { 302 $compat = '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: 100%% (according to its author)' ), $cur_wp_version ); 339 /* translators: %s: WordPress version */ 340 $compat = '<br />' . sprintf( __( 'Compatibility with WordPress %s: 100%% (according to its author)' ), $cur_wp_version ); 303 341 } else { 304 $compat = '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: Unknown' ), $cur_wp_version ); 342 /* translators: %s: WordPress version */ 343 $compat = '<br />' . sprintf( __( 'Compatibility with WordPress %s: Unknown' ), $cur_wp_version ); 305 344 } 306 345 // Get plugin compat for updated version of WordPress. 307 346 if ( $core_update_version ) { 308 347 if ( isset( $plugin_data->update->tested ) && version_compare( $plugin_data->update->tested, $core_update_version, '>=' ) ) { 309 $compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: 100%% (according to its author)' ), $core_update_version ); 348 /* translators: %s: WordPress version */ 349 $compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %s: 100%% (according to its author)' ), $core_update_version ); 310 350 } else { 311 $compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: Unknown' ), $core_update_version ); 351 /* translators: %s: WordPress version */ 352 $compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %s: Unknown' ), $core_update_version ); 312 353 } 313 354 } … … 318 359 if ( ! $compatible_php && current_user_can( 'update_php' ) ) { 319 360 $compat .= '<br>' . __( 'This update doesn’t work with your version of PHP.' ) . ' '; 320 /* translators: %s: Update PHP page URL */321 361 $compat .= sprintf( 362 /* translators: %s: Update PHP page URL */ 322 363 __( '<a href="%s">Learn more about updating PHP</a>.' ), 323 364 esc_url( wp_get_update_php_url() ) … … 355 396 <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" /> 356 397 <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text"> 357 <?php398 <?php 358 399 /* translators: %s: plugin name */ 359 printf( 360 __( 'Select %s' ), 361 $plugin_data->Name 362 ); 363 ?> 400 printf( __( 'Select %s' ), $plugin_data->Name ); 401 ?> 364 402 </label> 365 403 <?php endif; ?> … … 369 407 <strong><?php echo $plugin_data->Name; ?></strong> 370 408 <?php 371 /* translators: 1: plugin version, 2: new version */372 409 printf( 410 /* translators: 1: plugin version, 2: new version */ 373 411 __( 'You have version %1$s installed. Update to %2$s.' ), 374 412 $plugin_data->Version, … … 440 478 <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $stylesheet ); ?>" /> 441 479 <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text"> 442 <?php480 <?php 443 481 /* translators: %s: theme name */ 444 printf( 445 __( 'Select %s' ), 446 $theme->display( 'Name' ) 447 ); 448 ?> 482 printf( __( 'Select %s' ), $theme->display( 'Name' ) ); 483 ?> 449 484 </label> 450 485 </td> … … 453 488 <strong><?php echo $theme->display( 'Name' ); ?></strong> 454 489 <?php 455 /* translators: 1: theme version, 2: new version */456 490 printf( 491 /* translators: 1: theme version, 2: new version */ 457 492 __( 'You have version %1$s installed. Update to %2$s.' ), 458 493 $theme->display( 'Version' ), … … 585 620 586 621 show_message( __( 'WordPress updated successfully' ) ); 587 show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%2$s">here</a>.' ), $result, esc_url( self_admin_url( 'about.php?updated' ) ) ) . '</span>' ); 588 show_message( '<span class="hide-if-js">' . sprintf( __( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), $result, esc_url( self_admin_url( 'about.php?updated' ) ) ) . '</span>' ); 622 show_message( 623 '<span class="hide-if-no-js">' . sprintf( 624 /* translators: 1: WordPress version, 2: URL to About screen */ 625 __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%2$s">here</a>.' ), 626 $result, 627 esc_url( self_admin_url( 'about.php?updated' ) ) 628 ) . '</span>' 629 ); 630 show_message( 631 '<span class="hide-if-js">' . sprintf( 632 /* translators: 1: WordPress version, 2: URL to About screen */ 633 __( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), 634 $result, 635 esc_url( self_admin_url( 'about.php?updated' ) ) 636 ) . '</span>' 637 ); 589 638 ?> 590 639 </div>
Note: See TracChangeset
for help on using the changeset viewer.