Make WordPress Core

Ticket #51774: 51774.8.diff

File 51774.8.diff, 3.1 KB (added by audrasjb, 4 years ago)

Use sentence case in translatable string

  • src/wp-admin/update-core.php

    diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php
    index d3e7f2cd46..0479320d14 100644
    a b function list_core_update( $update ) { 
    3838        static $first_pass = true;
    3939
    4040        $wp_version     = get_bloginfo( 'version' );
    41         $version_string = sprintf( '%s&ndash;<strong>%s</strong>', $update->current, $update->locale );
     41        $version_string = sprintf( '%s&ndash;%s', $update->current, get_locale() );
    4242
    4343        if ( 'en_US' === $update->locale && 'en_US' === get_locale() ) {
    4444                $version_string = $update->current;
    function list_core_update( $update ) { 
    5555                $current = true;
    5656        }
    5757
    58         $submit        = __( 'Update Now' );
    59         $form_action   = 'update-core.php?action=do-core-upgrade';
    60         $php_version   = phpversion();
    61         $mysql_version = $wpdb->db_version();
    62         $show_buttons  = true;
     58        $is_development_version = preg_match( '/alpha|beta|RC/', $version_string );
     59        $submit                 = $is_development_version ? __( 'Update to latest nightly' ) : __( 'Update now' );
     60        $form_action            = 'update-core.php?action=do-core-upgrade';
     61        $php_version            = phpversion();
     62        $mysql_version          = $wpdb->db_version();
     63        $show_buttons           = true;
    6364
    6465        if ( 'development' === $update->response ) {
    6566                $message = __( 'You can update to the latest nightly build manually:' );
    6667        } else {
    6768                if ( $current ) {
     69                        $message = '';
    6870                        /* translators: %s: WordPress version. */
    69                         $message     = sprintf( __( 'If you need to re-install version %s, you can do so here:' ), $version_string );
    70                         $submit      = __( 'Re-install Now' );
     71                        $submit      = sprintf( __( 'Re-install version %s' ), $version_string );
    7172                        $form_action = 'update-core.php?action=do-core-reinstall';
    7273                } else {
    7374                        $php_compat = version_compare( $php_version, $update->php_version, '>=' );
    get_current_screen()->add_help_tab( 
    932933        )
    933934);
    934935
    935 $updates_howto  = '<p>' . __( '<strong>WordPress</strong> &mdash; Updating your WordPress installation is a simple one-click procedure: just <strong>click on the &#8220;Update Now&#8221; button</strong> when you are notified that a new version is available.' ) . ' ' . __( 'In most cases, WordPress will automatically apply maintenance and security updates in the background for you.' ) . '</p>';
     936$updates_howto  = '<p>' . __( '<strong>WordPress</strong> &mdash; Updating your WordPress installation is a simple one-click procedure: just <strong>click on the &#8220;Update now&#8221; button</strong> when you are notified that a new version is available.' ) . ' ' . __( 'In most cases, WordPress will automatically apply maintenance and security updates in the background for you.' ) . '</p>';
    936937$updates_howto .= '<p>' . __( '<strong>Themes and Plugins</strong> &mdash; To update individual themes or plugins from this screen, use the checkboxes to make your selection, then <strong>click on the appropriate &#8220;Update&#8221; button</strong>. To update all of your themes or plugins at once, you can check the box at the top of the section to select all before clicking the update button.' ) . '</p>';
    937938
    938939if ( 'en_US' !== get_locale() ) {