Make WordPress Core

Changeset 56117

Timestamp:
06/30/2023 11:11:13 AM (13 months ago)
Author:
SergeyBiryukov
Message:

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.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-site-health.php

    r55988 r56117  
    20102010
    20112011        if ( ! $wp_content ) {
    2012             $result['status'] = 'critical';
    2013             $result['label']  = sprintf(
    2014                 /* translators: %s: wp-content */
    2015                 __( 'Unable to locate WordPress content directory (%s)' ),
    2016                 '<code>wp-content</code>'
    2017             );
     2012            $result['status']      = 'critical';
     2013            $result['label']       = __( 'Unable to locate WordPress content directory' );
    20182014            $result['description'] = sprintf(
    20192015                /* translators: %s: wp-content */
     
    20802076
    20812077        if ( ! $backup_dir_exists && $upgrade_dir_exists && ! $upgrade_dir_is_writable ) {
    2082             $result['status'] = 'critical';
    2083             $result['label']  = sprintf(
    2084                 /* translators: %s: upgrade */
    2085                 __( 'The %s directory exists but is not writable' ),
    2086                 'upgrade'
    2087             );
     2078            $result['status']      = 'critical';
     2079            $result['label']       = __( 'The upgrade directory exists but is not writable' );
    20882080            $result['description'] = sprintf(
    20892081                /* translators: %s: wp-content/upgrade */
     
    20952087
    20962088        if ( ! $upgrade_dir_exists && ! $wp_filesystem->is_writable( $wp_content ) ) {
    2097             $result['status'] = 'critical';
    2098             $result['label']  = sprintf(
    2099                 /* translators: %s: upgrade */
    2100                 __( 'The %s directory cannot be created' ),
    2101                 'upgrade'
    2102             );
     2089            $result['status']      = 'critical';
     2090            $result['label']       = __( 'The upgrade directory cannot be created' );
    21032091            $result['description'] = sprintf(
    21042092                /* translators: 1: wp-content/upgrade, 2: wp-content. */
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r55911 r56117  
    190190        $this->strings['fs_error']          = __( 'Filesystem error.' );
    191191        $this->strings['fs_no_root_dir']    = __( 'Unable to locate WordPress root directory.' );
    192         $this->strings['fs_no_content_dir'] = __( 'Unable to locate WordPress content directory (wp-content).' );
     192        $this->strings['fs_no_content_dir'] = ' );
    193193        $this->strings['fs_no_plugins_dir'] = __( 'Unable to locate WordPress plugin directory.' );
    194194        $this->strings['fs_no_themes_dir']  = __( 'Unable to locate WordPress theme directory.' );
Note: See TracChangeset for help on using the changeset viewer.