WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/29/2016 03:15:40 PM (5 years ago)
Author:
ocean90
Message:

Text Changes: Unify permission error messages.

The new format looks like "Sorry, you are not allowed to <action>.". This provides a consistent experience for all error messages related to missing permissions. It also reduces the number of similar strings and allows translators to provide a consistent style in their language.

Props ramiy, Presskopp.
Fixes #34521.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/includesPost.php

    r36853 r37914  
    6565        $this->assertInstanceOf( 'WP_Error', $_results );
    6666        $this->assertEquals( 'edit_others_posts', $_results->get_error_code() );
    67         $this->assertEquals( 'You are not allowed to create posts as this user.', $_results->get_error_message() );
     67        $this->assertEquals( 'Sorry, you are not allowed to create posts as this user.', $_results->get_error_message() );
    6868
    6969        // Edit Draft Post for another user
     
    7878        $this->assertInstanceOf( 'WP_Error', $_results );
    7979        $this->assertEquals( 'edit_others_posts', $_results->get_error_code() );
    80         $this->assertEquals( 'You are not allowed to edit posts as this user.', $_results->get_error_message() );
     80        $this->assertEquals( 'Sorry, you are not allowed to edit posts as this user.', $_results->get_error_message() );
    8181    }
    8282
Note: See TracChangeset for help on using the changeset viewer.