Make WordPress Core

Changeset 53337


Ignore:
Timestamp:
05/03/2022 02:51:41 PM (4 years ago)
Author:
audrasjb
Message:

General: Add missing strong tag to some error messages.

This changeset adds missing strong tag to some error messages and updates some AJAX messages, for better consistency.

Follow-up to [53118].

Props NekoJonez, audrasjb, ocean90.
Fixes #54437.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r53183 r53337  
    12921292                wp_die( 1 );
    12931293        } elseif ( in_array( $post->post_status, array( 'draft', 'pending', 'trash' ), true ) ) {
    1294                 wp_die( __( 'Error: You cannot reply to a comment on a draft post.' ) );
     1294                wp_die( __( 'You cannot reply to a comment on a draft post.' ) );
    12951295        }
    12961296
    … …  
    13221322
    13231323        if ( '' === $comment_content ) {
    1324                 wp_die( __( 'Error: Please type your comment text.' ) );
     1324                wp_die( __( 'Please type your comment text.' ) );
    13251325        }
    13261326
    … …  
    14241424
    14251425        if ( '' === $_POST['content'] ) {
    1426                 wp_die( __( 'Error: Please type your comment text.' ) );
     1426                wp_die( __( 'Please type your comment text.' ) );
    14271427        }
    14281428
  • trunk/src/wp-admin/options-permalink.php

    r53127 r53337  
    369369                                printf(
    370370                                        /* translators: 1: web.config, 2: Documentation URL, 3: Ctrl + A, 4: ⌘ + A, 5: Element code. */
    371                                         __( 'Error: Your %1$s file is not <a href="%2$s">writable</a>, so updating it automatically was not possible. This is the URL rewrite rule you should have in your %1$s file. Click in the field and press %3$s (or %4$s on Mac) to select all. Then insert this rule inside of the %5$s element in %1$s file.' ),
     371                                        __( '<strong>Error:</strong> Your %1$s file is not <a href="%2$s">writable</a>, so updating it automatically was not possible. This is the URL rewrite rule you should have in your %1$s file. Click in the field and press %3$s (or %4$s on Mac) to select all. Then insert this rule inside of the %5$s element in %1$s file.' ),
    372372                                        '<code>web.config</code>',
    373373                                        __( 'https://wordpress.org/support/article/changing-file-permissions/' ),
    … …  
    396396                        printf(
    397397                                /* translators: 1: Documentation URL, 2: web.config, 3: Ctrl + A, 4: ⌘ + A */
    398                                 __( 'Error: The root directory of your site is not <a href="%1$s">writable</a>, so creating a file automatically was not possible. This is the URL rewrite rule you should have in your %2$s file. Create a new file called %2$s in the root directory of your site. Click in the field and press %3$s (or %4$s on Mac) to select all. Then insert this code into the %2$s file.' ),
     398                                __( '<strong>Error:</strong> The root directory of your site is not <a href="%1$s">writable</a>, so creating a file automatically was not possible. This is the URL rewrite rule you should have in your %2$s file. Create a new file called %2$s in the root directory of your site. Click in the field and press %3$s (or %4$s on Mac) to select all. Then insert this code into the %2$s file.' ),
    399399                                __( 'https://wordpress.org/support/article/changing-file-permissions/' ),
    400400                                '<code>web.config</code>',
    … …  
    427427                printf(
    428428                        /* translators: 1: .htaccess, 2: Documentation URL, 3: Ctrl + A, 4: ⌘ + A */
    429                         __( 'Error: Your %1$s file is not <a href="%2$s">writable</a>, so updating it automatically was not possible. These are the mod_rewrite rules you should have in your %1$s file. Click in the field and press %3$s (or %4$s on Mac) to select all.' ),
     429                        __( '<strong>Error:</strong> Your %1$s file is not <a href="%2$s">writable</a>, so updating it automatically was not possible. These are the mod_rewrite rules you should have in your %1$s file. Click in the field and press %3$s (or %4$s on Mac) to select all.' ),
    430430                        '<code>.htaccess</code>',
    431431                        __( 'https://wordpress.org/support/article/changing-file-permissions/' ),
  • trunk/tests/phpunit/tests/ajax/ReplytoComment.php

    r52978 r53337  
    187187                // Make the request.
    188188                $this->expectException( 'WPAjaxDieStopException' );
    189                 $this->expectExceptionMessage( 'Error: You cannot reply to a comment on a draft post.' );
     189                $this->expectExceptionMessage( 'You cannot reply to a comment on a draft post.' );
    190190                $this->_handleAjax( 'replyto-comment' );
    191191        }
Note: See TracChangeset for help on using the changeset viewer.