]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/AnonymousFave/AnonymousFavePlugin.php
Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x
[quix0rs-gnu-social.git] / plugins / AnonymousFave / AnonymousFavePlugin.php
index a0aa1262680cd730102a3cd7e944c9534107a6ca..af6ea20bd315fb32cb78a3d4ce0f04029236bf54 100644 (file)
@@ -56,10 +56,8 @@ define('ANONYMOUS_FAVE_PLUGIN_VERSION', '0.1');
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
  * @link      http://status.net/
  */
-
 class AnonymousFavePlugin extends Plugin
 {
-
     // Array of users who should not have anon faving. The default is
     // that anonymous faving is allowed for all users.
     public $restricted = array();
@@ -202,7 +200,13 @@ class AnonymousFavePlugin extends Plugin
                     'class' => 'notice-tally'
                 )
             );
-            $out->raw(sprintf(_m("favored %d times"), $tally->count));
+            $out->elementStart('span', array('class' => 'fave-tally-title'));
+            // TRANS: Label for tally for number of times a notice was favored.
+            $out->raw(sprintf(_m("Favored")));
+            $out->elementEnd('span');
+            $out->elementStart('span', array('class' => 'fave-tally'));
+            $out->raw($tally->count);
+            $out->elementEnd('span');
             $out->elementEnd('div');
         }
     }
@@ -230,7 +234,8 @@ class AnonymousFavePlugin extends Plugin
         $id = $profile->insert();
 
         if (!$id) {
-            throw new ServerException(_m("Couldn't create anonymous user session."));
+            // TRANS: Server exception.
+            throw new ServerException(_m("Could not create anonymous user session."));
         }
 
         // Stick the Profile ID into the nickname
@@ -240,7 +245,8 @@ class AnonymousFavePlugin extends Plugin
         $result = $profile->update($orig);
 
         if (!$result) {
-            throw new ServerException(_m("Couldn't create anonymous user session."));
+            // TRANS: Server exception.
+            throw new ServerException(_m("Could not create anonymous user session."));
         }
 
         common_log(
@@ -314,9 +320,9 @@ class AnonymousFavePlugin extends Plugin
             'author' => 'Zach Copley',
             'homepage' => $url,
             'rawdescription' =>
+            // TRANS: Plugin description.
             _m('Allow anonymous users to favorite notices.'));
 
         return true;
     }
-
 }