From 479caffc141a76d7251ee52f4a14ded3780eb2e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 23 Jan 2014 10:41:32 +0100 Subject: [PATCH 1/2] End sentences with punctuation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- libraries/DisplayResults.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index fcbf6f8e30..765c7dfa02 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -3402,7 +3402,7 @@ class PMA_DisplayResults 'db' => $this->__get('db'), 'table' => $this->__get('table'), 'sql_query' => $url_sql_query, - 'message_to_show' => __('The row has been deleted'), + 'message_to_show' => __('The row has been deleted.'), 'goto' => (empty($goto) ? 'tbl_sql.php' : $goto), ); @@ -3418,7 +3418,7 @@ class PMA_DisplayResults 'db' => $this->__get('db'), 'table' => $this->__get('table'), 'sql_query' => $del_query, - 'message_to_show' => __('The row has been deleted'), + 'message_to_show' => __('The row has been deleted.'), 'goto' => $lnk_goto, ); $del_url = 'sql.php' . PMA_URL_getCommon($_url_params); @@ -4588,7 +4588,7 @@ class PMA_DisplayResults } elseif (! isset($printview) || ($printview != '1')) { $table_html .= PMA_Util::getMessage( - __('Your SQL query has been executed successfully'), + __('Your SQL query has been executed successfully.'), $this->__get('sql_query'), 'success' ); } @@ -4999,7 +4999,7 @@ class PMA_DisplayResults $message->addMessage(', ', ''); } - $message_qt = PMA_Message::notice(__('Query took %01.4f sec') . ')'); + $message_qt = PMA_Message::notice(__('Query took %01.4f seconds.') . ')'); $message_qt->addParam($this->__get('querytime')); $message->addMessage($message_qt, ''); @@ -5634,7 +5634,7 @@ class PMA_DisplayResults if ($dispresult && $GLOBALS['dbi']->numRows($dispresult) > 0) { list($dispval) = $GLOBALS['dbi']->fetchRow($dispresult, 0); } else { - $dispval = __('Link not found'); + $dispval = __('Link not found!'); } @$GLOBALS['dbi']->freeResult($dispresult); From 67242280e2f03c0fcc7f135da2167afe62df0716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 23 Jan 2014 10:48:55 +0100 Subject: [PATCH 2/2] Avoid concatenating message, it can be hard to properly translate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- libraries/DisplayResults.class.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 765c7dfa02..d7c8bd5c20 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -4924,12 +4924,6 @@ class PMA_DisplayResults $unlim_num_rows = $this->__get('unlim_num_rows'); // To use in isset() - if (isset($unlim_num_rows) && ($unlim_num_rows != $total)) { - $selectstring = ', ' . $unlim_num_rows . ' ' . __('in query'); - } else { - $selectstring = ''; - } - if (! empty($limit_clause)) { $limit_data @@ -4987,15 +4981,21 @@ class PMA_DisplayResults $message->addMessage('('); if (!$message_view_warning) { - $message_total = PMA_Message::notice($pre_count . __('%d total')); - $message_total->addParam($total); + + if (isset($unlim_num_rows) && ($unlim_num_rows != $total)) { + $message_total = PMA_Message::notice($pre_count . __('%1$d total, %2$d in query')); + $message_total->addParam($total); + $message_total->addParam($unlim_num_rows); + } else { + $message_total = PMA_Message::notice($pre_count . __('%d total')); + $message_total->addParam($total); + } if (!empty($after_count)) { $message_total->addMessage($after_count); } $message->addMessage($message_total, ''); - $message->addMessage($selectstring, ''); $message->addMessage(', ', ''); }