mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Site Health: Correct the label for wp-content directory check.
This removes HTML tags from the label, which were not displayed as expected due to escaping. Including the directory name in the label is also redundant, as it is already mentioned in the check result description directly below. Includes: * Adjusting a few other labels for consistency. * Moving `wp-content` out of the translatable string in a similar message in `WP_Upgrader::generic_strings()`. Follow-up to [55720]. Props dlh, mukesh27, audrasjb, SergeyBiryukov. See #58678. git-svn-id: https://develop.svn.wordpress.org/trunk@56117 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a1a31fc473
commit
280e720059
@ -2009,12 +2009,8 @@ class WP_Site_Health {
|
||||
$wp_content = $wp_filesystem->wp_content_dir();
|
||||
|
||||
if ( ! $wp_content ) {
|
||||
$result['status'] = 'critical';
|
||||
$result['label'] = sprintf(
|
||||
/* translators: %s: wp-content */
|
||||
__( 'Unable to locate WordPress content directory (%s)' ),
|
||||
'<code>wp-content</code>'
|
||||
);
|
||||
$result['status'] = 'critical';
|
||||
$result['label'] = __( 'Unable to locate WordPress content directory' );
|
||||
$result['description'] = sprintf(
|
||||
/* translators: %s: wp-content */
|
||||
'<p>' . __( 'The %s directory cannot be located.' ) . '</p>',
|
||||
@ -2079,12 +2075,8 @@ class WP_Site_Health {
|
||||
}
|
||||
|
||||
if ( ! $backup_dir_exists && $upgrade_dir_exists && ! $upgrade_dir_is_writable ) {
|
||||
$result['status'] = 'critical';
|
||||
$result['label'] = sprintf(
|
||||
/* translators: %s: upgrade */
|
||||
__( 'The %s directory exists but is not writable' ),
|
||||
'upgrade'
|
||||
);
|
||||
$result['status'] = 'critical';
|
||||
$result['label'] = __( 'The upgrade directory exists but is not writable' );
|
||||
$result['description'] = sprintf(
|
||||
/* translators: %s: wp-content/upgrade */
|
||||
'<p>' . __( 'The %s directory exists but is not writable. This directory is used for plugin and theme updates. Please make sure the server has write permissions to this directory.' ) . '</p>',
|
||||
@ -2094,12 +2086,8 @@ class WP_Site_Health {
|
||||
}
|
||||
|
||||
if ( ! $upgrade_dir_exists && ! $wp_filesystem->is_writable( $wp_content ) ) {
|
||||
$result['status'] = 'critical';
|
||||
$result['label'] = sprintf(
|
||||
/* translators: %s: upgrade */
|
||||
__( 'The %s directory cannot be created' ),
|
||||
'upgrade'
|
||||
);
|
||||
$result['status'] = 'critical';
|
||||
$result['label'] = __( 'The upgrade directory cannot be created' );
|
||||
$result['description'] = sprintf(
|
||||
/* translators: 1: wp-content/upgrade, 2: wp-content. */
|
||||
'<p>' . __( 'The %1$s directory does not exist, and the server does not have write permissions in %2$s to create it. This directory is used for plugin and theme updates. Please make sure the server has write permissions in %2$s.' ) . '</p>',
|
||||
|
||||
@ -189,7 +189,7 @@ class WP_Upgrader {
|
||||
$this->strings['fs_unavailable'] = __( 'Could not access filesystem.' );
|
||||
$this->strings['fs_error'] = __( 'Filesystem error.' );
|
||||
$this->strings['fs_no_root_dir'] = __( 'Unable to locate WordPress root directory.' );
|
||||
$this->strings['fs_no_content_dir'] = __( 'Unable to locate WordPress content directory (wp-content).' );
|
||||
$this->strings['fs_no_content_dir'] = sprintf( __( 'Unable to locate WordPress content directory (%s).' ), 'wp-content' );
|
||||
$this->strings['fs_no_plugins_dir'] = __( 'Unable to locate WordPress plugin directory.' );
|
||||
$this->strings['fs_no_themes_dir'] = __( 'Unable to locate WordPress theme directory.' );
|
||||
/* translators: %s: Directory name. */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user