Fix and add translator documentation

Fix i18n domain where needed.
Whitespace updates.
This commit is contained in:
Siebrand Mazeland 2011-08-19 16:40:45 +02:00
parent 76c48a7099
commit c718a603f5
3 changed files with 14 additions and 12 deletions

View File

@ -120,13 +120,15 @@ class BlogPlugin extends MicroAppPlugin
'author' => 'Evan Prodromou', 'author' => 'Evan Prodromou',
'homepage' => 'http://status.net/wiki/Plugin:Blog', 'homepage' => 'http://status.net/wiki/Plugin:Blog',
'rawdescription' => 'rawdescription' =>
// TRANS: Plugin description.
_m('Let users write and share long-form texts.')); _m('Let users write and share long-form texts.'));
return true; return true;
} }
function appTitle() function appTitle()
{ {
return _m('Blog'); // TRANS: Blog application title.
return _m('TITLE','Blog');
} }
function tag() function tag()
@ -149,7 +151,7 @@ class BlogPlugin extends MicroAppPlugin
$entryObj = $activity->objects[0]; $entryObj = $activity->objects[0];
if ($entryObj->type != Blog_entry::TYPE) { if ($entryObj->type != Blog_entry::TYPE) {
// TRANS: Exception thrown when blog plugin comes across a non-event type object. // TRANS: Exception thrown when blog plugin comes across a non-blog entry type object.
throw new ClientException(_m('Wrong type for object.')); throw new ClientException(_m('Wrong type for object.'));
} }
@ -175,7 +177,8 @@ class BlogPlugin extends MicroAppPlugin
$entry = Blog_entry::fromNotice($notice); $entry = Blog_entry::fromNotice($notice);
if (empty($entry)) { if (empty($entry)) {
throw new ClientException(sprintf(_('No blog entry for notice %s'), // TRANS: Exception thrown when requesting a non-existing blog entry for notice.
throw new ClientException(sprintf(_m('No blog entry for notice %s.'),
$notice->id)); $notice->id));
} }

View File

@ -44,7 +44,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 BlogEntryForm extends Form class BlogEntryForm extends Form
{ {
/** /**
@ -99,10 +98,10 @@ class BlogEntryForm extends Form
$this->li(); $this->li();
$this->out->textarea('blog-entry-content', $this->out->textarea('blog-entry-content',
// TRANS: Field label on event form. // TRANS: Field label on blog entry form.
_m('LABEL','Text'), _m('LABEL','Text'),
null, null,
// TRANS: Field title on event form. // TRANS: Field title on blog entry form.
_m('Text of the blog entry.'), _m('Text of the blog entry.'),
'content'); 'content');
$this->unli(); $this->unli();
@ -124,8 +123,8 @@ class BlogEntryForm extends Form
*/ */
function formActions() function formActions()
{ {
// TRANS: Button text to save an event..
$this->out->submit('blog-entry-submit', $this->out->submit('blog-entry-submit',
// TRANS: Button text to save a blog entry.
_m('BUTTON', 'Save'), _m('BUTTON', 'Save'),
'submit', 'submit',
'submit'); 'submit');

View File

@ -44,7 +44,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 ShowblogentryAction extends ShownoticeAction class ShowblogentryAction extends ShownoticeAction
{ {
protected $id; protected $id;
@ -81,6 +80,7 @@ class ShowblogentryAction extends ShownoticeAction
function title() function title()
{ {
// XXX: check for double-encoding // XXX: check for double-encoding
// TRANS: Title for a blog entry without a title.
return (empty($this->entry->title)) ? _m('Untitled') : $this->entry->title; return (empty($this->entry->title)) ? _m('Untitled') : $this->entry->title;
} }
} }