From 815bf44584f104d1616ca1d05a2aaba34580a418 Mon Sep 17 00:00:00 2001 From: Deven Bansod Date: Thu, 8 Sep 2016 10:39:19 +0530 Subject: [PATCH] Fix error messages to suit better localization Signed-off-by: Deven Bansod --- libraries/rte/rte_export.lib.php | 3 +-- libraries/rte/rte_routines.lib.php | 3 +-- libraries/rte/rte_words.lib.php | 6 ++++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/rte/rte_export.lib.php b/libraries/rte/rte_export.lib.php index 19fa6dd0fb..94b59ff5aa 100644 --- a/libraries/rte/rte_export.lib.php +++ b/libraries/rte/rte_export.lib.php @@ -44,8 +44,7 @@ function PMA_RTE_handleExport($export_data) } else { $_db = htmlspecialchars(PMA\libraries\Util::backquote($db)); $message = __('Error in processing request:') . ' ' - . sprintf(PMA_RTE_getWord('not_found'), $item_name, $_db) - . ' OR ' . PMA_RTE_getWord('no_view'); + . sprintf(PMA_RTE_getWord('no_view'), $item_name, $_db); $message = Message::error($message); if ($GLOBALS['is_ajax_request'] == true) { diff --git a/libraries/rte/rte_routines.lib.php b/libraries/rte/rte_routines.lib.php index 21eb9bf9db..2db6fcf79c 100644 --- a/libraries/rte/rte_routines.lib.php +++ b/libraries/rte/rte_routines.lib.php @@ -155,13 +155,12 @@ function PMA_RTN_handleEditor() } else { $message = __('Error in processing request:') . ' '; $message .= sprintf( - PMA_RTE_getWord('not_found'), + PMA_RTE_getWord('no_edit'), htmlspecialchars( PMA\libraries\Util::backquote($_REQUEST['item_name']) ), htmlspecialchars(PMA\libraries\Util::backquote($db)) ); - $message .= ' OR ' . PMA_RTE_getWord('no_edit'); $message = Message::error($message); if ($GLOBALS['is_ajax_request']) { diff --git a/libraries/rte/rte_words.lib.php b/libraries/rte/rte_words.lib.php index ff301874df..3205c2e7fb 100644 --- a/libraries/rte/rte_words.lib.php +++ b/libraries/rte/rte_words.lib.php @@ -32,10 +32,12 @@ function PMA_RTE_getWord($index) 'You do not have the necessary privileges to create a routine' ), 'no_edit' => __( - 'You do not have the necessary privileges to edit this routine' + 'No routine with name %1$s found in database %2$s. ' + . 'You might be lacking the necessary privileges to edit this routine' ), 'no_view' => __( - 'You do not have the necessary privileges to view/export this routine' + 'No routine with name %1$s found in database %2$s. ' + . 'You might be lacking the necessary privileges to view/export this routine' ), 'not_found' => __('No routine with name %1$s found in database %2$s'), 'nothing' => __('There are no routines to display.'),