diff --git a/js/messages.php b/js/messages.php index 26377ac2f2..5e441f3320 100644 --- a/js/messages.php +++ b/js/messages.php @@ -173,6 +173,7 @@ $js_messages['strDividedBy'] = __('Divided by %s:'); $js_messages['strFromSlowLog'] = __('From slow log'); $js_messages['strFromGeneralLog'] = __('From general log'); $js_messages['strAnalysingLogs'] = __('Analysing & loading logs. This may take a while.'); +$js_messages['strCancelRequest'] = __('Cancel request'); $js_messages['strCountColumnExplanation'] = __('This column shows the amount of identical queries that are grouped together. However only the SQL query itself has been used as a grouping criteria, so the other attributes of queries, such as start time, may differ.'); $js_messages['strMoreCountColumnExplanation'] = __('Since grouping of INSERTs queries has been selected, INSERT queries into the same table are also being grouped together, disregarding of the inserted data.'); $js_messages['strLogDataLoaded'] = __('Log data loaded. Queries executed in this time span:'); @@ -180,6 +181,15 @@ $js_messages['strLogDataLoaded'] = __('Log data loaded. Queries executed in this $js_messages['strJumpToTable'] = __('Jump to Log table'); $js_messages['strNoDataFound'] = __('Log analysed, but no data found in this time span.'); +$js_messages['strAnalyzing'] = __('Analyzing...'); +$js_messages['strExplainOutput'] = __('Explain output'); +$js_messages['strStatus'] = __('Status'); +$js_messages['strTime'] = __('Time'); +$js_messages['strTotalTime'] = __('Total time:'); +$js_messages['strProfilingResults'] = __('Profiling results'); +$js_messages['strTable'] = _pgettext('Display format', 'Table'); +$js_messages['strChart'] = __('Chart'); + /* l10n: A collection of available filters */ $js_messages['strFiltersForLogTable'] = __('Log table filter options'); /* l10n: Filter as in "Start Filtering" */ diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js index 1f68f22c30..9c26b314c9 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -1339,19 +1339,20 @@ $(function() { $('#emptyDialog').html(PMA_messages['strAnalysingLogs'] + ' '); + var dlgBtns = {}; + + dlgBtns[PMA_messages['strCancelRequest']] = function() { + if (logRequest != null) { + logRequest.abort(); + } + + $(this).dialog("close"); + } $('#emptyDialog').dialog({ width: 'auto', height: 'auto', - buttons: { - 'Cancel request': function() { - if (logRequest != null) { - logRequest.abort(); - } - - $(this).dialog("close"); - } - } + buttons: dlgBtns }); @@ -1731,7 +1732,7 @@ $(function() { var db = rowData.db || ''; $('div#queryAnalyzerDialog div.placeHolder').html( - 'Analyzing... ' + ''); $.post('server_status.php?' + url_query, { @@ -1752,7 +1753,7 @@ $(function() { $('div#queryAnalyzerDialog div.placeHolder') .html('
'); - var explain = 'Explain output ' + explain_docu; + var explain = '' + PMA_messages['strExplainOutput'] + ' ' + explain_docu; if (data.explain.length > 1) { explain += ' ('; for (var i = 0; i < data.explain.length; i++) { @@ -1792,7 +1793,7 @@ $(function() { if (data.profiling) { var chartData = []; - var numberTable = ''; + var numberTable = '
StatusTime
'; var duration; for (var i = 0; i < data.profiling.length; i++) { @@ -1803,10 +1804,13 @@ $(function() { numberTable += ''; } - numberTable += ''; + numberTable += ''; numberTable += '
' + PMA_messages['strStatus'] + '' + PMA_messages['strTime'] + '
' + data.profiling[i].state + ' ' + PMA_prettyProfilingNum(duration, 2) + '
Total time:' + PMA_prettyProfilingNum(totalTime, 2) + '
' + PMA_messages['strTotalTime'] + '' + PMA_prettyProfilingNum(totalTime, 2) + '
'; - $('div#queryAnalyzerDialog div.placeHolder td.chart').append('Profiling results ' + profiling_docu + ' (Table, Chart)
' + numberTable + '
'); + $('div#queryAnalyzerDialog div.placeHolder td.chart').append( + '' + PMA_messages['strProfilingResults'] + ' ' + profiling_docu + ' ' + + '(' + PMA_messages['strTable'] + ', ' + PMA_messages['strChart'] + ')
' + + numberTable + '
'); $('div#queryAnalyzerDialog div.placeHolder a[href="#showNums"]').click(function() { $('div#queryAnalyzerDialog div#queryProfiling').hide(); diff --git a/libraries/Advisor.class.php b/libraries/Advisor.class.php index f5ed188c02..8ef331dcc2 100644 --- a/libraries/Advisor.class.php +++ b/libraries/Advisor.class.php @@ -323,16 +323,16 @@ function PMA_bytime($num, $precision) { $per = ''; if ($num >= 1) { // per second - $per = "per second"; + $per = __('per second'); } elseif ($num*60 >= 1) { // per minute $num = $num*60; - $per = "per minute"; + $per = __('per minute'); } elseif ($num*60*60 >=1 ) { // per hour $num = $num*60*60; - $per = "per hour"; + $per = __('per hour'); } else { $num = $num*60*60*24; - $per = "per day"; + $per = __('per day'); } $num = round($num, $precision);