]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/accountprofileblock.php
Fix i18n issues
[quix0rs-gnu-social.git] / lib / accountprofileblock.php
index 6748cf340bb3e0943adb00dcbf044b42d513e6b0..59c27776018dac7c2bfddaf27e5557bf120bf0e0 100644 (file)
@@ -46,7 +46,6 @@ require_once INSTALLDIR.'/lib/peopletags.php';
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
  * @link      http://status.net/
  */
-
 class AccountProfileBlock extends ProfileBlock
 {
     protected $profile = null;
@@ -149,9 +148,9 @@ class AccountProfileBlock extends ProfileBlock
                         $this->out->elementStart('li', 'entity_edit');
                         $this->out->element('a', array('href' => common_local_url('profilesettings'),
                                                   // TRANS: Link title for link on user profile.
-                                                  'title' => _('Edit profile settings')),
+                                                  'title' => _('Edit profile settings.')),
                                        // TRANS: Link text for link on user profile.
-                                       _('Edit'));
+                                       _m('BUTTON','Edit'));
                         $this->out->elementEnd('li');
                     } else { // someone else's page
 
@@ -162,6 +161,9 @@ class AccountProfileBlock extends ProfileBlock
                         if ($cur->isSubscribed($this->profile)) {
                             $usf = new UnsubscribeForm($this->out, $this->profile);
                             $usf->show();
+                        } else if ($cur->hasPendingSubscription($this->profile)) {
+                            $sf = new CancelSubscriptionForm($this->out, $this->profile);
+                            $sf->show();
                         } else {
                             $sf = new SubscribeForm($this->out, $this->profile);
                             $sf->show();
@@ -175,9 +177,9 @@ class AccountProfileBlock extends ProfileBlock
                             $this->out->elementStart('li', 'entity_send-a-message');
                             $this->out->element('a', array('href' => common_local_url('newmessage', array('to' => $this->user->id)),
                                                       // TRANS: Link title for link on user profile.
-                                                      'title' => _('Send a direct message to this user')),
+                                                      'title' => _('Send a direct message to this user.')),
                                            // TRANS: Link text for link on user profile.
-                                           _('Message'));
+                                           _m('BUTTON','Message'));
                             $this->out->elementEnd('li');
 
                             // nudge
@@ -303,6 +305,16 @@ class AccountProfileBlock extends ProfileBlock
         $this->out->element('a', array('href' => $url,
                                   'class' => 'entity_remote_subscribe'),
                        // TRANS: Link text for link that will subscribe to a remote profile.
-                       _('Subscribe'));
+                       _m('BUTTON','Subscribe'));
+    }
+
+    function show()
+    {
+        $this->out->elementStart('div', 'profile_block account_profile_block section');
+        if (Event::handle('StartShowAccountProfileBlock', array($this->out, $this->profile))) {
+            parent::show();
+            Event::handle('EndShowAccountProfileBlock', array($this->out, $this->profile));
+        }
+        $this->out->elementEnd('div');
     }
 }