From d6e25c0aaedb6054aac6b9481d8d112642cd6f90 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 6 Nov 2015 00:41:25 +0000 Subject: [PATCH] Remove `` tags from translatable strings in `wp-admin/includes/class-wp-upgrader.php`. Add translator comments. Props ramiy. Fixes #34580. Built from https://develop.svn.wordpress.org/trunk@35551 git-svn-id: http://core.svn.wordpress.org/trunk@35515 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-upgrader.php | 40 ++++++++++++++++++++----- wp-includes/version.php | 2 +- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index 3cada43ed3..bcf6684ee9 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -1649,17 +1649,35 @@ class Theme_Upgrader extends WP_Upgrader { return $source; // A proper archive should have a style.css file in the single subdirectory - if ( ! file_exists( $working_directory . 'style.css' ) ) - return new WP_Error( 'incompatible_archive_theme_no_style', $this->strings['incompatible_archive'], __( 'The theme is missing the style.css stylesheet.' ) ); + if ( ! file_exists( $working_directory . 'style.css' ) ) { + return new WP_Error( 'incompatible_archive_theme_no_style', $this->strings['incompatible_archive'], + /* translators: %s: style.css */ + sprintf( __( 'The theme is missing the %s stylesheet.' ), + 'style.css' + ) + ); + } $info = get_file_data( $working_directory . 'style.css', array( 'Name' => 'Theme Name', 'Template' => 'Template' ) ); - if ( empty( $info['Name'] ) ) - return new WP_Error( 'incompatible_archive_theme_no_name', $this->strings['incompatible_archive'], __( "The style.css stylesheet doesn't contain a valid theme header." ) ); + if ( empty( $info['Name'] ) ) { + return new WP_Error( 'incompatible_archive_theme_no_name', $this->strings['incompatible_archive'], + /* translators: %s: style.css */ + sprintf( __( 'The %s stylesheet doesn’t contain a valid theme header.' ), + 'style.css' + ) + ); + } // If it's not a child theme, it must have at least an index.php to be legit. - if ( empty( $info['Template'] ) && ! file_exists( $working_directory . 'index.php' ) ) - return new WP_Error( 'incompatible_archive_theme_no_index', $this->strings['incompatible_archive'], __( 'The theme is missing the index.php file.' ) ); + if ( empty( $info['Template'] ) && ! file_exists( $working_directory . 'index.php' ) ) { + return new WP_Error( 'incompatible_archive_theme_no_index', $this->strings['incompatible_archive'], + /* translators: %s: index.php */ + sprintf( __( 'The theme is missing the %s file.' ), + 'index.php' + ) + ); + } return $source; } @@ -2084,9 +2102,15 @@ class Language_Pack_Upgrader extends WP_Upgrader { $mo = true; } - if ( ! $mo || ! $po ) + if ( ! $mo || ! $po ) { return new WP_Error( 'incompatible_archive_pomo', $this->strings['incompatible_archive'], - __( 'The language pack is missing either the .po or .mo files.' ) ); + /* translators: 1: .po 2: .mo */ + sprintf( __( 'The language pack is missing either the %1$s or %2$s files.' ), + '.po', + '.mo' + ) + ); + } return $source; } diff --git a/wp-includes/version.php b/wp-includes/version.php index d26cadecd1..3992bd60fc 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-beta3-35550'; +$wp_version = '4.4-beta3-35551'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.