Update translator documentation and whitespace.
This commit is contained in:
parent
4110266b68
commit
8807705bb4
|
@ -265,9 +265,11 @@ class SamplePlugin extends Plugin
|
|||
{
|
||||
// common_local_url() gets the correct URL for the action name
|
||||
// we provide
|
||||
|
||||
$action->menuItem(common_local_url('hello'),
|
||||
_m('Hello'), _m('A warm greeting'), false, 'nav_hello');
|
||||
// TRANS: Menu item in sample plugin.
|
||||
_m('Hello'),
|
||||
// TRANS: Menu item title in sample plugin.
|
||||
_m('A warm greeting'), false, 'nav_hello');
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -278,6 +280,7 @@ class SamplePlugin extends Plugin
|
|||
'author' => 'Brion Vibber, Evan Prodromou',
|
||||
'homepage' => 'http://status.net/wiki/Plugin:Sample',
|
||||
'rawdescription' =>
|
||||
// TRANS: Plugin description.
|
||||
_m('A sample plugin to show basics of development for new hackers.'));
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -52,7 +52,6 @@ require_once INSTALLDIR . '/classes/Memcached_DataObject.php';
|
|||
*
|
||||
* @see DB_DataObject
|
||||
*/
|
||||
|
||||
class User_greeting_count extends Memcached_DataObject
|
||||
{
|
||||
public $__table = 'user_greeting_count'; // table name
|
||||
|
@ -68,7 +67,6 @@ class User_greeting_count extends Memcached_DataObject
|
|||
* @param mixed $v Value to lookup
|
||||
*
|
||||
* @return User_greeting_count object found, or null for no hits
|
||||
*
|
||||
*/
|
||||
function staticGet($k, $v=null)
|
||||
{
|
||||
|
@ -150,7 +148,6 @@ class User_greeting_count extends Memcached_DataObject
|
|||
$gc = User_greeting_count::staticGet('user_id', $user_id);
|
||||
|
||||
if (empty($gc)) {
|
||||
|
||||
$gc = new User_greeting_count();
|
||||
|
||||
$gc->user_id = $user_id;
|
||||
|
@ -161,7 +158,7 @@ class User_greeting_count extends Memcached_DataObject
|
|||
if (!$result) {
|
||||
// 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."),
|
||||
throw Exception(sprintf(_m('Could not save new greeting count for %d.'),
|
||||
$user_id));
|
||||
}
|
||||
} else {
|
||||
|
@ -174,7 +171,7 @@ class User_greeting_count extends Memcached_DataObject
|
|||
if (!$result) {
|
||||
// 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."),
|
||||
throw Exception(sprintf(_m('Could not increment greeting count for %d.'),
|
||||
$user_id));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,8 +108,10 @@ class HelloAction extends Action
|
|||
function title()
|
||||
{
|
||||
if (empty($this->user)) {
|
||||
// TRANS: Page title for sample plugin.
|
||||
return _m('Hello');
|
||||
} else {
|
||||
// TRANS: Page title for sample plugin. %s is a user nickname.
|
||||
return sprintf(_m('Hello, %s!'), $this->user->nickname);
|
||||
}
|
||||
}
|
||||
|
@ -130,11 +132,15 @@ class HelloAction extends Action
|
|||
{
|
||||
if (empty($this->user)) {
|
||||
$this->element('p', array('class' => 'greeting'),
|
||||
// TRANS: Message in sample plugin.
|
||||
_m('Hello, stranger!'));
|
||||
} else {
|
||||
$this->element('p', array('class' => 'greeting'),
|
||||
// TRANS: Message in sample plugin. %s is a user nickname.
|
||||
sprintf(_m('Hello, %s'), $this->user->nickname));
|
||||
$this->element('p', array('class' => 'greeting_count'),
|
||||
// TRANS: Message in sample plugin.
|
||||
// TRANS: %d is the number of times a user is greeted.
|
||||
sprintf(_m('I have greeted you %d time.',
|
||||
'I have greeted you %d times.',
|
||||
$this->gc->greeting_count),
|
||||
|
|
Loading…
Reference in New Issue
Block a user