* L10n updates and translator documentation added.

* superfluous whitespace removed.
This commit is contained in:
Siebrand Mazeland 2010-09-18 15:23:17 +02:00
parent 34f95c26fd
commit edb411b4ae
2 changed files with 6 additions and 18 deletions

View File

@ -101,7 +101,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class SamplePlugin extends Plugin class SamplePlugin extends Plugin
{ {
/** /**
@ -129,7 +128,6 @@ class SamplePlugin extends Plugin
* *
* @return boolean hook value; true means continue processing, false means stop. * @return boolean hook value; true means continue processing, false means stop.
*/ */
function initialize() function initialize()
{ {
return true; return true;
@ -143,7 +141,6 @@ class SamplePlugin extends Plugin
* *
* @return boolean hook value; true means continue processing, false means stop. * @return boolean hook value; true means continue processing, false means stop.
*/ */
function cleanup() function cleanup()
{ {
return true; return true;
@ -168,7 +165,6 @@ class SamplePlugin extends Plugin
* *
* @return boolean hook value; true means continue processing, false means stop. * @return boolean hook value; true means continue processing, false means stop.
*/ */
function onCheckSchema() function onCheckSchema()
{ {
$schema = Schema::get(); $schema = Schema::get();
@ -201,7 +197,6 @@ class SamplePlugin extends Plugin
* *
* @return boolean hook value; true means continue processing, false means stop. * @return boolean hook value; true means continue processing, false means stop.
*/ */
function onAutoload($cls) function onAutoload($cls)
{ {
$dir = dirname(__FILE__); $dir = dirname(__FILE__);
@ -231,7 +226,6 @@ class SamplePlugin extends Plugin
* *
* @return boolean hook value; true means continue processing, false means stop. * @return boolean hook value; true means continue processing, false means stop.
*/ */
function onRouterInitialized($m) function onRouterInitialized($m)
{ {
$m->connect('main/hello', $m->connect('main/hello',
@ -256,7 +250,6 @@ class SamplePlugin extends Plugin
* *
* @see Action * @see Action
*/ */
function onEndPrimaryNav($action) function onEndPrimaryNav($action)
{ {
// common_local_url() gets the correct URL for the action name // common_local_url() gets the correct URL for the action name
@ -278,4 +271,3 @@ class SamplePlugin extends Plugin
return true; return true;
} }
} }

View File

@ -70,7 +70,6 @@ class User_greeting_count extends Memcached_DataObject
* @return User_greeting_count object found, or null for no hits * @return User_greeting_count object found, or null for no hits
* *
*/ */
function staticGet($k, $v=null) function staticGet($k, $v=null)
{ {
return Memcached_DataObject::staticGet('User_greeting_count', $k, $v); return Memcached_DataObject::staticGet('User_greeting_count', $k, $v);
@ -84,7 +83,6 @@ class User_greeting_count extends Memcached_DataObject
* *
* @return array array of column definitions * @return array array of column definitions
*/ */
function table() function table()
{ {
return array('user_id' => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL, return array('user_id' => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL,
@ -100,7 +98,6 @@ class User_greeting_count extends Memcached_DataObject
* *
* @return array list of key field names * @return array list of key field names
*/ */
function keys() function keys()
{ {
return array_keys($this->keyTypes()); return array_keys($this->keyTypes());
@ -118,7 +115,6 @@ class User_greeting_count extends Memcached_DataObject
* 'K' for primary key: for compound keys, add an entry for each component; * 'K' for primary key: for compound keys, add an entry for each component;
* 'U' for unique keys: compound keys are not well supported here. * 'U' for unique keys: compound keys are not well supported here.
*/ */
function keyTypes() function keyTypes()
{ {
return array('user_id' => 'K'); return array('user_id' => 'K');
@ -134,7 +130,6 @@ class User_greeting_count extends Memcached_DataObject
* *
* @return array magic three-false array that stops auto-incrementing. * @return array magic three-false array that stops auto-incrementing.
*/ */
function sequenceKey() function sequenceKey()
{ {
return array(false, false, false); return array(false, false, false);
@ -150,7 +145,6 @@ class User_greeting_count extends Memcached_DataObject
* *
* @return User_greeting_count instance for this user, with count already incremented. * @return User_greeting_count instance for this user, with count already incremented.
*/ */
static function inc($user_id) static function inc($user_id)
{ {
$gc = User_greeting_count::staticGet('user_id', $user_id); $gc = User_greeting_count::staticGet('user_id', $user_id);
@ -165,12 +159,12 @@ class User_greeting_count extends Memcached_DataObject
$result = $gc->insert(); $result = $gc->insert();
if (!$result) { if (!$result) {
throw Exception(sprintf(_m("Could not save new greeting count for %d"), // TRANS: Exception thrown when the user greeting count could not be saved in the database.
// TRANS: %d is a user ID (number).
throw Exception(sprintf(_m("Could not save new greeting count for %d."),
$user_id)); $user_id));
} }
} else { } else {
$orig = clone($gc); $orig = clone($gc);
$gc->greeting_count++; $gc->greeting_count++;
@ -178,7 +172,9 @@ class User_greeting_count extends Memcached_DataObject
$result = $gc->update($orig); $result = $gc->update($orig);
if (!$result) { if (!$result) {
throw Exception(sprintf(_m("Could not increment greeting count for %d"), // TRANS: Exception thrown when the user greeting count could not be saved in the database.
// TRANS: %d is a user ID (number).
throw Exception(sprintf(_m("Could not increment greeting count for %d."),
$user_id)); $user_id));
} }
} }