diff --git a/db_create.php b/db_create.php
index a2695cb4c..b55e04fad 100644
--- a/db_create.php
+++ b/db_create.php
@@ -43,7 +43,7 @@ if (! $result) {
require_once './libraries/header.inc.php';
require_once './main.php';
} else {
- $message = PMA_Message::success('strDatabaseHasBeenCreated');
+ $message = PMA_Message::success(__('Database %1$s has been created.'));
$message->addParam($new_db);
$GLOBALS['db'] = $new_db;
diff --git a/db_operations.php b/db_operations.php
index 25e7977f9..fad0d009c 100644
--- a/db_operations.php
+++ b/db_operations.php
@@ -35,7 +35,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
}
if (!isset($newname) || !strlen($newname)) {
- $message = PMA_Message::error('strDatabaseEmpty');
+ $message = PMA_Message::error(__('The database name is empty!'));
} else {
$sql_query = ''; // in case target db exists
$_error = false;
@@ -233,11 +233,11 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
$sql_query .= "\n" . $local_query;
PMA_DBI_query($local_query);
- $message = PMA_Message::success('strRenameDatabaseOK');
+ $message = PMA_Message::success(__('Database %s has been renamed to %s'));
$message->addParam($db);
$message->addParam($newname);
} elseif (! $_error) {
- $message = PMA_Message::success('strCopyDatabaseOK');
+ $message = PMA_Message::success(__('Database %s has been copied to %s'));
$message->addParam($db);
$message->addParam($newname);
}
@@ -606,7 +606,7 @@ if (!$is_information_schema) {
if ($num_tables > 0
&& !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == false) {
- $message = PMA_Message::notice('strRelationNotWorking');
+ $message = PMA_Message::notice(__('The additional features for working with linked tables have been deactivated. To find out why click %shere%s.'));
$message->addParam('', false);
$message->addParam('', false);
/* Show error if user has configured something, notice elsewhere */
diff --git a/import.php b/import.php
index 0dab66681..88ffc477d 100644
--- a/import.php
+++ b/import.php
@@ -57,7 +57,7 @@ if (!empty($sql_query)) {
;
if ($_POST == array() && $_GET == array()) {
require_once './libraries/header.inc.php';
- $message = PMA_Message::error('strUploadLimit');
+ $message = PMA_Message::error(__('You probably tried to upload too large file. Please refer to %sdocumentation%s for ways to workaround this limit.'));
$message->addParam('[a@./Documentation.html#faq1_16@_blank]');
$message->addParam('[/a]');
@@ -276,7 +276,7 @@ if ($import_file != 'none' && !$error) {
*/
$compression = PMA_detectCompression($import_file);
if ($compression === FALSE) {
- $message = PMA_Message::error('strFileCouldNotBeRead');
+ $message = PMA_Message::error(__('File could not be read'));
$error = TRUE;
} else {
switch ($compression) {
@@ -284,7 +284,7 @@ if ($import_file != 'none' && !$error) {
if ($cfg['BZipDump'] && @function_exists('bzopen')) {
$import_handle = @bzopen($import_file, 'r');
} else {
- $message = PMA_Message::error('strUnsupportedCompressionDetected');
+ $message = PMA_Message::error(__('You attempted to load file with unsupported compression (%s). Either support for it is not implemented or disabled by your configuration.'));
$message->addParam($compression);
$error = TRUE;
}
@@ -293,7 +293,7 @@ if ($import_file != 'none' && !$error) {
if ($cfg['GZipDump'] && @function_exists('gzopen')) {
$import_handle = @gzopen($import_file, 'r');
} else {
- $message = PMA_Message::error('strUnsupportedCompressionDetected');
+ $message = PMA_Message::error(__('You attempted to load file with unsupported compression (%s). Either support for it is not implemented or disabled by your configuration.'));
$message->addParam($compression);
$error = TRUE;
}
@@ -312,7 +312,7 @@ if ($import_file != 'none' && !$error) {
$import_text = $result['data'];
}
} else {
- $message = PMA_Message::error('strUnsupportedCompressionDetected');
+ $message = PMA_Message::error(__('You attempted to load file with unsupported compression (%s). Either support for it is not implemented or disabled by your configuration.'));
$message->addParam($compression);
$error = TRUE;
}
@@ -321,7 +321,7 @@ if ($import_file != 'none' && !$error) {
$import_handle = @fopen($import_file, 'r');
break;
default:
- $message = PMA_Message::error('strUnsupportedCompressionDetected');
+ $message = PMA_Message::error(__('You attempted to load file with unsupported compression (%s). Either support for it is not implemented or disabled by your configuration.'));
$message->addParam($compression);
$error = TRUE;
break;
@@ -329,12 +329,12 @@ if ($import_file != 'none' && !$error) {
}
// use isset() because zip compression type does not use a handle
if (!$error && isset($import_handle) && $import_handle === FALSE) {
- $message = PMA_Message::error('strFileCouldNotBeRead');
+ $message = PMA_Message::error(__('File could not be read'));
$error = TRUE;
}
} elseif (!$error) {
if (!isset($import_text) || empty($import_text)) {
- $message = PMA_Message::error('strNoDataReceived');
+ $message = PMA_Message::error(__('No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See [a@./Documentation.html#faq1_16@Documentation]FAQ 1.16[/a].'));
$error = TRUE;
}
}
@@ -369,7 +369,7 @@ if (!$error) {
// Check for file existance
if (!file_exists('./libraries/import/' . $format . '.php')) {
$error = TRUE;
- $message = PMA_Message::error('strCanNotLoadImportPlugins');
+ $message = PMA_Message::error(__('Could not load import plugins, please check your installation!'));
} else {
// Do the real import
$plugin_param = $import_type;
@@ -394,11 +394,11 @@ if ($reset_charset) {
// Show correct message
if (!empty($id_bookmark) && $action_bookmark == 2) {
- $message = PMA_Message::success('strBookmarkDeleted');
+ $message = PMA_Message::success(__('The bookmark has been deleted.'));
$display_query = $import_text;
$error = FALSE; // unset error marker, it was used just to skip processing
} elseif (!empty($id_bookmark) && $action_bookmark == 1) {
- $message = PMA_Message::notice('strShowingBookmark');
+ $message = PMA_Message::notice(__('Showing bookmark'));
} elseif ($bookmark_created) {
$special_message = '[br]' . sprintf(__('Bookmark %s created'), htmlspecialchars($bkm_label));
} elseif ($finished && !$error) {
@@ -412,7 +412,7 @@ if (!empty($id_bookmark) && $action_bookmark == 2) {
$message->addString($import_notice);
$message->addString('(' . $_FILES['import_file']['name'] . ')');
} else {
- $message = PMA_Message::success('strImportSuccessfullyFinished');
+ $message = PMA_Message::success(__('Import has been successfully finished, %d queries executed.'));
$message->addParam($executed_queries);
$message->addString('(' . $_FILES['import_file']['name'] . ')');
}
@@ -421,7 +421,7 @@ if (!empty($id_bookmark) && $action_bookmark == 2) {
// Did we hit timeout? Tell it user.
if ($timeout_passed) {
- $message = PMA_Message::error('strTimeoutPassed');
+ $message = PMA_Message::error(__('Script timeout passed, if you want to finish import, please resubmit same file and import will resume.'));
if ($offset == 0 || (isset($original_skip) && $original_skip == $offset)) {
$message->addString('strTimeoutNothingParsed');
}
diff --git a/libraries/Index.class.php b/libraries/Index.class.php
index a1a63d809..23306423b 100644
--- a/libraries/Index.class.php
+++ b/libraries/Index.class.php
@@ -425,7 +425,7 @@ class PMA_Index
$indexes = PMA_Index::getFromTable($table, $schema);
if (count($indexes) < 1) {
- return PMA_Message::warning('strNoIndex')->getDisplay();
+ return PMA_Message::warning(__('No index defined!'))->getDisplay();
}
$r = '';
@@ -573,7 +573,7 @@ class PMA_Index
// did not find any difference
// so it makes no sense to have this two equal indexes
- $message = PMA_Message::warning('strIndexesSeemEqual');
+ $message = PMA_Message::warning(__('The indexes %1$s and %2$s seem to be equal and one of them could possibly be removed.'));
$message->addParam($each_index->getName());
$message->addParam($while_index->getName());
$output .= $message->getDisplay();
diff --git a/libraries/auth/http.auth.lib.php b/libraries/auth/http.auth.lib.php
index ef4dcf925..7ccea39e3 100644
--- a/libraries/auth/http.auth.lib.php
+++ b/libraries/auth/http.auth.lib.php
@@ -67,7 +67,7 @@ function PMA_auth()
display();
+ PMA_Message::error(__('Wrong username/password. Access denied.'))->display();
if (file_exists(CUSTOM_FOOTER_FILE)) {
require CUSTOM_FOOTER_FILE;
diff --git a/libraries/dbg/setup.php b/libraries/dbg/setup.php
index 5e0683ac0..07732dfd6 100644
--- a/libraries/dbg/setup.php
+++ b/libraries/dbg/setup.php
@@ -19,10 +19,10 @@ if ($GLOBALS['cfg']['DBG']['php']) {
* Loads the DBG extension if needed
*/
if (! @extension_loaded('dbg') ) {
- $message = PMA_Message::error('strCantLoad');
+ $message = PMA_Message::error(__('Cannot load [a@http://php.net/%1$s@Documentation][em]%1$s[/em][/a] extension. Please check your PHP configuration.'));
$message->addParam('DBG');
$message->addMessage('', false);
- $message->addString('strDocu');
+ $message->addString(__('Documentation'));
$message->addMessage('', false);
$message->display();
} else {
diff --git a/libraries/display_export.lib.php b/libraries/display_export.lib.php
index 4117cc544..160e7bfbd 100644
--- a/libraries/display_export.lib.php
+++ b/libraries/display_export.lib.php
@@ -39,7 +39,7 @@ $export_list = PMA_getPlugins('./libraries/export/', array('export_type' => $exp
/* Fail if we didn't find any plugin */
if (empty($export_list)) {
- PMA_Message::error('strCanNotLoadExportPlugins')->display();
+ PMA_Message::error( __('Could not load export plugins, please check your installation!'))->display();
require './libraries/footer.inc.php';
}
?>
@@ -149,17 +149,17 @@ echo PMA_pluginGetJavascript($export_list);
$trans = new PMA_Message;
$trans->addMessage('__SERVER__/');
- $trans->addString('strFileNameTemplateDescriptionServer');
+ $trans->addString(__('server name'));
if ($export_type == 'database' || $export_type == 'table') {
$trans->addMessage('__DB__/');
- $trans->addString('strFileNameTemplateDescriptionDatabase');
+ $trans->addString(__('database name'));
if ($export_type == 'table') {
$trans->addMessage('__TABLE__/');
- $trans->addString('strFileNameTemplateDescriptionTable');
+ $trans->addString(__('table name'));
}
}
- $message = new PMA_Message('strFileNameTemplateDescription');
+ $message = new PMA_Message(__('This value is interpreted using %1$sstrftime%2$s, so you can use time formatting strings. Additionally the following transformations will happen: %3$s. Other text will be kept as is.'));
$message->addParam('', false);
$message->addParam('', false);
diff --git a/libraries/display_import.lib.php b/libraries/display_import.lib.php
index 0e803c404..d30619db3 100644
--- a/libraries/display_import.lib.php
+++ b/libraries/display_import.lib.php
@@ -21,7 +21,7 @@ $import_list = PMA_getPlugins('./libraries/import/', $import_type);
/* Fail if we didn't find any plugin */
if (empty($import_list)) {
- PMA_Message::error('strCanNotLoadImportPlugins')->display();
+ PMA_Message::error(__('Could not load import plugins, please check your installation!'))->display();
require './libraries/footer.inc.php';
}
?>
@@ -145,7 +145,7 @@ if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") {
display();
+ PMA_Message::warning(__('File uploads are not allowed on this server.'))->display();
}
if (!empty($cfg['UploadDir'])) {
$extensions = '';
@@ -160,7 +160,7 @@ if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") {
$files = PMA_getFileSelectOptions(PMA_userDir($cfg['UploadDir']), $matcher, (isset($timeout_passed) && $timeout_passed && isset($local_import_file)) ? $local_import_file : '');
echo '