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. git-svn-id: https://develop.svn.wordpress.org/trunk@37635 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a77ffd8e83
commit
5259f34578
@ -114,7 +114,7 @@ class Language_Pack_Upgrader extends WP_Upgrader {
|
||||
*/
|
||||
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['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['downloading_package'] = __( 'Downloading translation from <span class="code">%s</span>…' );
|
||||
$this->strings['unpack_package'] = __( 'Unpacking the update…' );
|
||||
@ -181,10 +181,8 @@ class Language_Pack_Upgrader extends WP_Upgrader {
|
||||
|
||||
if ( empty( $language_updates ) ) {
|
||||
$this->skin->header();
|
||||
$this->skin->before();
|
||||
$this->skin->set_result( true );
|
||||
$this->skin->feedback( 'up_to_date' );
|
||||
$this->skin->after();
|
||||
$this->skin->bulk_footer();
|
||||
$this->skin->footer();
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user