Update of /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend
In directory usw-pr-cvs1:/tmp/cvs-serv19735/phpwiki/lib/WikiDB/backend
Modified Files:
PearDB.php
Log Message:
gettext-ified error messages with sprintf(_("%s"),$v)
Index: PearDB.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend/PearDB.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** PearDB.php 2001/12/14 22:20:44 1.12
--- PearDB.php 2001/12/19 08:54:15 1.13
***************
*** 24,29 ****
$dbh = &$this->_dbh;
if (DB::isError($dbh)) {
! trigger_error("Can't connect to database: "
! . $this->_pear_error_message($dbh),
E_USER_ERROR);
}
--- 24,28 ----
$dbh = &$this->_dbh;
if (DB::isError($dbh)) {
! trigger_error(sprintf(_("Can't connect to database: %s"),$this->_pear_error_message($dbh)),
E_USER_ERROR);
}
***************
*** 56,61 ****
return;
if ($this->_lock_count) {
! trigger_error("WARNING: database still locked"
! . " (lock_count = $this->_lock_count)\n<br>",
E_USER_WARNING);
}
--- 55,59 ----
return;
if ($this->_lock_count) {
! trigger_error(sprintf(_("WARNING: database still locked (lock_count = %s)"),$this->_lock_count) . "\n<br>",
E_USER_WARNING);
}
***************
*** 710,714 ****
function _pear_error_message($error) {
$class = get_class($this);
! $message = "$class: fatal database error\n"
. "\t" . $error->getMessage() . "\n"
. "\t(" . $error->getDebugInfo() . ")\n";
--- 708,712 ----
function _pear_error_message($error) {
$class = get_class($this);
! $message = sprintf(_("%s: fatal database error"),$class) ."\n"
. "\t" . $error->getMessage() . "\n"
. "\t(" . $error->getDebugInfo() . ")\n";
|