Add translator documentation.

Fix incorrect i18n.
Whitespace updates.
This commit is contained in:
Siebrand Mazeland 2011-08-19 17:38:43 +02:00
parent 083e9773f2
commit 73806460ce

View File

@ -125,7 +125,8 @@ class Memcached_DataObject extends Safe_DataObject
if (count($toFetch) > 0) {
$i = DB_DataObject::factory($cls);
if (empty($i)) {
throw new Exception(_('Cannot instantiate class ' . $cls));
// TRANS: Exception thrown when a class (%s) could not be instantiated.
throw new Exception(sprintf(_('Cannot instantiate class %s.'),$cls));
}
foreach ($otherCols as $otherKeyCol => $otherKeyVal) {
$i->$otherKeyCol = $otherKeyVal;
@ -175,7 +176,8 @@ class Memcached_DataObject extends Safe_DataObject
if (count($toFetch) > 0) {
$i = DB_DataObject::factory($cls);
if (empty($i)) {
throw new Exception(_('Cannot instantiate class ' . $cls));
// TRANS: Exception thrown when a class (%s) could not be instantiated.
throw new Exception(sprintf(_('Cannot instantiate class %s.'),$cls));
}
$i->whereAddIn($keyCol, $toFetch, $i->columnType($keyCol));
if ($i->find()) {
@ -212,7 +214,7 @@ class Memcached_DataObject extends Safe_DataObject
}
/**
* @fixme Should this return false on lookup fail to match staticGet?
* @todo FIXME: Should this return false on lookup fail to match staticGet?
*/
function pkeyGet($cls, $kv)
{
@ -562,7 +564,7 @@ class Memcached_DataObject extends Safe_DataObject
continue;
}
if (in_array($func, $ignoreStatic)) {
continue; // @fixme this shouldn't be needed?
continue; // @todo FIXME: This shouldn't be needed?
}
$here = get_class($frame['object']) . '->' . $func;
break;
@ -705,7 +707,7 @@ class Memcached_DataObject extends Safe_DataObject
if (!$dsn) {
// TRANS: Exception thrown when database name or Data Source Name could not be found.
throw new Exception(_("No database name or DSN found anywhere."));
throw new Exception(_('No database name or DSN found anywhere.'));
}
return $dsn;