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.

git-svn-id: https://develop.svn.wordpress.org/trunk@37914 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2016-06-29 15:15:40 +00:00
parent 3715a70613
commit 206380180e
73 changed files with 207 additions and 207 deletions

View File

@@ -64,7 +64,7 @@ class Tests_Admin_Includes_Post extends WP_UnitTestCase {
$_results = _wp_translate_postdata( false, $_post_data );
$this->assertInstanceOf( 'WP_Error', $_results );
$this->assertEquals( 'edit_others_posts', $_results->get_error_code() );
$this->assertEquals( 'You are not allowed to create posts as this user.', $_results->get_error_message() );
$this->assertEquals( 'Sorry, you are not allowed to create posts as this user.', $_results->get_error_message() );
// Edit Draft Post for another user
$_post_data = array();
@@ -77,7 +77,7 @@ class Tests_Admin_Includes_Post extends WP_UnitTestCase {
$_results = _wp_translate_postdata( true, $_post_data );
$this->assertInstanceOf( 'WP_Error', $_results );
$this->assertEquals( 'edit_others_posts', $_results->get_error_code() );
$this->assertEquals( 'You are not allowed to edit posts as this user.', $_results->get_error_message() );
$this->assertEquals( 'Sorry, you are not allowed to edit posts as this user.', $_results->get_error_message() );
}
function test__wp_translate_postdata_cap_checks_editor() {