X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FBlog%2FBlogPlugin.php;h=eb1f5833c49eaf754692b935e7fbaf0b5b58a4ec;hb=7dcb27672fa3f234f1fdfab5024752614e805341;hp=04eef36e04195df00469abf217c5d39330cdda95;hpb=87d46e1ae5e5effcc985021ff5af3f10815f3d3c;p=quix0rs-gnu-social.git diff --git a/plugins/Blog/BlogPlugin.php b/plugins/Blog/BlogPlugin.php index 04eef36e04..eb1f5833c4 100644 --- a/plugins/Blog/BlogPlugin.php +++ b/plugins/Blog/BlogPlugin.php @@ -120,13 +120,15 @@ class BlogPlugin extends MicroAppPlugin 'author' => 'Evan Prodromou', 'homepage' => 'http://status.net/wiki/Plugin:Blog', 'rawdescription' => + // TRANS: Plugin description. _m('Let users write and share long-form texts.')); return true; } function appTitle() { - return _m('Blog'); + // TRANS: Blog application title. + return _m('TITLE','Blog'); } function tag() @@ -149,7 +151,7 @@ class BlogPlugin extends MicroAppPlugin $entryObj = $activity->objects[0]; 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.')); } @@ -175,7 +177,8 @@ class BlogPlugin extends MicroAppPlugin $entry = Blog_entry::fromNotice($notice); 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)); } @@ -191,7 +194,7 @@ class BlogPlugin extends MicroAppPlugin { if ($notice->object_type == Blog_entry::TYPE) { $entry = Blog_entry::fromNotice($notice); - if (exists($entry)) { + if (!empty($entry)) { $entry->delete(); } } @@ -204,7 +207,7 @@ class BlogPlugin extends MicroAppPlugin if ($notice->object_type == Blog_entry::TYPE) { return new BlogEntryListItem($nli); } - + return null; }