[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_3-3757-gdffd1dc
Michal Čihař
nijel at users.sourceforge.net
Mon May 24 11:34:40 CEST 2010
The branch, master has been updated
via dffd1dc1a2173eed0e0303d49d6b203a3b659e82 (commit)
via e0129770dc49ae1f09872e951f99b2fd639602a0 (commit)
via bb36ae46a10dc9a2ac4e927af5daf81f2f8b1d0a (commit)
via 14c8de547ea510ae0be17dcae1237b7c1cd6287d (commit)
via 88ff43da9f44efab013b6560e696112cf3cd0fb6 (commit)
via 0620f3df0385e0081f2b0bcd053edd37af00b0c9 (commit)
from f33f82386e37590594238347371430df4806849c (commit)
- Log -----------------------------------------------------------------
commit dffd1dc1a2173eed0e0303d49d6b203a3b659e82
Author: Michal Čihař <mcihar at novell.com>
Date: Mon May 24 11:30:28 2010 +0200
Get rid of strSuccess.
commit e0129770dc49ae1f09872e951f99b2fd639602a0
Author: Michal Čihař <mcihar at novell.com>
Date: Mon May 24 11:29:35 2010 +0200
Get rid of strDocu.
commit bb36ae46a10dc9a2ac4e927af5daf81f2f8b1d0a
Author: Michal Čihař <mcihar at novell.com>
Date: Mon May 24 11:28:58 2010 +0200
Convert replication to gettext.
commit 14c8de547ea510ae0be17dcae1237b7c1cd6287d
Author: Michal Čihař <mcihar at novell.com>
Date: Mon May 24 11:27:26 2010 +0200
Not really used directly anymore.
commit 88ff43da9f44efab013b6560e696112cf3cd0fb6
Author: Michal Čihař <mcihar at novell.com>
Date: Mon May 24 11:27:08 2010 +0200
Remove strError occurences.
commit 0620f3df0385e0081f2b0bcd053edd37af00b0c9
Author: Michal Čihař <mcihar at novell.com>
Date: Mon May 24 11:25:21 2010 +0200
Not really used directly anymore.
-----------------------------------------------------------------------
Summary of changes:
libraries/config.default.php | 2 +-
libraries/core.lib.php | 2 -
libraries/messages.inc.php | 31 ---------------------
server_databases.php | 20 +++++++-------
test/PMA_Message_test.php | 62 +++++++++++++++++++++---------------------
5 files changed, 42 insertions(+), 75 deletions(-)
diff --git a/libraries/config.default.php b/libraries/config.default.php
index dc08274..b2a3932 100644
--- a/libraries/config.default.php
+++ b/libraries/config.default.php
@@ -2329,7 +2329,7 @@ $cfg['ErrorIconic'] = true;
$cfg['MainPageIconic'] = true;
/**
- * show help button instead of strDocu (true|false)?
+ * show help button instead of Documentation text (true|false)?
*
* @global boolean $cfg['ReplaceHelpImg']
*/
diff --git a/libraries/core.lib.php b/libraries/core.lib.php
index 70740b6..12e28c5 100644
--- a/libraries/core.lib.php
+++ b/libraries/core.lib.php
@@ -231,8 +231,6 @@ function PMA_fatalError($error_message, $message_args = null)
// Loads the language file
require_once './libraries/select_lang.lib.php';
- $GLOBALS['strError'] = __('Error');
-
// $text_dir is set in po file
if (isset($text_dir)) {
$GLOBALS['text_dir'] = $text_dir;
diff --git a/libraries/messages.inc.php b/libraries/messages.inc.php
index f411b9f..d071f75 100644
--- a/libraries/messages.inc.php
+++ b/libraries/messages.inc.php
@@ -18,33 +18,10 @@ $charset = 'utf-8';
/* l10n: Text direction, use either ltr or rtl */
$text_dir = __('ltr');
-$strDisabled = __('Disabled');
-$strDocu = __('Documentation');
-
-$strError = __('Error');
-$strErrorSaveTable = __('Error saving coordinates for Designer.');
-
-$strFormEmpty = __('Missing value in the form!');
-
-$strGeneralRelationFeat = __('General relation features');
-
-$strHide = __('Hide');
-
-
-
-
$strLatexContent = __('Content of table __TABLE__');
$strLatexContinued = __('(continued)');
$strLatexStructure = __('Structure of table __TABLE__');
-
-
-
-
-
-$strReplicationMaster = __('Master replication');
-$strReplicationSlave = __('Slave replication');
-
$strShowStatusBinlog_cache_disk_useDescr = __('The number of transactions that used the temporary binary log cache but that exceeded the value of binlog_cache_size and used a temporary file to store statements from the transaction.');
$strShowStatusBinlog_cache_useDescr = __('The number of transactions that used the temporary binary log cache.');
$strShowStatusCreated_tmp_disk_tablesDescr = __('The number of temporary tables on disk created automatically by the server while executing statements. If Created_tmp_disk_tables is big, you may want to increase the tmp_table_size value to cause temporary tables to be memory-based instead of disk-based.');
@@ -152,7 +129,6 @@ $strShowStatusThreads_cachedDescr = __('The number of threads in the thread cach
$strShowStatusThreads_connectedDescr = __('The number of currently open connections.');
$strShowStatusThreads_createdDescr = __('The number of threads created to handle connections. If Threads_created is big, you may want to increase the thread_cache_size value. (Normally this doesn\'t give a notable performance improvement if you have a good thread implementation.)');
$strShowStatusThreads_runningDescr = __('The number of threads that are not sleeping.');
-$strSuccess = __('Your SQL query has been executed successfully');
$strTransformation_application_octetstream__download = __('Displays a link to download the binary data of the field. You can use the first option to specify the filename, or use the second option as the name of a field which contains the filename. If you use the second option, you need to set the first option to the empty string.');
$strTransformation_application_octetstream__hex = __('Displays hexadecimal representation of data. Optional first parameter specifies how often space will be added (defaults to 2 nibbles).');
@@ -166,11 +142,4 @@ $strTransformation_text_plain__imagelink = __('Displays an image and a link; the
$strTransformation_text_plain__link = __('Displays a link; the field contains the filename. The first option is a URL prefix like "http://www.example.com/". The second option is a title for the link.');
$strTransformation_text_plain__sql = __('Formats text as SQL query with syntax highlighting.');
$strTransformation_text_plain__substr = __('Displays a part of a string. The first option is the number of characters to skip from the beginning of the string (Default 0). The second option is the number of characters to return (Default: until end of string). The third option is the string to append and/or prepend when truncation occurs (Default: "...").');
-
-
-
-
-
-
-
?>
diff --git a/server_databases.php b/server_databases.php
index 073706e..7b0f698 100644
--- a/server_databases.php
+++ b/server_databases.php
@@ -35,7 +35,7 @@ if (isset($_REQUEST['sort_order'])
$dbstats = empty($_REQUEST['dbstats']) ? 0 : 1;
$pos = empty($_REQUEST['pos']) ? 0 : (int) $_REQUEST['pos'];
-
+
/**
* Drops multiple databases
*/
@@ -188,17 +188,17 @@ if ($databases_count > 0) {
.' </a></th>' . "\n";
}
}
-
- foreach ($replication_types as $type)
+
+ foreach ($replication_types as $type)
{
if ($type=="master")
- $name = "strReplicationMaster";
+ $name = __('Master replication');
elseif($type == "slave")
- $name = "strReplicationSlave";
- if (${"server_{$type}_status"})
+ $name = __('Slave replication');
+ if (${"server_{$type}_status"})
echo ' <th>'.$GLOBALS[$name].'</th>' . "\n";
}
-
+
if ($is_superuser) {
echo ' <th>' . ($cfg['PropertiesIconic'] ? '' : __('Action')) . "\n"
. ' </th>' . "\n";
@@ -326,10 +326,10 @@ if ($databases_count > 0) {
}
}
}
-
- foreach ($replication_types as $type)
+
+ foreach ($replication_types as $type)
{
- if (${"server_{$type}_status"})
+ if (${"server_{$type}_status"})
echo ' <th></th>' . "\n";
}
diff --git a/test/PMA_Message_test.php b/test/PMA_Message_test.php
index db6b25e..009dc23 100644
--- a/test/PMA_Message_test.php
+++ b/test/PMA_Message_test.php
@@ -67,7 +67,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
{
$this->object = new PMA_Message('test<&>', PMA_Message::SUCCESS);
$this->assertEquals($this->object, PMA_Message::success('test<&>'));
- $this->assertEquals('strSuccess', PMA_Message::success()->getString());
+ $this->assertEquals('Your SQL query has been executed successfully', PMA_Message::success()->getString());
}
/**
@@ -77,7 +77,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
{
$this->object = new PMA_Message('test<&>', PMA_Message::ERROR);
$this->assertEquals($this->object, PMA_Message::error('test<&>'));
- $this->assertEquals('strError', PMA_Message::error()->getString());
+ $this->assertEquals('Error', PMA_Message::error()->getString());
}
/**
@@ -112,7 +112,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* test rawWarning method
*/
- public function testRawWarning()
+ public function testRawWarning()
{
$this->object = new PMA_Message('', PMA_Message::WARNING);
$this->object->setMessage('test<&>');
@@ -123,7 +123,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* test rawNotice method
*/
- public function testRawNotice()
+ public function testRawNotice()
{
$this->object = new PMA_Message('', PMA_Message::NOTICE);
$this->object->setMessage('test<&>');
@@ -134,7 +134,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* test rawSuccess method
*/
- public function testRawSuccess()
+ public function testRawSuccess()
{
$this->object = new PMA_Message('', PMA_Message::SUCCESS);
$this->object->setMessage('test<&>');
@@ -145,7 +145,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing isSuccess method
*/
- public function testIsSuccess()
+ public function testIsSuccess()
{
$this->assertFalse($this->object->isSuccess());
$this->assertTrue($this->object->isSuccess(true));
@@ -154,7 +154,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing isNotice method
*/
- public function testIsNotice()
+ public function testIsNotice()
{
$this->assertTrue($this->object->isNotice());
$this->object->isWarning(true);
@@ -165,7 +165,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing isWarning method
*/
- public function testIsWarning()
+ public function testIsWarning()
{
$this->assertFalse($this->object->isWarning());
$this->assertTrue($this->object->isWarning(true));
@@ -174,7 +174,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing isError method
*/
- public function testIsError()
+ public function testIsError()
{
$this->assertFalse($this->object->isError());
$this->assertTrue($this->object->isError(true));
@@ -183,7 +183,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testign setter of message
*/
- public function testSetMessage()
+ public function testSetMessage()
{
$this->object->setMessage('test&<>', false);
$this->assertEquals('test&<>', $this->object->getMessage());
@@ -194,7 +194,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing setter of string
*/
- public function testSetString()
+ public function testSetString()
{
$this->object->setString('test&<>', false);
$this->assertEquals('test&<>', $this->object->getString());
@@ -205,7 +205,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing add param method
*/
- public function testAddParam()
+ public function testAddParam()
{
$this->object->addParam(PMA_Message::notice('test'));
$this->assertEquals(array(PMA_Message::notice('test')), $this->object->getParams());
@@ -218,7 +218,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing add string method
*/
- public function testAddString()
+ public function testAddString()
{
$this->object->addString('test', '*');
$this->assertEquals(array('*', PMA_Message::notice('test')), $this->object->getAddedMessages());
@@ -229,7 +229,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing add messages method
*/
- public function testAddMessages()
+ public function testAddMessages()
{
$this->object->addMessages(array('test', PMA_Message::rawWarning('test')), '&');
$this->assertEquals(array('&', PMA_Message::rawNotice('test'), '&', PMA_Message::rawWarning('test')), $this->object->getAddedMessages());
@@ -238,7 +238,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing add message method
*/
- public function testAddMessage()
+ public function testAddMessage()
{
$this->object->addMessage('test', '');
$this->assertEquals(array(PMA_Message::rawNotice('test')), $this->object->getAddedMessages());
@@ -251,7 +251,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing setter of params
*/
- public function testSetParams()
+ public function testSetParams()
{
$this->object->setParams('test&<>');
$this->assertEquals('test&<>', $this->object->getParams());
@@ -262,14 +262,14 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing sanitize method
*/
- public function testSanitize()
+ public function testSanitize()
{
$this->object->setString('test&string<>', false);
$this->assertEquals('test&string<>', PMA_Message::sanitize($this->object));
$this->assertEquals(array('test&string<>', 'test&string<>'), PMA_Message::sanitize(array($this->object, $this->object)));
}
- public function decodeBBDataProvider()
+ public function decodeBBDataProvider()
{
return array(
array('[i]test[/i][i]aa[i/][em]test[/em]', '<em>test</em><em>aa[i/]<em>test</em>'),
@@ -284,27 +284,27 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
* @dataProvider decodeBBDataProvider
*/
- public function testDecodeBB($actual, $expected)
+ public function testDecodeBB($actual, $expected)
{
- $this->assertEquals($expected, PMA_Message::decodeBB($actual));
+ $this->assertEquals($expected, PMA_Message::decodeBB($actual));
}
/**
* testing format method
*/
- public function testFormat()
+ public function testFormat()
{
$this->assertEquals('test string', PMA_Message::format('test string'));
$this->assertEquals('test string', PMA_Message::format('test string', 'a'));
$this->assertEquals('test string', PMA_Message::format('test string', array()));
$this->assertEquals('test string', PMA_Message::format('%s string', array('test')));
-
+
}
/**
* testing getHash method
*/
- public function testGetHash()
+ public function testGetHash()
{
$this->object->setString('<&>test', false);
$this->object->setMessage('<&>test', false);
@@ -315,7 +315,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
* getMessage test - with empty message and with non-empty string - not key in globals
* additional params are defined
*/
- public function testGetMessageWithoutMessageWithStringWithParams()
+ public function testGetMessageWithoutMessageWithStringWithParams()
{
$this->object->setMessage('');
$this->object->setString('test string %s %s');
@@ -327,7 +327,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* getMessage test - with empty message and with empty string
*/
- public function testGetMessageWithoutMessageWithEmptyString()
+ public function testGetMessageWithoutMessageWithEmptyString()
{
$this->object->setMessage('');
$this->object->setString('');
@@ -338,7 +338,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
* getMessage test - with empty message and with string, which is key to GLOBALS
* additional messages are defined
*/
- public function testGetMessageWithoutMessageWithGlobalStringWithAddMessages()
+ public function testGetMessageWithoutMessageWithGlobalStringWithAddMessages()
{
$GLOBALS['key'] = 'test message';
$this->object->setMessage('');
@@ -353,7 +353,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
* getMessage test - message is defined
* message with BBCode defined
*/
- public function testGetMessageWithMessageWithBBCode()
+ public function testGetMessageWithMessageWithBBCode()
{
$this->object->setMessage('[kbd]test[/kbd] [a at ./Documentation.html#cfg_Example at _blank]test[/a]');
$this->assertEquals('<kbd>test</kbd> <a href="./Documentation.html#cfg_Example" target="_blank">test</a>', $this->object->getMessage());
@@ -362,7 +362,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* getLevel test
*/
- public function testGetLevel()
+ public function testGetLevel()
{
$this->assertEquals('notice', $this->object->getLevel());
$this->object->setNumber(PMA_Message::SUCCESS);
@@ -376,7 +376,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing display method (output string and _is_displayed varible)
*/
- public function testDisplay()
+ public function testDisplay()
{
$this->assertFalse($this->object->isDisplayed());
$this->object->setMessage('Test Message');
@@ -390,7 +390,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* getDisplay test
*/
- public function testGetDisplay()
+ public function testGetDisplay()
{
$this->object->setMessage('Test Message');
$this->assertEquals('<div class="notice">Test Message</div>', $this->object->getDisplay());
@@ -399,7 +399,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* isDisplayed test
*/
- public function testIsDisplayed()
+ public function testIsDisplayed()
{
$this->assertFalse($this->object->isDisplayed(false));
$this->assertTrue($this->object->isDisplayed(true));
hooks/post-receive
--
phpMyAdmin
More information about the Git
mailing list