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.
Built from https://develop.svn.wordpress.org/trunk@37635


git-svn-id: http://core.svn.wordpress.org/trunk@37603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2016-06-05 12:22:30 +00:00
parent 57e5e7fd79
commit d8357b76c5
2 changed files with 2 additions and 4 deletions

View File

@ -114,7 +114,7 @@ class Language_Pack_Upgrader extends WP_Upgrader {
*/ */
public function upgrade_strings() { public function upgrade_strings() {
$this->strings['starting_upgrade'] = __( 'Some of your translations need updating. Sit tight for a few more seconds while we update them as well.' ); $this->strings['starting_upgrade'] = __( 'Some of your translations need updating. Sit tight for a few more seconds while we update them as well.' );
$this->strings['up_to_date'] = __( 'The translation is up to date.' ); // We need to silently skip this case $this->strings['up_to_date'] = __( 'The translations are up to date.' );
$this->strings['no_package'] = __( 'Update package not available.' ); $this->strings['no_package'] = __( 'Update package not available.' );
$this->strings['downloading_package'] = __( 'Downloading translation from <span class="code">%s</span>&#8230;' ); $this->strings['downloading_package'] = __( 'Downloading translation from <span class="code">%s</span>&#8230;' );
$this->strings['unpack_package'] = __( 'Unpacking the update&#8230;' ); $this->strings['unpack_package'] = __( 'Unpacking the update&#8230;' );
@ -181,10 +181,8 @@ class Language_Pack_Upgrader extends WP_Upgrader {
if ( empty( $language_updates ) ) { if ( empty( $language_updates ) ) {
$this->skin->header(); $this->skin->header();
$this->skin->before();
$this->skin->set_result( true ); $this->skin->set_result( true );
$this->skin->feedback( 'up_to_date' ); $this->skin->feedback( 'up_to_date' );
$this->skin->after();
$this->skin->bulk_footer(); $this->skin->bulk_footer();
$this->skin->footer(); $this->skin->footer();
return true; return true;

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.6-alpha-37634'; $wp_version = '4.6-alpha-37635';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.