]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '1.0.x' into limitdist2
authorEvan Prodromou <evan@status.net>
Fri, 25 Mar 2011 19:57:07 +0000 (15:57 -0400)
committerEvan Prodromou <evan@status.net>
Fri, 25 Mar 2011 19:57:07 +0000 (15:57 -0400)
Conflicts:
lib/groupnoticestream.php
lib/taggedprofilenoticestream.php

actions/approvegroup.php
lib/cachingnoticestream.php
lib/cancelgroupform.php
lib/profilenoticestream.php
plugins/TwitterBridge/twitter.php

index 690c76360f8c91a1e49b1eca167303515aefd66a..5039cfae6bcf34964c6ea0c9160f1169e03600ae 100644 (file)
@@ -169,15 +169,18 @@ class ApprovegroupAction extends Action
             $this->startHTML('text/xml;charset=utf-8');
             $this->elementStart('head');
             // TRANS: Title for leave group page after group join request is approved/disapproved.
+            // TRANS: %1$s is the user nickname, %2$s is the group nickname.
             $this->element('title', null, sprintf(_m('TITLE','%1$s\'s request for %2$s'),
                                                   $this->profile->nickname,
                                                   $this->group->nickname));
             $this->elementEnd('head');
             $this->elementStart('body');
             if ($this->approve) {
-                $this->element('p', 'success', _m('Join request approved.'));
+                // TRANS: Message on page for group admin after approving a join request. 
+                $this->element('p', 'success', _('Join request approved.'));
             } elseif ($this->cancel) {
-                $this->element('p', 'success', _m('Join request canceled.'));
+                // TRANS: Message on page for group admin after rejecting a join request. 
+                $this->element('p', 'success', _('Join request canceled.'));
             }
             $this->elementEnd('body');
             $this->elementEnd('html');
index a1b3b3fe82d77efe216b1e0fc5b314948f20d6d5..0b5aa33a376e8fc774a55ed01af67bfdc2898ba9 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (C) 2011, StatusNet, Inc.
  *
  * A stream of notices
- * 
+ *
  * PHP version 5
  *
  * This program is free software: you can redistribute it and/or modify
index c328f358c80db91549cba1e2528aa0c9ee52e12b..f4a44b5b5b029b2b3a1e23d26c7c82ab23adf965 100644 (file)
@@ -112,6 +112,6 @@ class CancelGroupForm extends Form
     function formActions()
     {
         // TRANS: Submit button text on form to cancel group join request.
-        $this->out->submit('submit', _('BUTTON','Cancel join request'));
+        $this->out->submit('submit', _m('BUTTON','Cancel join request'));
     }
 }
index ca54ad4892b7eb81976b12e2d374048ad1f665d3..7ea653f8c8c2a1bcc31bfabc6ad033c5f643c2d0 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (C) 2011, StatusNet, Inc.
  *
  * Stream of notices by a profile
- * 
+ *
  * PHP version 5
  *
  * This program is free software: you can redistribute it and/or modify
index f5a0b62588d7428062a65bed2edf51bd098a8fbc..396de22b093e11f6d0469ecc804ffe0c4258ab38 100644 (file)
@@ -83,7 +83,6 @@ function save_twitter_user($twitter_id, $screen_name)
                                          $screen_name,
                                          $oldname));
         }
-
     } else {
         // Kill any old, invalid records for this screen name
         $fuser = Foreign_user::getByNickname($screen_name, TWITTER_SERVICE);
@@ -279,7 +278,6 @@ function broadcast_oauth($notice, $flink) {
     }
 
     if (empty($status)) {
-
         // This could represent a failure posting,
         // or the Twitter API might just be behaving flakey.
         $errmsg = sprintf('Twitter bridge - No data returned by Twitter API when ' .
@@ -320,7 +318,20 @@ function process_error($e, $flink, $notice)
 
     common_log(LOG_WARNING, $logmsg);
 
+    // http://dev.twitter.com/pages/responses_errors
     switch($code) {
+     case 400:
+         // Probably invalid data (bad Unicode chars or coords) that
+         // cannot be resolved by just sending again.
+         //
+         // It could also be rate limiting, but retrying immediately
+         // won't help much with that, so we'll discard for now.
+         // If a facility for retrying things later comes up in future,
+         // we can detect the rate-limiting headers and use that.
+         //
+         // Discard the message permanently.
+         return true;
+         break;
      case 401:
         // Probably a revoked or otherwise bad access token - nuke!
         remove_twitter_link($flink);
@@ -330,6 +341,13 @@ function process_error($e, $flink, $notice)
         // User has exceeder her rate limit -- toss the notice
         return true;
         break;
+     case 404:
+         // Resource not found. Shouldn't happen much on posting,
+         // but just in case!
+         //
+         // Consider it a matter for tossing the notice.
+         return true;
+         break;
      default:
 
         // For every other case, it's probably some flakiness so try
@@ -406,10 +424,14 @@ function mail_twitter_bridge_removed($user)
 
     common_switch_locale($user->language);
 
-    $subject = sprintf(_m('Your Twitter bridge has been disabled.'));
+    // TRANS: Mail subject after forwarding notices to Twitter has stopped working.
+    $subject = sprintf(_m('Your Twitter bridge has been disabled'));
 
     $site_name = common_config('site', 'name');
 
+    // TRANS: Mail body after forwarding notices to Twitter has stopped working.
+    // TRANS: %1$ is the name of the user the mail is sent to, %2$s is a URL to the
+    // TRANS: Twitter settings, %3$s is the StatusNet sitename.
     $body = sprintf(_m('Hi, %1$s. We\'re sorry to inform you that your ' .
         'link to Twitter has been disabled. We no longer seem to have ' .
     'permission to update your Twitter status. Did you maybe revoke ' .