Remove `<code>` 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
This commit is contained in:
parent
8c2ed5330a
commit
d6e25c0aae
|
@ -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 <code>style.css</code> 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.' ),
|
||||
'<code>style.css</code>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$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 <code>style.css</code> 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.' ),
|
||||
'<code>style.css</code>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// 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 <code>index.php</code> 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.' ),
|
||||
'<code>index.php</code>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
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 <code>.po</code> or <code>.mo</code> files.' ) );
|
||||
/* translators: 1: .po 2: .mo */
|
||||
sprintf( __( 'The language pack is missing either the %1$s or %2$s files.' ),
|
||||
'<code>.po</code>',
|
||||
'<code>.mo</code>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return $source;
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue