Make WordPress Core

Changeset 37635


Ignore:
Timestamp:
06/05/2016 12:21:38 PM (7 years ago)
Author:
ocean90
Message:

Upgrader: Don't use Language_Pack_Upgrader_Skin::before() and Language_Pack_Upgrader_Skin::after() when translations are up to date.

Avoids a PHP notice since Language_Pack_Upgrader_Skin::before() tries to access a non-existent update.
Also, change the up_to_date string to use the plural form because translations are only updated in bulk mode.

Fixes #36615.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-language-pack-upgrader.php

    r37488 r37635  
    115115    public function upgrade_strings() {
    116116        $this->strings['starting_upgrade'] = __( 'Some of your translations need updating. Sit tight for a few more seconds while we update them as well.' );
    117         $this->strings['up_to_date'] = __( 'The translation is up to date.' ); // We need to silently skip this case
     117        $this->strings['up_to_date'] = __( 'The translations are up to date.' );
    118118        $this->strings['no_package'] = __( 'Update package not available.' );
    119119        $this->strings['downloading_package'] = __( 'Downloading translation from <span class="code">%s</span>&#8230;' );
     
    182182        if ( empty( $language_updates ) ) {
    183183            $this->skin->header();
    184             $this->skin->before();
    185184            $this->skin->set_result( true );
    186185            $this->skin->feedback( 'up_to_date' );
    187             $this->skin->after();
    188186            $this->skin->bulk_footer();
    189187            $this->skin->footer();
Note: See TracChangeset for help on using the changeset viewer.