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/src/wp-includes/script-loader.php

    r37908 r37914  
    125125    $scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array('jquery'), false, 1 );
    126126    did_action( 'init' ) && $scripts->localize( 'wp-ajax-response', 'wpAjax', array(
    127         'noPerm' => __('You do not have permission to do that.'),
     127        'noPerm' => __('Sorry, you are not allowed to do that.'),
    128128        'broken' => __('An unidentified error has occurred.')
    129129    ) );
     
    446446        'close'              => __( 'Close' ),
    447447        'cheatin'            => __( 'Cheatin&#8217; uh?' ),
    448         'notAllowed'         => __( 'You are not allowed to customize this site.' ),
     448        'notAllowed'         => __( 'Sorry, you are not allowed to customize this site.' ),
    449449        'previewIframeTitle' => __( 'Site Preview' ),
    450450        'loginIframeTitle'   => __( 'Session expired' ),
     
    486486        $scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 );
    487487        did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array(
    488             'noPerm' => __('You do not have permission to do that.'),
     488            'noPerm' => __('Sorry, you are not allowed to do that.'),
    489489            'broken' => __('An unidentified error has occurred.')
    490490        ));
Note: See TracChangeset for help on using the changeset viewer.