1<?php
2/* vim: set expandtab sw=4 ts=4 sts=4: */
3/**
4 * Exporting of translated messages from PHP to Javascript
5 *
6 * @package PhpMyAdmin
7 */
8
9if (!defined('TESTSUITE')) {
10    chdir('..');
11
12    // Send correct type:
13    header('Content-Type: text/javascript; charset=UTF-8');
14
15    // Cache output in client - the nocache query parameter makes sure that this
16    // file is reloaded when config changes
17    header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT');
18
19    // Avoid loading the full common.inc.php because this would add many
20    // non-js-compatible stuff like DOCTYPE
21    define('PMA_MINIMUM_COMMON', true);
22    define('PMA_PATH_TO_BASEDIR', '../');
23    define('PMA_NO_SESSION' , true);
24    require_once './libraries/common.inc.php';
25}
26
27// But this one is needed for Sanitize::escapeJsString()
28use PhpMyAdmin\Sanitize;
29
30
31$buffer = PhpMyAdmin\OutputBuffering::getInstance();
32$buffer->start();
33if (!defined('TESTSUITE')) {
34    register_shutdown_function(
35        function () {
36            echo PhpMyAdmin\OutputBuffering::getInstance()->getContents();
37        }
38    );
39}
40
41/* For confirmations */
42$js_messages['strConfirm'] = __('Confirm');
43$js_messages['strDoYouReally'] = __('Do you really want to execute "%s"?');
44$js_messages['strDropDatabaseStrongWarning']
45    = __('You are about to DESTROY a complete database!');
46$js_messages['strDatabaseRenameToSameName']
47    = __('Cannot rename database to the same name. Change the name and try again');
48$js_messages['strDropTableStrongWarning']
49    = __('You are about to DESTROY a complete table!');
50$js_messages['strTruncateTableStrongWarning']
51    = __('You are about to TRUNCATE a complete table!');
52$js_messages['strDeleteTrackingData'] = __('Delete tracking data for this table?');
53$js_messages['strDeleteTrackingDataMultiple']
54    = __('Delete tracking data for these tables?');
55$js_messages['strDeleteTrackingVersion']
56    = __('Delete tracking data for this version?');
57$js_messages['strDeleteTrackingVersionMultiple']
58    = __('Delete tracking data for these versions?');
59$js_messages['strDeletingTrackingEntry'] = __('Delete entry from tracking report?');
60$js_messages['strDeletingTrackingData'] = __('Deleting tracking data');
61$js_messages['strDroppingPrimaryKeyIndex'] = __('Dropping Primary Key/Index');
62$js_messages['strDroppingForeignKey'] = __('Dropping Foreign key.');
63$js_messages['strOperationTakesLongTime']
64    = __('This operation could take a long time. Proceed anyway?');
65$js_messages['strDropUserGroupWarning']
66    = __('Do you really want to delete user group "%s"?');
67$js_messages['strConfirmDeleteQBESearch']
68    = __('Do you really want to delete the search "%s"?');
69$js_messages['strConfirmNavigation']
70    = __('You have unsaved changes; are you sure you want to leave this page?');
71$js_messages['strConfirmRowChange']
72    = __('You are trying to reduce the number of rows, but have already entered data in those rows which will be lost. Do you wish to continue?');
73$js_messages['strDropUserWarning']
74    = __('Do you really want to revoke the selected user(s) ?');
75$js_messages['strDeleteCentralColumnWarning']
76    = __('Do you really want to delete this central column?');
77$js_messages['strDropRTEitems']
78    = __('Do you really want to delete the selected items?');
79$js_messages['strDropPartitionWarning'] = __(
80    'Do you really want to DROP the selected partition(s)? This will also DELETE ' .
81    'the data related to the selected partition(s)!'
82);
83$js_messages['strTruncatePartitionWarning']
84    = __('Do you really want to TRUNCATE the selected partition(s)?');
85$js_messages['strRemovePartitioningWarning']
86    = __('Do you really want to remove partitioning?');
87$js_messages['strResetSlaveWarning'] = __('Do you really want to RESET SLAVE?');
88$js_messages['strChangeColumnCollation'] = __(
89    'This operation will attempt to convert your data to the new collation. In '
90    . 'rare cases, especially where a character doesn\'t exist in the new '
91    . 'collation, this process could cause the data to appear incorrectly under '
92    . 'the new collation; in this case we suggest you revert to the original '
93    . 'collation and refer to the tips at '
94)
95    . '<a href="%s" target="garbled_data_wiki">' . __('Garbled Data') . '</a>.'
96    . '<br/><br/>'
97    . __('Are you sure you wish to change the collation and convert the data?');
98$js_messages['strChangeAllColumnCollationsWarning'] = __(
99    'Through this operation, MySQL attempts to map the data values between '
100    . 'collations. If the character sets are incompatible, there may be data loss '
101    . 'and this lost data may <b>NOT</b> be recoverable simply by changing back the '
102    . 'column collation(s). <b>To convert existing data, it is suggested to use the '
103    . 'column(s) editing feature (the "Change" Link) on the table structure page. '
104    . '</b>'
105)
106. '<br/><br/>'
107. __(
108    'Are you sure you wish to change all the column collations and convert the data?'
109);
110
111/* For modal dialog buttons */
112$js_messages['strSaveAndClose'] = __('Save & close');
113$js_messages['strReset'] = __('Reset');
114$js_messages['strResetAll'] = __('Reset all');
115
116/* For indexes */
117$js_messages['strFormEmpty'] = __('Missing value in the form!');
118$js_messages['strRadioUnchecked'] = __('Select at least one of the options!');
119$js_messages['strEnterValidNumber'] = __('Please enter a valid number!');
120$js_messages['strEnterValidLength'] = __('Please enter a valid length!');
121$js_messages['strAddIndex'] = __('Add index');
122$js_messages['strEditIndex'] = __('Edit index');
123$js_messages['strAddToIndex'] = __('Add %s column(s) to index');
124$js_messages['strCreateSingleColumnIndex'] = __('Create single-column index');
125$js_messages['strCreateCompositeIndex'] = __('Create composite index');
126$js_messages['strCompositeWith'] = __('Composite with:');
127$js_messages['strMissingColumn'] = __('Please select column(s) for the index.');
128
129/* For Preview SQL*/
130$js_messages['strPreviewSQL'] = __('Preview SQL');
131
132/* For Simulate DML*/
133$js_messages['strSimulateDML'] = __('Simulate query');
134$js_messages['strMatchedRows'] = __('Matched rows:');
135$js_messages['strSQLQuery'] = __('SQL query:');
136
137/* Charts */
138/* l10n: Default label for the y-Axis of Charts */
139$js_messages['strYValues'] = __('Y values');
140
141/* Database multi-table query */
142$js_messages['strEmptyQuery'] = __('Please enter the SQL query first.');
143
144/* For server_privileges.js */
145$js_messages['strHostEmpty'] = __('The host name is empty!');
146$js_messages['strUserEmpty'] = __('The user name is empty!');
147$js_messages['strPasswordEmpty'] = __('The password is empty!');
148$js_messages['strPasswordNotSame'] = __('The passwords aren\'t the same!');
149$js_messages['strRemovingSelectedUsers'] = __('Removing Selected Users');
150$js_messages['strClose'] = __('Close');
151
152/* For export.js */
153$js_messages['strTemplateCreated'] = __('Template was created.');
154$js_messages['strTemplateLoaded'] = __('Template was loaded.');
155$js_messages['strTemplateUpdated'] = __('Template was updated.');
156$js_messages['strTemplateDeleted'] = __('Template was deleted.');
157
158/* l10n: Other, small valued, queries */
159$js_messages['strOther'] = __('Other');
160/* l10n: Thousands separator */
161$js_messages['strThousandsSeparator'] = __(',');
162/* l10n: Decimal separator */
163$js_messages['strDecimalSeparator'] = __('.');
164
165$js_messages['strChartConnectionsTitle'] = __('Connections / Processes');
166
167/* server status monitor */
168$js_messages['strIncompatibleMonitorConfig']
169    = __('Local monitor configuration incompatible!');
170$js_messages['strIncompatibleMonitorConfigDescription'] = __(
171    'The chart arrangement configuration in your browsers local storage is not '
172    . 'compatible anymore to the newer version of the monitor dialog. It is very '
173    . 'likely that your current configuration will not work anymore. Please reset '
174    . 'your configuration to default in the <i>Settings</i> menu.'
175);
176
177$js_messages['strQueryCacheEfficiency'] = __('Query cache efficiency');
178$js_messages['strQueryCacheUsage'] = __('Query cache usage');
179$js_messages['strQueryCacheUsed'] = __('Query cache used');
180
181$js_messages['strSystemCPUUsage'] = __('System CPU usage');
182$js_messages['strSystemMemory'] = __('System memory');
183$js_messages['strSystemSwap'] = __('System swap');
184
185$js_messages['strAverageLoad'] = __('Average load');
186$js_messages['strTotalMemory'] = __('Total memory');
187$js_messages['strCachedMemory'] = __('Cached memory');
188$js_messages['strBufferedMemory'] = __('Buffered memory');
189$js_messages['strFreeMemory'] = __('Free memory');
190$js_messages['strUsedMemory'] = __('Used memory');
191
192$js_messages['strTotalSwap'] = __('Total swap');
193$js_messages['strCachedSwap'] = __('Cached swap');
194$js_messages['strUsedSwap'] = __('Used swap');
195$js_messages['strFreeSwap'] = __('Free swap');
196
197$js_messages['strBytesSent'] = __('Bytes sent');
198$js_messages['strBytesReceived'] = __('Bytes received');
199$js_messages['strConnections'] = __('Connections');
200$js_messages['strProcesses'] = __('Processes');
201
202/* summary row */
203$js_messages['strB'] = __('B');
204$js_messages['strKiB'] = __('KiB');
205$js_messages['strMiB'] = __('MiB');
206$js_messages['strGiB'] = __('GiB');
207$js_messages['strTiB'] = __('TiB');
208$js_messages['strPiB'] = __('PiB');
209$js_messages['strEiB'] = __('EiB');
210$js_messages['strNTables'] = __('%d table(s)');
211
212/* l10n: Questions is the name of a MySQL Status variable */
213$js_messages['strQuestions'] = __('Questions');
214$js_messages['strTraffic'] = __('Traffic');
215$js_messages['strSettings'] = __('Settings');
216$js_messages['strAddChart'] = __('Add chart to grid');
217$js_messages['strClose'] = __('Close');
218$js_messages['strAddOneSeriesWarning']
219    = __('Please add at least one variable to the series!');
220$js_messages['strNone'] = __('None');
221$js_messages['strResumeMonitor'] = __('Resume monitor');
222$js_messages['strPauseMonitor'] = __('Pause monitor');
223$js_messages['strStartRefresh'] = __('Start auto refresh');
224$js_messages['strStopRefresh'] = __('Stop auto refresh');
225/* Monitor: Instructions Dialog */
226$js_messages['strBothLogOn'] = __('general_log and slow_query_log are enabled.');
227$js_messages['strGenLogOn'] = __('general_log is enabled.');
228$js_messages['strSlowLogOn'] = __('slow_query_log is enabled.');
229$js_messages['strBothLogOff'] = __('slow_query_log and general_log are disabled.');
230$js_messages['strLogOutNotTable'] = __('log_output is not set to TABLE.');
231$js_messages['strLogOutIsTable'] = __('log_output is set to TABLE.');
232$js_messages['strSmallerLongQueryTimeAdvice'] = __(
233    'slow_query_log is enabled, but the server logs only queries that take longer '
234    . 'than %d seconds. It is advisable to set this long_query_time 0-2 seconds, '
235    . 'depending on your system.'
236);
237$js_messages['strLongQueryTimeSet'] = __('long_query_time is set to %d second(s).');
238$js_messages['strSettingsAppliedGlobal'] = __(
239    'Following settings will be applied globally and reset to default on server '
240    . 'restart:'
241);
242/* l10n: %s is FILE or TABLE */
243$js_messages['strSetLogOutput'] = __('Set log_output to %s');
244/* l10n: Enable in this context means setting a status variable to ON */
245$js_messages['strEnableVar'] = __('Enable %s');
246/* l10n: Disable in this context means setting a status variable to OFF */
247$js_messages['strDisableVar'] = __('Disable %s');
248/* l10n: %d seconds */
249$js_messages['setSetLongQueryTime'] = __('Set long_query_time to %d seconds.');
250$js_messages['strNoSuperUser'] = __(
251    'You can\'t change these variables. Please log in as root or contact'
252    . ' your database administrator.'
253);
254$js_messages['strChangeSettings'] = __('Change settings');
255$js_messages['strCurrentSettings'] = __('Current settings');
256
257$js_messages['strChartTitle'] = __('Chart title');
258/* l10n: As in differential values */
259$js_messages['strDifferential'] = __('Differential');
260$js_messages['strDividedBy'] = __('Divided by %s');
261$js_messages['strUnit'] = __('Unit');
262
263$js_messages['strFromSlowLog'] = __('From slow log');
264$js_messages['strFromGeneralLog'] = __('From general log');
265$js_messages['strServerLogError'] = __(
266    'The database name is not known for this query in the server\'s logs.'
267);
268$js_messages['strAnalysingLogsTitle'] = __('Analysing logs');
269$js_messages['strAnalysingLogs']
270    = __('Analysing & loading logs. This may take a while.');
271$js_messages['strCancelRequest'] = __('Cancel request');
272$js_messages['strCountColumnExplanation'] = __(
273    'This column shows the amount of identical queries that are grouped together. '
274    . 'However only the SQL query itself has been used as a grouping criteria, so '
275    . 'the other attributes of queries, such as start time, may differ.'
276);
277$js_messages['strMoreCountColumnExplanation'] = __(
278    'Since grouping of INSERTs queries has been selected, INSERT queries into the '
279    . 'same table are also being grouped together, disregarding of the inserted '
280    . 'data.'
281);
282$js_messages['strLogDataLoaded']
283    = __('Log data loaded. Queries executed in this time span:');
284
285$js_messages['strJumpToTable'] = __('Jump to Log table');
286$js_messages['strNoDataFoundTitle'] = __('No data found');
287$js_messages['strNoDataFound']
288    = __('Log analysed, but no data found in this time span.');
289
290$js_messages['strAnalyzing'] = __('Analyzing…');
291$js_messages['strExplainOutput'] = __('Explain output');
292$js_messages['strStatus'] = __('Status');
293$js_messages['strTime'] = __('Time');
294$js_messages['strTotalTime'] = __('Total time:');
295$js_messages['strProfilingResults'] = __('Profiling results');
296$js_messages['strTable'] = _pgettext('Display format', 'Table');
297$js_messages['strChart'] = __('Chart');
298
299$js_messages['strAliasDatabase'] = _pgettext('Alias', 'Database');
300$js_messages['strAliasTable'] = _pgettext('Alias', 'Table');
301$js_messages['strAliasColumn'] = _pgettext('Alias', 'Column');
302
303/* l10n: A collection of available filters */
304$js_messages['strFiltersForLogTable'] = __('Log table filter options');
305/* l10n: Filter as in "Start Filtering" */
306$js_messages['strFilter'] = __('Filter');
307$js_messages['strFilterByWordRegexp'] = __('Filter queries by word/regexp:');
308$js_messages['strIgnoreWhereAndGroup']
309    = __('Group queries, ignoring variable data in WHERE clauses');
310$js_messages['strSumRows'] = __('Sum of grouped rows:');
311$js_messages['strTotal'] = __('Total:');
312
313$js_messages['strLoadingLogs'] = __('Loading logs');
314$js_messages['strRefreshFailed'] = __('Monitor refresh failed');
315$js_messages['strInvalidResponseExplanation'] = __(
316    'While requesting new chart data the server returned an invalid response. This '
317    . 'is most likely because your session expired. Reloading the page and '
318    . 'reentering your credentials should help.'
319);
320$js_messages['strReloadPage'] = __('Reload page');
321
322$js_messages['strAffectedRows'] = __('Affected rows:');
323
324$js_messages['strFailedParsingConfig'] = __(
325    'Failed parsing config file. It doesn\'t seem to be valid JSON code.'
326);
327$js_messages['strFailedBuildingGrid'] = __(
328    'Failed building chart grid with imported config. Resetting to default config…'
329);
330$js_messages['strImport'] = __('Import');
331$js_messages['strImportDialogTitle'] = __('Import monitor configuration');
332$js_messages['strImportDialogMessage']
333    = __('Please select the file you want to import.');
334$js_messages['strNoImportFile'] = __('No files available on server for import!');
335
336$js_messages['strAnalyzeQuery'] = __('Analyse query');
337
338/* Server status advisor */
339
340$js_messages['strAdvisorSystem'] = __('Advisor system');
341$js_messages['strPerformanceIssues'] = __('Possible performance issues');
342$js_messages['strIssuse'] = __('Issue');
343$js_messages['strRecommendation'] = __('Recommendation');
344$js_messages['strRuleDetails'] = __('Rule details');
345$js_messages['strJustification'] = __('Justification');
346$js_messages['strFormula'] = __('Used variable / formula');
347$js_messages['strTest'] = __('Test');
348
349/* For query editor */
350$js_messages['strFormatting'] = __('Formatting SQL…');
351$js_messages['strNoParam'] = __('No parameters found!');
352
353/* For inline query editing */
354$js_messages['strGo'] = __('Go');
355$js_messages['strCancel'] = __('Cancel');
356
357/* For page-related settings */
358$js_messages['strPageSettings'] = __('Page-related settings');
359$js_messages['strApply'] = __('Apply');
360
361/* For Ajax Notifications */
362$js_messages['strLoading'] = __('Loading…');
363$js_messages['strAbortedRequest'] = __('Request aborted!!');
364$js_messages['strProcessingRequest'] = __('Processing request');
365$js_messages['strRequestFailed'] = __('Request failed!!');
366$js_messages['strErrorProcessingRequest'] = __('Error in processing request');
367$js_messages['strErrorCode'] = __('Error code: %s');
368$js_messages['strErrorText'] = __('Error text: %s');
369$js_messages['strErrorConnection'] = __(
370    'It seems that the connection to server has been lost. Please check your ' .
371    'network connectivity and server status.'
372);
373$js_messages['strNoDatabasesSelected'] = __('No databases selected.');
374$js_messages['strNoAccountSelected'] = __('No accounts selected.');
375$js_messages['strDroppingColumn'] = __('Dropping column');
376$js_messages['strAddingPrimaryKey'] = __('Adding primary key');
377$js_messages['strOK'] = __('OK');
378$js_messages['strDismiss'] = __('Click to dismiss this notification');
379
380/* For db_operations.js */
381$js_messages['strRenamingDatabases'] = __('Renaming databases');
382$js_messages['strCopyingDatabase'] = __('Copying database');
383$js_messages['strChangingCharset'] = __('Changing charset');
384$js_messages['strNo'] = __('No');
385
386/* For Foreign key checks */
387$js_messages['strForeignKeyCheck'] = __('Enable foreign key checks');
388
389/* For db_stucture.js */
390$js_messages['strErrorRealRowCount'] = __('Failed to get real row count.');
391
392/* For db_search.js */
393$js_messages['strSearching'] = __('Searching');
394$js_messages['strHideSearchResults'] = __('Hide search results');
395$js_messages['strShowSearchResults'] = __('Show search results');
396$js_messages['strBrowsing'] = __('Browsing');
397$js_messages['strDeleting'] = __('Deleting');
398$js_messages['strConfirmDeleteResults'] = __('Delete the matches for the %s table?');
399
400/* For db_routines.js */
401$js_messages['MissingReturn']
402    = __('The definition of a stored function must contain a RETURN statement!');
403$js_messages['strExport'] = __('Export');
404$js_messages['NoExportable']
405    = __('No routine is exportable. Required privileges may be lacking.');
406
407/* For ENUM/SET editor*/
408$js_messages['enum_editor'] = __('ENUM/SET editor');
409$js_messages['enum_columnVals'] =__('Values for column %s');
410$js_messages['enum_newColumnVals'] = __('Values for a new column');
411$js_messages['enum_hint'] =__('Enter each value in a separate field.');
412$js_messages['enum_addValue'] =__('Add %d value(s)');
413
414/* For import.js */
415$js_messages['strImportCSV'] = __(
416    'Note: If the file contains multiple tables, they will be combined into one.'
417);
418
419/* For sql.js */
420$js_messages['strHideQueryBox'] = __('Hide query box');
421$js_messages['strShowQueryBox'] = __('Show query box');
422$js_messages['strEdit'] = __('Edit');
423$js_messages['strDelete'] = __('Delete');
424$js_messages['strNotValidRowNumber'] = __('%d is not valid row number.');
425$js_messages['strBrowseForeignValues'] = __('Browse foreign values');
426$js_messages['strNoAutoSavedQuery'] = __('No auto-saved query');
427$js_messages['strBookmarkVariable'] = __('Variable %d:');
428
429/* For Central list of columns */
430$js_messages['pickColumn'] = __('Pick');
431$js_messages['pickColumnTitle'] = __('Column selector');
432$js_messages['searchList'] = __('Search this list');
433$js_messages['strEmptyCentralList'] = __(
434    'No columns in the central list. Make sure the Central columns list for '
435    . 'database %s has columns that are not present in the current table.'
436);
437$js_messages['seeMore'] = __('See more');
438$js_messages['confirmTitle'] = __('Are you sure?');
439$js_messages['makeConsistentMessage'] = __(
440    'This action may change some of the columns definition.<br/>Are you sure you '
441    . 'want to continue?'
442);
443$js_messages['strContinue'] = __('Continue');
444
445/** For normalization */
446$js_messages['strAddPrimaryKey'] = __('Add primary key');
447$js_messages['strPrimaryKeyAdded'] = __('Primary key added.');
448$js_messages['strToNextStep'] = __('Taking you to next step…');
449$js_messages['strFinishMsg']
450    = __("The first step of normalization is complete for table '%s'.");
451$js_messages['strEndStep'] = __("End of step");
452$js_messages['str2NFNormalization'] = __('Second step of normalization (2NF)');
453$js_messages['strDone'] = __('Done');
454$js_messages['strConfirmPd'] = __('Confirm partial dependencies');
455$js_messages['strSelectedPd'] = __('Selected partial dependencies are as follows:');
456$js_messages['strPdHintNote'] = __(
457    'Note: a, b -> d,f implies values of columns a and b combined together can '
458    . 'determine values of column d and column f.'
459);
460$js_messages['strNoPdSelected'] = __('No partial dependencies selected!');
461$js_messages['strBack'] = __('Back');
462$js_messages['strShowPossiblePd']
463    = __('Show me the possible partial dependencies based on data in the table');
464$js_messages['strHidePd'] = __('Hide partial dependencies list');
465$js_messages['strWaitForPd'] = __(
466    'Sit tight! It may take few seconds depending on data size and column count of '
467    . 'the table.'
468);
469$js_messages['strStep'] = __('Step');
470$js_messages['strMoveRepeatingGroup']
471    = '<ol><b>' . __('The following actions will be performed:') . '</b>'
472    . '<li>' . __('DROP columns %s from the table %s') . '</li>'
473    . '<li>' . __('Create the following table') . '</li>';
474$js_messages['strNewTablePlaceholder'] = 'Enter new table name';
475$js_messages['strNewColumnPlaceholder'] = 'Enter column name';
476$js_messages['str3NFNormalization'] = __('Third step of normalization (3NF)');
477$js_messages['strConfirmTd'] = __('Confirm transitive dependencies');
478$js_messages['strSelectedTd'] = __('Selected dependencies are as follows:');
479$js_messages['strNoTdSelected'] = __('No dependencies selected!');
480
481/* For server_variables.js */
482$js_messages['strSave'] = __('Save');
483
484/* For tbl_select.js */
485$js_messages['strHideSearchCriteria'] = __('Hide search criteria');
486$js_messages['strShowSearchCriteria'] = __('Show search criteria');
487$js_messages['strRangeSearch'] = __('Range search');
488$js_messages['strColumnMax'] = __('Column maximum:');
489$js_messages['strColumnMin'] = __('Column minimum:');
490$js_messages['strMinValue'] = __('Minimum value:');
491$js_messages['strMaxValue'] = __('Maximum value:');
492
493/* For tbl_find_replace.js */
494$js_messages['strHideFindNReplaceCriteria'] = __('Hide find and replace criteria');
495$js_messages['strShowFindNReplaceCriteria'] = __('Show find and replace criteria');
496
497/* For tbl_zoom_plot_jqplot.js */
498$js_messages['strDisplayHelp'] = '<ul><li>'
499    . __('Each point represents a data row.')
500    . '</li><li>'
501    . __('Hovering over a point will show its label.')
502    . '</li><li>'
503    . __('To zoom in, select a section of the plot with the mouse.')
504    . '</li><li>'
505    . __('Click reset zoom button to come back to original state.')
506    . '</li><li>'
507    . __('Click a data point to view and possibly edit the data row.')
508    . '</li><li>'
509    . __('The plot can be resized by dragging it along the bottom right corner.')
510    . '</li></ul>';
511$js_messages['strHelpTitle'] = 'Zoom search instructions';
512$js_messages['strInputNull'] = '<strong>' . __('Select two columns') . '</strong>';
513$js_messages['strSameInputs'] = '<strong>'
514    . __('Select two different columns')
515    . '</strong>';
516$js_messages['strDataPointContent'] = __('Data point content');
517
518/* For tbl_change.js */
519$js_messages['strIgnore'] = __('Ignore');
520$js_messages['strCopy'] = __('Copy');
521$js_messages['strX'] = __('X');
522$js_messages['strY'] = __('Y');
523$js_messages['strPoint'] = __('Point');
524$js_messages['strPointN'] = __('Point %d');
525$js_messages['strLineString'] = __('Linestring');
526$js_messages['strPolygon'] = __('Polygon');
527$js_messages['strGeometry'] = __('Geometry');
528$js_messages['strInnerRing'] = __('Inner ring');
529$js_messages['strOuterRing'] = __('Outer ring');
530$js_messages['strAddPoint'] = __('Add a point');
531$js_messages['strAddInnerRing'] = __('Add an inner ring');
532$js_messages['strYes'] = __('Yes');
533$js_messages['strCopyEncryptionKey'] = __('Do you want to copy encryption key?');
534$js_messages['strEncryptionKey'] = __('Encryption key');
535
536/* For Tip to be shown on Time field */
537$js_messages['strMysqlAllowedValuesTipTime'] = __(
538    'MySQL accepts additional values not selectable by the slider;'
539    . ' key in those values directly if desired'
540);
541
542/* For Tip to be shown on Date field */
543$js_messages['strMysqlAllowedValuesTipDate'] = __(
544    'MySQL accepts additional values not selectable by the datepicker;'
545    . ' key in those values directly if desired'
546);
547
548/* For Lock symbol Tooltip */
549$js_messages['strLockToolTip'] = __(
550    'Indicates that you have made changes to this page;'
551    . ' you will be prompted for confirmation before abandoning changes'
552);
553
554/* Designer (js/designer/move.js) */
555$js_messages['strSelectReferencedKey'] = __('Select referenced key');
556$js_messages['strSelectForeignKey'] = __('Select Foreign Key');
557$js_messages['strPleaseSelectPrimaryOrUniqueKey']
558    = __('Please select the primary key or a unique key!');
559$js_messages['strChangeDisplay'] = __('Choose column to display');
560$js_messages['strLeavingDesigner'] = __(
561    'You haven\'t saved the changes in the layout. They will be lost if you'
562    . ' don\'t save them. Do you want to continue?'
563);
564$js_messages['strQueryEmpty'] = __('value/subQuery is empty');
565$js_messages['strAddTables'] = __('Add tables from other databases');
566$js_messages['strPageName'] = __('Page name');
567$js_messages['strSavePage'] = __('Save page');
568$js_messages['strSavePageAs'] = __('Save page as');
569$js_messages['strOpenPage'] = __('Open page');
570$js_messages['strDeletePage'] = __('Delete page');
571$js_messages['strUntitled'] = __('Untitled');
572$js_messages['strSelectPage'] = __('Please select a page to continue');
573$js_messages['strEnterValidPageName'] = __('Please enter a valid page name');
574$js_messages['strLeavingPage']
575    = __('Do you want to save the changes to the current page?');
576$js_messages['strSuccessfulPageDelete'] = __('Successfully deleted the page');
577$js_messages['strExportRelationalSchema'] = __('Export relational schema');
578$js_messages['strModificationSaved'] = __('Modifications have been saved');
579
580/* Visual query builder (js/designer/move.js) */
581$js_messages['strObjectsCreated'] = __('%d object(s) created.');
582$js_messages['strColumnName'] = __('Column name');
583$js_messages['strSubmit'] = __('Submit');
584
585/* For makegrid.js (column reordering, show/hide column, grid editing) */
586$js_messages['strCellEditHint'] = __('Press escape to cancel editing.');
587$js_messages['strSaveCellWarning'] = __(
588    'You have edited some data and they have not been saved. Are you sure you want '
589    . 'to leave this page before saving the data?'
590);
591$js_messages['strColOrderHint'] = __('Drag to reorder.');
592$js_messages['strSortHint'] = __('Click to sort results by this column.');
593$js_messages['strMultiSortHint'] = __(
594    'Shift+Click to add this column to ORDER BY clause or to toggle ASC/DESC.'
595    . '<br />- Ctrl+Click or Alt+Click (Mac: Shift+Option+Click) to remove column '
596    . 'from ORDER BY clause'
597);
598$js_messages['strColMarkHint'] = __('Click to mark/unmark.');
599$js_messages['strColNameCopyHint'] = __('Double-click to copy column name.');
600$js_messages['strColVisibHint'] = __(
601    'Click the drop-down arrow<br />to toggle column\'s visibility.'
602);
603$js_messages['strShowAllCol'] = __('Show all');
604$js_messages['strAlertNonUnique'] = __(
605    'This table does not contain a unique column. Features related to the grid '
606    . 'edit, checkbox, Edit, Copy and Delete links may not work after saving.'
607);
608$js_messages['strEnterValidHex']
609    = __('Please enter a valid hexadecimal string. Valid characters are 0-9, A-F.');
610$js_messages['strShowAllRowsWarning'] = __(
611    'Do you really want to see all of the rows? For a big table this could crash '
612    . 'the browser.'
613);
614$js_messages['strOriginalLength'] = __('Original length');
615
616/** Drag & Drop sql import messages */
617$js_messages['dropImportMessageCancel'] = __('cancel');
618$js_messages['dropImportMessageAborted'] = __('Aborted');
619$js_messages['dropImportMessageFailed'] = __('Failed');
620$js_messages['dropImportMessageSuccess'] = __('Success');
621$js_messages['dropImportImportResultHeader'] = __('Import status');
622$js_messages['dropImportDropFiles'] = __('Drop files here');
623$js_messages['dropImportSelectDB'] = __('Select database first');
624
625/* For Print view */
626$js_messages['print'] = __('Print');
627$js_messages['back'] = __('Back');
628
629// this approach does not work when the parameter is changed via user prefs
630switch ($GLOBALS['cfg']['GridEditing']) {
631case 'double-click':
632    $js_messages['strGridEditFeatureHint'] = __(
633        'You can also edit most values<br />by double-clicking directly on them.'
634    );
635    break;
636case 'click':
637    $js_messages['strGridEditFeatureHint'] = __(
638        'You can also edit most values<br />by clicking directly on them.'
639    );
640    break;
641default:
642    break;
643}
644$js_messages['strGoToLink'] = __('Go to link:');
645$js_messages['strColNameCopyTitle'] = __('Copy column name.');
646$js_messages['strColNameCopyText']
647    = __('Right-click the column name to copy it to your clipboard.');
648
649/* password generation */
650$js_messages['strGeneratePassword'] = __('Generate password');
651$js_messages['strGenerate'] = __('Generate');
652$js_messages['strChangePassword'] = __('Change password');
653
654/* navigation tabs */
655$js_messages['strMore'] = __('More');
656
657/* navigation panel */
658$js_messages['strShowPanel'] = __('Show panel');
659$js_messages['strHidePanel'] = __('Hide panel');
660$js_messages['strUnhideNavItem'] = __('Show hidden navigation tree items.');
661$js_messages['linkWithMain'] = __('Link with main panel');
662$js_messages['unlinkWithMain'] = __('Unlink from main panel');
663
664/* microhistory */
665$js_messages['strInvalidPage']
666    = __('The requested page was not found in the history, it may have expired.');
667
668/* update */
669$js_messages['strNewerVersion'] = __(
670    'A newer version of phpMyAdmin is available and you should consider upgrading. '
671    . 'The newest version is %s, released on %s.'
672);
673/* l10n: Latest available phpMyAdmin version */
674$js_messages['strLatestAvailable'] = __(', latest stable version:');
675$js_messages['strUpToDate'] = __('up to date');
676
677$js_messages['strCreateView'] = __('Create view');
678
679/* Error Reporting */
680$js_messages['strSendErrorReport'] = __("Send error report");
681$js_messages['strSubmitErrorReport'] = __("Submit error report");
682$js_messages['strErrorOccurred'] = __(
683    "A fatal JavaScript error has occurred. Would you like to send an error report?"
684);
685$js_messages['strChangeReportSettings'] = __("Change report settings");
686$js_messages['strShowReportDetails'] = __("Show report details");
687$js_messages['strIgnore'] = __("Ignore");
688$js_messages['strTimeOutError'] = __(
689    "Your export is incomplete, due to a low execution time limit at the PHP level!"
690);
691
692$js_messages['strTooManyInputs'] = __(
693    "Warning: a form on this page has more than %d fields. On submission, "
694    . "some of the fields might be ignored, due to PHP's "
695    . "max_input_vars configuration."
696);
697
698$js_messages['phpErrorsFound'] = '<div class="error">'
699    . __('Some errors have been detected on the server!')
700    . '<br/>'
701    . __('Please look at the bottom of this window.')
702    . '<div>'
703    . '<input id="pma_ignore_errors_popup" type="submit" value="'
704    . __('Ignore')
705    . '" class="floatright message_errors_found">'
706    . '<input id="pma_ignore_all_errors_popup" type="submit" value="'
707    . __('Ignore All')
708    . '" class="floatright message_errors_found">'
709    . '</div></div>';
710
711$js_messages['phpErrorsBeingSubmitted'] = '<div class="error">'
712    . __('Some errors have been detected on the server!')
713    . '<br/>'
714    . __(
715        'As per your settings, they are being submitted currently, please be '
716        . 'patient.'
717    )
718    . '<br/>'
719    . '<img src="'
720    . ($GLOBALS['PMA_Theme']->getImgPath('ajax_clock_small.gif'))
721    . '" width="16" height="16" alt="ajax clock"/>'
722    . '</div>';
723
724// For console
725$js_messages['strConsoleRequeryConfirm'] = __('Execute this query again?');
726$js_messages['strConsoleDeleteBookmarkConfirm']
727    = __('Do you really want to delete this bookmark?');
728$js_messages['strConsoleDebugError']
729    = __('Some error occurred while getting SQL debug info.');
730$js_messages['strConsoleDebugSummary']
731    = __('%s queries executed %s times in %s seconds.');
732$js_messages['strConsoleDebugArgsSummary'] = __('%s argument(s) passed');
733$js_messages['strConsoleDebugShowArgs'] = __('Show arguments');
734$js_messages['strConsoleDebugHideArgs'] = __('Hide arguments');
735$js_messages['strConsoleDebugTimeTaken'] = __('Time taken:');
736$js_messages['strNoLocalStorage'] = __('There was a problem accessing your browser storage, some features may not work properly for you. It is likely that the browser doesn\'t support storage or the quota limit has been reached. In Firefox, corrupted storage can also cause such a problem, clearing your "Offline Website Data" might help. In Safari, such problem is commonly caused by "Private Mode Browsing".');
737// For modals in db_structure.php
738$js_messages['strCopyTablesTo'] = __('Copy tables to');
739$js_messages['strAddPrefix'] = __('Add table prefix');
740$js_messages['strReplacePrefix'] = __('Replace table with prefix');
741$js_messages['strCopyPrefix'] = __('Copy table with prefix');
742
743/* For password strength simulation */
744$js_messages['strExtrWeak'] = __('Extremely weak');
745$js_messages['strVeryWeak'] = __('Very weak');
746$js_messages['strWeak'] = __('Weak');
747$js_messages['strGood'] = __('Good');
748$js_messages['strStrong'] = __('Strong');
749
750/* U2F errors */
751$js_messages['strU2FTimeout'] = __('Timed out waiting for security key activation.');
752$js_messages['strU2FError'] = __('Failed security key activation (%s).');
753
754/* Designer */
755$js_messages['strTableAlreadyExists'] = _pgettext('The table already exists in the designer and can not be added once more.', 'Table %s already exists!');
756$js_messages['strHide'] = __('Hide');
757$js_messages['strStructure'] = __('Structure');
758
759echo "var PMA_messages = new Array();\n";
760foreach ($js_messages as $name => $js_message) {
761    Sanitize::printJsValue("PMA_messages['" . $name . "']", $js_message);
762}
763
764/* Calendar */
765echo "var themeCalendarImage = '" , $GLOBALS['pmaThemeImage']
766    , 'b_calendar.png' , "';\n";
767
768/* Image path */
769echo "var pmaThemeImage = '" , $GLOBALS['pmaThemeImage'] , "';\n";
770
771echo "var mysql_doc_template = '" , PhpMyAdmin\Util::getMySQLDocuURL('%s')
772    , "';\n";
773
774//Max input vars allowed by PHP.
775$maxInputVars = ini_get('max_input_vars');
776echo 'var maxInputVars = '
777    , (false === $maxInputVars || '' == $maxInputVars ? 'false' : (int)$maxInputVars)
778    , ';' . "\n";
779
780echo "if ($.datepicker) {\n";
781/* l10n: Display text for calendar close link */
782Sanitize::printJsValue("$.datepicker.regional['']['closeText']", __('Done'));
783/* l10n: Display text for previous month link in calendar */
784Sanitize::printJsValue(
785    "$.datepicker.regional['']['prevText']",
786    _pgettext('Previous month', 'Prev')
787);
788/* l10n: Display text for next month link in calendar */
789Sanitize::printJsValue(
790    "$.datepicker.regional['']['nextText']",
791    _pgettext('Next month', 'Next')
792);
793/* l10n: Display text for current month link in calendar */
794Sanitize::printJsValue("$.datepicker.regional['']['currentText']", __('Today'));
795Sanitize::printJsValue(
796    "$.datepicker.regional['']['monthNames']",
797    array(
798        __('January'),
799        __('February'),
800        __('March'),
801        __('April'),
802        __('May'),
803        __('June'),
804        __('July'),
805        __('August'),
806        __('September'),
807        __('October'),
808        __('November'),
809        __('December')
810    )
811);
812Sanitize::printJsValue(
813    "$.datepicker.regional['']['monthNamesShort']",
814    array(
815        /* l10n: Short month name */
816        __('Jan'),
817        /* l10n: Short month name */
818        __('Feb'),
819        /* l10n: Short month name */
820        __('Mar'),
821        /* l10n: Short month name */
822        __('Apr'),
823        /* l10n: Short month name */
824        _pgettext('Short month name', 'May'),
825        /* l10n: Short month name */
826        __('Jun'),
827        /* l10n: Short month name */
828        __('Jul'),
829        /* l10n: Short month name */
830        __('Aug'),
831        /* l10n: Short month name */
832        __('Sep'),
833        /* l10n: Short month name */
834        __('Oct'),
835        /* l10n: Short month name */
836        __('Nov'),
837        /* l10n: Short month name */
838        __('Dec')
839    )
840);
841Sanitize::printJsValue(
842    "$.datepicker.regional['']['dayNames']",
843    array(
844        __('Sunday'),
845        __('Monday'),
846        __('Tuesday'),
847        __('Wednesday'),
848        __('Thursday'),
849        __('Friday'),
850        __('Saturday')
851    )
852);
853Sanitize::printJsValue(
854    "$.datepicker.regional['']['dayNamesShort']",
855    array(
856        /* l10n: Short week day name for Sunday */
857        __('Sun'),
858        /* l10n: Short week day name for Monday */
859        __('Mon'),
860        /* l10n: Short week day name for Tuesday */
861        __('Tue'),
862        /* l10n: Short week day name for Wednesday */
863        __('Wed'),
864        /* l10n: Short week day name for Thursday */
865        __('Thu'),
866        /* l10n: Short week day name for Friday */
867        __('Fri'),
868        /* l10n: Short week day name for Saturday */
869        __('Sat')
870    )
871);
872Sanitize::printJsValue(
873    "$.datepicker.regional['']['dayNamesMin']",
874    array(
875        /* l10n: Minimal week day name for Sunday */
876        __('Su'),
877        /* l10n: Minimal week day name for Monday */
878        __('Mo'),
879        /* l10n: Minimal week day name for Tuesday */
880        __('Tu'),
881        /* l10n: Minimal week day name for Wednesday */
882        __('We'),
883        /* l10n: Minimal week day name for Thursday */
884        __('Th'),
885        /* l10n: Minimal week day name for Friday */
886        __('Fr'),
887        /* l10n: Minimal week day name for Saturday */
888        __('Sa')
889    )
890);
891/* l10n: Column header for week of the year in calendar */
892Sanitize::printJsValue("$.datepicker.regional['']['weekHeader']", __('Wk'));
893
894Sanitize::printJsValue(
895    "$.datepicker.regional['']['showMonthAfterYear']",
896    /* l10n: Month-year order for calendar, use either "calendar-month-year"
897    * or "calendar-year-month".
898    */
899    (__('calendar-month-year') == 'calendar-year-month')
900);
901/* l10n: Year suffix for calendar, "none" is empty. */
902$year_suffix = _pgettext('Year suffix', 'none');
903Sanitize::printJsValue(
904    "$.datepicker.regional['']['yearSuffix']",
905    ($year_suffix == 'none' ? '' : $year_suffix)
906);
907?>
908$.extend($.datepicker._defaults, $.datepicker.regional['']);
909} /* if ($.datepicker) */
910
911<?php
912echo "if ($.timepicker) {\n";
913Sanitize::printJsValue("$.timepicker.regional['']['timeText']", __('Time'));
914Sanitize::printJsValue("$.timepicker.regional['']['hourText']", __('Hour'));
915Sanitize::printJsValue("$.timepicker.regional['']['minuteText']", __('Minute'));
916Sanitize::printJsValue("$.timepicker.regional['']['secondText']", __('Second'));
917?>
918$.extend($.timepicker._defaults, $.timepicker.regional['']);
919} /* if ($.timepicker) */
920
921<?php
922/* Form validation */
923
924echo "function extendingValidatorMessages() {\n";
925echo "$.extend($.validator.messages, {\n";
926/* Default validation functions */
927Sanitize::printJsValueForFormValidation('required', __('This field is required'));
928Sanitize::printJsValueForFormValidation('remote', __('Please fix this field'));
929Sanitize::printJsValueForFormValidation('email', __('Please enter a valid email address'));
930Sanitize::printJsValueForFormValidation('url', __('Please enter a valid URL'));
931Sanitize::printJsValueForFormValidation('date', __('Please enter a valid date'));
932Sanitize::printJsValueForFormValidation(
933    'dateISO',
934    __('Please enter a valid date ( ISO )')
935);
936Sanitize::printJsValueForFormValidation('number', __('Please enter a valid number'));
937Sanitize::printJsValueForFormValidation(
938    'creditcard',
939    __('Please enter a valid credit card number')
940);
941Sanitize::printJsValueForFormValidation('digits', __('Please enter only digits'));
942Sanitize::printJsValueForFormValidation(
943    'equalTo',
944    __('Please enter the same value again')
945);
946Sanitize::printJsValueForFormValidation(
947    'maxlength',
948    __('Please enter no more than {0} characters'),
949    true
950);
951Sanitize::printJsValueForFormValidation(
952    'minlength',
953    __('Please enter at least {0} characters'),
954    true
955);
956Sanitize::printJsValueForFormValidation(
957    'rangelength',
958    __('Please enter a value between {0} and {1} characters long'),
959    true
960);
961Sanitize::printJsValueForFormValidation(
962    'range',
963    __('Please enter a value between {0} and {1}'),
964    true
965);
966Sanitize::printJsValueForFormValidation(
967    'max',
968    __('Please enter a value less than or equal to {0}'),
969    true
970);
971Sanitize::printJsValueForFormValidation(
972    'min',
973    __('Please enter a value greater than or equal to {0}'),
974    true
975);
976/* customed functions */
977Sanitize::printJsValueForFormValidation(
978    'validationFunctionForDateTime',
979    __('Please enter a valid date or time'),
980    true
981);
982Sanitize::printJsValueForFormValidation(
983    'validationFunctionForHex',
984    __('Please enter a valid HEX input'),
985    true
986);
987Sanitize::printJsValueForFormValidation(
988    'validationFunctionForFuns',
989    __('Error'),
990    true,
991    false
992);
993echo "\n});";
994echo "\n} /* if ($.validator) */";
995?>
996