Make WordPress Core

Changeset 56276


Ignore:
Timestamp:
07/21/2023 01:31:17 PM (18 months ago)
Author:
SergeyBiryukov
Message:

I18N: Add missing translator comment in WP_Upgrader::generic_strings().

This resolves a WPCS warning:

A gettext call containing placeholders was found, but was not accompanied by a "translators:" comment on the line above to clarify the meaning of the placeholders.

Includes moving wp-content out of the translatable string in a similar message in _wp_delete_all_temp_backups().

Follow-up to [55720], [56117].

Props jrf.
See #58831.

Location:
trunk/src
Files:
2 edited

Legend:

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

    r56174 r56276  
    190190        $this->strings['fs_error']          = __( 'Filesystem error.' );
    191191        $this->strings['fs_no_root_dir']    = __( 'Unable to locate WordPress root directory.' );
     192        /* translators: %s: Directory name. */
    192193        $this->strings['fs_no_content_dir'] = sprintf( __( 'Unable to locate WordPress content directory (%s).' ), 'wp-content' );
    193194        $this->strings['fs_no_plugins_dir'] = __( 'Unable to locate WordPress plugin directory.' );
  • trunk/src/wp-includes/update.php

    r56050 r56276  
    11201120
    11211121    if ( ! $wp_filesystem->wp_content_dir() ) {
    1122         return new WP_Error( 'fs_no_content_dir', __( 'Unable to locate WordPress content directory (wp-content).' ) );
     1122        return new WP_Error(
     1123            'fs_no_content_dir',
     1124            /* translators: %s: Directory name. */
     1125            sprintf( __( 'Unable to locate WordPress content directory (%s).' ), 'wp-content' )
     1126        );
    11231127    }
    11241128
Note: See TracChangeset for help on using the changeset viewer.