General: Replace Cheatin’ uh? with friendlier error messages.

While intended as a playful error message, `Cheatin’ uh?` can be interpreted as insulting or accusatory in an already stressful situation. This replaces Cheatin’ with more meaningful error messages, depending on the error that occurs.

Props ElectricFeet, EricMeyer, karmatosed, dd32, BandonRandon, melchoyce for language; dmsnell for original patch; peterwilsoncc.
Fixes #38332.



git-svn-id: https://develop.svn.wordpress.org/trunk@42648 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Wilson
2018-02-05 02:29:53 +00:00
parent d512973c84
commit f317869c7f
24 changed files with 47 additions and 46 deletions

View File

@@ -137,7 +137,7 @@ function wp_default_scripts( &$scripts ) {
did_action( 'init' ) && $scripts->localize(
'wp-ajax-response', 'wpAjax', array(
'noPerm' => __( 'Sorry, you are not allowed to do that.' ),
'broken' => __( 'An unidentified error has occurred.' ),
'broken' => __( 'An error has occurred.' ),
)
);
@@ -605,7 +605,8 @@ function wp_default_scripts( &$scripts ) {
'close' => __( 'Close' ),
'action' => __( 'Action' ),
'discardChanges' => __( 'Discard changes' ),
'cheatin' => __( 'Cheatin’ uh?' ),
'cheatin' => __( 'An error has occurred.' ),
'notAllowedHeading' => __( 'You don’t have permission to do this.' ),
'notAllowed' => __( 'Sorry, you are not allowed to customize this site.' ),
'previewIframeTitle' => __( 'Site Preview' ),
'loginIframeTitle' => __( 'Session expired' ),
@@ -688,7 +689,7 @@ function wp_default_scripts( &$scripts ) {
did_action( 'init' ) && $scripts->localize(
'admin-tags', 'tagsl10n', array(
'noPerm' => __( 'Sorry, you are not allowed to do that.' ),
'broken' => __( 'An unidentified error has occurred.' ),
'broken' => __( 'An error has occurred.' ),
)
);
@@ -917,7 +918,7 @@ function wp_default_scripts( &$scripts ) {
'activateImporter' => __( 'Run Importer' ),
/* translators: %s: Importer name */
'activateImporterLabel' => __( 'Run %s' ),
'unknownError' => __( 'An unidentified error has occurred.' ),
'unknownError' => __( 'An error has occurred.' ),
'connectionError' => __( 'Connection lost or the server is busy. Please try again later.' ),
'nonceError' => __( 'An error has occurred. Please reload the page and try again.' ),
'pluginsFound' => __( 'Number of plugins found: %d' ),