]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
* i18n/L10n fixes.
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Mon, 25 Oct 2010 21:51:00 +0000 (23:51 +0200)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Wed, 27 Oct 2010 23:21:09 +0000 (01:21 +0200)
* translator documentation updated.
* superfluous whitespace removed.

30 files changed:
actions/accessadminpanel.php
actions/accesstoken.php
actions/all.php
actions/allrss.php
actions/apiaccountratelimitstatus.php
actions/apiaccountupdatedeliverydevice.php
actions/apiaccountupdateprofile.php
actions/apiaccountupdateprofilebackgroundimage.php
actions/apiaccountupdateprofilecolors.php
actions/apiaccountupdateprofileimage.php
actions/apiaccountverifycredentials.php
actions/apiblockdestroy.php
actions/apidirectmessage.php
actions/apidirectmessagenew.php
actions/apifavoritecreate.php
actions/apifavoritedestroy.php
actions/apifriendshipscreate.php
actions/apifriendshipsdestroy.php
actions/apifriendshipsexists.php
actions/apifriendshipsshow.php
actions/apigroupcreate.php
actions/apigroupismember.php
actions/apigroupjoin.php
actions/apigroupleave.php
actions/apigrouplist.php
actions/apigrouplistall.php
actions/apigroupmembership.php
actions/apigroupshow.php
actions/apihelptest.php
actions/newgroup.php

index 73354e97a7bd1c47fb14395bc3b6c4ec51021422..027c69c5e5d64855e303bd7eb35756d75e6a824f 100644 (file)
@@ -40,7 +40,6 @@ if (!defined('STATUSNET')) {
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class AccessadminpanelAction extends AdminPanelAction
 {
     /**
@@ -48,10 +47,9 @@ class AccessadminpanelAction extends AdminPanelAction
      *
      * @return string page title
      */
-
     function title()
     {
-        // TRANS: Page title
+        // TRANS: Page title for Access admin panel that allows configuring site access.
         return _('Access');
     }
 
@@ -60,10 +58,9 @@ class AccessadminpanelAction extends AdminPanelAction
      *
      * @return string instructions
      */
-
     function getInstructions()
     {
-       // TRANS: Page notice
+        // TRANS: Page notice.
         return _('Site access settings');
     }
 
@@ -72,7 +69,6 @@ class AccessadminpanelAction extends AdminPanelAction
      *
      * @return void
      */
-
     function showForm()
     {
         $form = new AccessAdminPanelForm($this);
@@ -85,7 +81,6 @@ class AccessadminpanelAction extends AdminPanelAction
      *
      * @return void
      */
-
     function saveSettings()
     {
         static $booleans = array('site' => array('private', 'inviteonly', 'closed'));
@@ -110,7 +105,6 @@ class AccessadminpanelAction extends AdminPanelAction
 
         return;
     }
-
 }
 
 class AccessAdminPanelForm extends AdminForm
@@ -120,7 +114,6 @@ class AccessAdminPanelForm extends AdminForm
      *
      * @return int ID of the form
      */
-
     function id()
     {
         return 'form_site_admin_panel';
@@ -131,7 +124,6 @@ class AccessAdminPanelForm extends AdminForm
      *
      * @return string class of the form
      */
-
     function formClass()
     {
         return 'form_settings';
@@ -142,7 +134,6 @@ class AccessAdminPanelForm extends AdminForm
      *
      * @return string URL of the action
      */
-
     function action()
     {
         return common_local_url('accessadminpanel');
@@ -153,7 +144,6 @@ class AccessAdminPanelForm extends AdminForm
      *
      * @return void
      */
-
     function formData()
     {
        $this->out->elementStart('fieldset', array('id' => 'settings_admin_access'));
@@ -161,7 +151,7 @@ class AccessAdminPanelForm extends AdminForm
         $this->out->element('legend', null, _('Registration'));
         $this->out->elementStart('ul', 'form_data');
         $this->li();
-        // TRANS: Checkbox instructions for admin setting "Private"
+        // TRANS: Checkbox instructions for admin setting "Private".
         $instructions = _('Prohibit anonymous users (not logged in) from viewing site?');
         // TRANS: Checkbox label for prohibiting anonymous users from viewing site.
         $this->out->checkbox('private', _m('LABEL', 'Private'),
@@ -170,7 +160,7 @@ class AccessAdminPanelForm extends AdminForm
         $this->unli();
 
         $this->li();
-        // TRANS: Checkbox instructions for admin setting "Invite only"
+        // TRANS: Checkbox instructions for admin setting "Invite only".
         $instructions = _('Make registration invitation only.');
         // TRANS: Checkbox label for configuring site as invite only.
         $this->out->checkbox('inviteonly', _('Invite only'),
@@ -179,7 +169,7 @@ class AccessAdminPanelForm extends AdminForm
         $this->unli();
 
         $this->li();
-        // TRANS: Checkbox instructions for admin setting "Closed" (no new registrations)
+        // TRANS: Checkbox instructions for admin setting "Closed" (no new registrations).
         $instructions = _('Disable new registrations.');
         // TRANS: Checkbox label for disabling new user registrations.
         $this->out->checkbox('closed', _('Closed'),
@@ -195,12 +185,11 @@ class AccessAdminPanelForm extends AdminForm
      *
      * @return void
      */
-
     function formActions()
     {
-        // TRANS: Title / tooltip for button to save access settings in site admin panel
+        // TRANS: Title for button to save access settings in site admin panel.
         $title = _('Save access settings');
+        // TRANS: Tooltip for button to save access settings in site admin panel.
         $this->out->submit('submit', _m('BUTTON', 'Save'), 'submit', null, $title);
     }
-
 }
index 76bd40473a954729f43fd2f53bbc852292b35446..bfb771b0b39cef81f14ca22c139167af734b9de2 100644 (file)
@@ -67,4 +67,3 @@ class AccesstokenAction extends Action
         }
     }
 }
-?>
index b65335abcdf3d2cf27aff4fe7e95261ee8771871..dc08592faf15f98096172dadddee6700fae9cc3e 100644 (file)
@@ -64,7 +64,7 @@ class AllAction extends ProfileAction
         }
 
         if ($this->page > 1 && $this->notice->N == 0) {
-            // TRANS: Server error when page not found (404)
+            // TRANS: Server error when page not found (404).
             $this->serverError(_('No such page.'), $code = 404);
         }
 
@@ -76,6 +76,7 @@ class AllAction extends ProfileAction
         parent::handle($args);
 
         if (!$this->user) {
+            // TRANS: Client error when user not found for an action.
             $this->clientError(_('No such user.'));
             return;
         }
@@ -103,7 +104,7 @@ class AllAction extends ProfileAction
                         'nickname' =>
                         $this->user->nickname)
                 ),
-            // TRANS: %s is user nickname
+                // TRANS: %s is user nickname.
                 sprintf(_('Feed for friends of %s (RSS 1.0)'), $this->user->nickname)),
             new Feed(Feed::RSS2,
                 common_local_url(
@@ -112,7 +113,7 @@ class AllAction extends ProfileAction
                         'id' => $this->user->nickname
                     )
                 ),
-            // TRANS: %s is user nickname
+                // TRANS: %s is user nickname.
                 sprintf(_('Feed for friends of %s (RSS 2.0)'), $this->user->nickname)),
             new Feed(Feed::ATOM,
                 common_local_url(
@@ -121,7 +122,7 @@ class AllAction extends ProfileAction
                         'id' => $this->user->nickname
                     )
                 ),
-                // TRANS: %s is user nickname
+                // TRANS: %s is user nickname.
                 sprintf(_('Feed for friends of %s (Atom)'), $this->user->nickname))
         );
     }
@@ -134,7 +135,7 @@ class AllAction extends ProfileAction
 
     function showEmptyListMessage()
     {
-        // TRANS: %s is user nickname
+        // TRANS: Empty list message. %s is a user nickname.
         $message = sprintf(_('This is the timeline for %s and friends but no one has posted anything yet.'), $this->user->nickname) . ' ';
 
         if (common_logged_in()) {
@@ -144,7 +145,7 @@ class AllAction extends ProfileAction
                 // TRANS: This message contains Markdown links. Keep "](" together.
                 $message .= _('Try subscribing to more people, [join a group](%%action.groups%%) or post something yourself.');
             } else {
-                // TRANS: %1$s is user nickname, %2$s is user nickname, %2$s is user nickname prefixed with "@"
+                // TRANS: %1$s is user nickname, %2$s is user nickname, %2$s is user nickname prefixed with "@".
                 // TRANS: This message contains Markdown links. Keep "](" together.
                 $message .= sprintf(_('You can try to [nudge %1$s](../%2$s) from their profile or [post something to them](%%%%action.newnotice%%%%?status_textarea=%3$s).'), $this->user->nickname, $this->user->nickname, '@' . $this->user->nickname);
             }
@@ -183,10 +184,10 @@ class AllAction extends ProfileAction
     {
         $user = common_current_user();
         if ($user && ($user->id == $this->user->id)) {
-            // TRANS: H1 text
+            // TRANS: H1 text for page when viewing a list for self.
             $this->element('h1', null, _("You and friends"));
         } else {
-            // TRANS: H1 text. %s is a user nickname
+            // TRANS: H1 text for page. %s is a user nickname.
             $this->element('h1', null, sprintf(_('%s and friends'), $this->user->nickname));
         }
     }
index 7df0b1ef7c67c0ee2dc7389f9bede96d7373cdda..d398c8a6ad126fbdfbe64560779943a054023fbe 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /**
  * RSS feed for user and friends timeline action class.
  *
@@ -57,7 +56,6 @@ class AllrssAction extends Rss10Action
      * @param array $args Web and URL arguments
      *
      * @return boolean false if user doesn't exist
-     */
     function prepare($args)
     {
         parent::prepare($args);
@@ -65,6 +63,7 @@ class AllrssAction extends Rss10Action
         $this->user = User::staticGet('nickname', $nickname);
 
         if (!$this->user) {
+            // TRANS: Client error when user not found for an rss related action.
             $this->clientError(_('No such user.'));
             return false;
         } else {
@@ -127,7 +126,7 @@ class AllrssAction extends Rss10Action
      * Get image.
      *
      * @return string user avatar URL or null
-    */
+     */
     function getImage()
     {
         $user    = $this->user;
@@ -139,4 +138,3 @@ class AllrssAction extends Rss10Action
         return $avatar ? $avatar->url : null;
     }
 }
-
index e2dff2db94ffb743a901ce54b9d17a45bef2ff3b..8d7f89eadccd4168c3fec52dd004a835b0a78a9e 100644 (file)
@@ -49,10 +49,8 @@ require_once INSTALLDIR . '/lib/apibareauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiAccountRateLimitStatusAction extends ApiBareAuthAction
 {
-
     /**
      * Handle the request
      *
@@ -62,7 +60,6 @@ class ApiAccountRateLimitStatusAction extends ApiBareAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
@@ -119,11 +116,8 @@ class ApiAccountRateLimitStatusAction extends ApiBareAuthAction
      *
      * @return boolean is read only action?
      */
-
     function isReadOnly($args)
     {
         return true;
     }
-
 }
-
index a7342a94f38e71d47ea87241e1fac38ba2556186..ec87c4c953b74e5fedcdcb44e0a09d1b58622b3d 100644 (file)
@@ -53,7 +53,6 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
     function prepare($args)
     {
index aea10e33e3fb1a72fba08392af7d6f2f0b791996..163dac42d874907aaed4aedd4ec5c29873123835 100644 (file)
@@ -51,7 +51,6 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
     function prepare($args)
     {
@@ -91,6 +90,7 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
 
         if (!in_array($this->format, array('xml', 'json'))) {
             $this->clientError(
+                // TRANS: Client error displayed when trying to handle an unknown API method.
                 _('API method not found.'),
                 404,
                 $this->format
index 87af962d2182c3b8bf64c07fa6a2e49f9a40ad43..badd8db002a71d43d295a0d5f2c8bd798cc98eab 100644 (file)
@@ -114,6 +114,7 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
         }
 
         if (empty($this->user)) {
+            // TRANS: Client error when user not found updating a profile background image.
             $this->clientError(_('No such user.'), 404, $this->format);
             return;
         }
index 9e07d80de375b1660d22fb334aedc78c9b625e6f..109fbf959e2f545ddf861caeceb1ed2fdb7f6646 100644 (file)
@@ -43,10 +43,8 @@ require_once INSTALLDIR . '/lib/apiauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
 {
-
     var $profile_background_color     = null;
     var $profile_text_color           = null;
     var $profile_link_color           = null;
@@ -59,9 +57,7 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -100,7 +96,6 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
@@ -116,6 +111,7 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
 
         if (!in_array($this->format, array('xml', 'json'))) {
             $this->clientError(
+                // TRANS: Client error displayed trying to execute an unknown API method updating profile colours.
                 _('API method not found.'),
                 404,
                 $this->format
@@ -126,7 +122,6 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
         $design = $this->user->getDesign();
 
         if (!empty($design)) {
-
             $original = clone($design);
 
             try {
@@ -140,12 +135,11 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
 
             if ($result === false) {
                 common_log_db_error($design, 'UPDATE', __FILE__);
+                // TRANS: Client error displayed when a database error occurs updating profile colours.
                 $this->clientError(_('Could not update your design.'));
                 return;
             }
-
         } else {
-
             $this->user->query('BEGIN');
 
             // save new design
@@ -162,6 +156,7 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
 
             if (empty($id)) {
                 common_log_db_error($id, 'INSERT', __FILE__);
+                // TRANS: Client error displayed when a database error occurs inserting profile colours.
                 $this->clientError(_('Unable to save your design settings.'));
                 return;
             }
@@ -172,6 +167,7 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
 
             if (empty($result)) {
                 common_log_db_error($original, 'UPDATE', __FILE__);
+                // TRANS: Client error displayed when a database error occurs updating profile colours.
                 $this->clientError(_('Unable to save your design settings.'));
                 $this->user->query('ROLLBACK');
                 return;
@@ -183,6 +179,7 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
         $profile = $this->user->getProfile();
 
         if (empty($profile)) {
+            // TRANS: Client error displayed a user has no profile updating profile colours.
             $this->clientError(_('User has no profile.'));
             return;
         }
@@ -207,7 +204,6 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
      *
      * @return void
      */
-
     function setColors($design)
     {
         $bgcolor = empty($this->profile_background_color) ?
@@ -243,5 +239,4 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
 
         return true;
     }
-
 }
index 1f38bd22042c872794144881d55808f0cec53dbc..f2886509d7cf4338ba994ab22e84c7ad90add934 100644 (file)
@@ -43,19 +43,15 @@ require_once INSTALLDIR . '/lib/apiauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiAccountUpdateProfileImageAction extends ApiAuthAction
 {
-
     /**
      * Take arguments for running
      *
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -74,7 +70,6 @@ class ApiAccountUpdateProfileImageAction extends ApiAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
@@ -105,6 +100,7 @@ class ApiAccountUpdateProfileImageAction extends ApiAuthAction
         }
 
         if (empty($this->user)) {
+            // TRANS: Client error displayed updating profile image without having a user object.
             $this->clientError(_('No such user.'), 404, $this->format);
             return;
         }
@@ -130,6 +126,7 @@ class ApiAccountUpdateProfileImageAction extends ApiAuthAction
         $profile = $this->user->getProfile();
 
         if (empty($profile)) {
+            // TRANS: Client error displayed if a user profile could not be found updating a profile image.
             $this->clientError(_('User has no profile.'));
             return;
         }
@@ -150,5 +147,4 @@ class ApiAccountUpdateProfileImageAction extends ApiAuthAction
             $this->endDocument('json');
         }
     }
-
 }
index 79416e9b262099df3e2cc4c228844a04a55363de..26d4e2fc5c8aba3c5c6d226892c37f5f455eda95 100644 (file)
@@ -48,10 +48,8 @@ require_once INSTALLDIR . '/lib/apiauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiAccountVerifyCredentialsAction extends ApiAuthAction
 {
-
     /**
      * Handle the request
      *
@@ -61,12 +59,12 @@ class ApiAccountVerifyCredentialsAction extends ApiAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
 
         if (!in_array($this->format, array('xml', 'json'))) {
+            // TRANS: Client error displayed trying to execute an unknown API method verifying user credentials.
             $this->clientError(_('API method not found.'), $code = 404);
             return;
         }
@@ -91,12 +89,9 @@ class ApiAccountVerifyCredentialsAction extends ApiAuthAction
      * @param array $args other arguments
      *
      * @return boolean true
-     *
-     **/
-
+     */
     function isReadOnly($args)
     {
         return true;
     }
-
 }
index b699077849c5ffa025dc678d5d877b5c19171d31..7dd0859e9c8a192bfc375531cc2c6d3f05d07b0c 100644 (file)
@@ -55,7 +55,6 @@ class ApiBlockDestroyAction extends ApiAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
     function prepare($args)
     {
@@ -91,6 +90,7 @@ class ApiBlockDestroyAction extends ApiAuthAction
         }
 
         if (empty($this->user) || empty($this->other)) {
+            // TRANS: Client error when user not found for an API action to remove a block for a user.
             $this->clientError(_('No such user.'), 404, $this->format);
             return;
         }
index 4e2ec5eb08d88286fde2078788fb6f6f9e7c3833..e072e27b8319b925aee1296c6663a79e862cc381 100644 (file)
@@ -48,7 +48,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiDirectMessageAction extends ApiAuthAction
 {
     var $messages     = null;
@@ -64,9 +63,7 @@ class ApiDirectMessageAction extends ApiAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -87,12 +84,12 @@ class ApiDirectMessageAction extends ApiAuthAction
             // Action was called by /api/direct_messages/sent.format
 
             $this->title = sprintf(
-                // TRANS: %s is a user nickname.
+                // TRANS: Title. %s is a user nickname.
                 _("Direct messages from %s"),
                 $this->user->nickname
             );
             $this->subtitle = sprintf(
-                // TRANS: %s is a user nickname.
+                // TRANS: Subtitle. %s is a user nickname.
                 _("All the direct messages sent from %s"),
                 $this->user->nickname
             );
@@ -101,12 +98,12 @@ class ApiDirectMessageAction extends ApiAuthAction
             $this->id = "tag:$taguribase:SentDirectMessages:" . $this->user->id;
         } else {
             $this->title = sprintf(
-                // TRANS: %s is a user nickname.
+                // TRANS: Title. %s is a user nickname.
                 _("Direct messages to %s"),
                 $this->user->nickname
             );
             $this->subtitle = sprintf(
-                // TRANS: %s is a user nickname.
+                // TRANS: Subtitle. %s is a user nickname.
                 _("All the direct messages sent to %s"),
                 $this->user->nickname
             );
@@ -129,7 +126,6 @@ class ApiDirectMessageAction extends ApiAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
@@ -141,7 +137,6 @@ class ApiDirectMessageAction extends ApiAuthAction
      *
      * @return void
      */
-
     function showMessages()
     {
         switch($this->format) {
@@ -169,7 +164,6 @@ class ApiDirectMessageAction extends ApiAuthAction
      *
      * @return array notices
      */
-
     function getMessages()
     {
         $message  = new Message();
@@ -208,7 +202,6 @@ class ApiDirectMessageAction extends ApiAuthAction
      *
      * @return boolean true
      */
-
     function isReadOnly($args)
     {
         return true;
@@ -219,7 +212,6 @@ class ApiDirectMessageAction extends ApiAuthAction
      *
      * @return string datestamp of the latest notice in the stream
      */
-
     function lastModified()
     {
         if (!empty($this->messages)) {
@@ -234,7 +226,6 @@ class ApiDirectMessageAction extends ApiAuthAction
      *
      * @return void
      */
-
     function showXmlDirectMessages()
     {
         $this->initDocument('xml');
@@ -255,7 +246,6 @@ class ApiDirectMessageAction extends ApiAuthAction
      *
      * @return void
      */
-
     function showJsonDirectMessages()
     {
         $this->initDocument('json');
@@ -276,7 +266,6 @@ class ApiDirectMessageAction extends ApiAuthAction
      *
      * @return void
      */
-
     function showRssDirectMessages()
     {
         $this->initDocument('rss');
@@ -311,7 +300,6 @@ class ApiDirectMessageAction extends ApiAuthAction
      *
      * @return void
      */
-
     function showAtomDirectMessages()
     {
         $this->initDocument('atom');
@@ -353,7 +341,6 @@ class ApiDirectMessageAction extends ApiAuthAction
      *
      * @return string etag
      */
-
     function etag()
     {
         if (!empty($this->messages)) {
@@ -374,5 +361,4 @@ class ApiDirectMessageAction extends ApiAuthAction
 
         return null;
     }
-
 }
index ccef57b3f8dbfb5ed0eac71511df4a7e643a25b8..b335a9c93ee360903538f390f268ceffd648f70f 100644 (file)
@@ -60,7 +60,6 @@ class ApiDirectMessageNewAction extends ApiAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
     function prepare($args)
     {
@@ -69,6 +68,7 @@ class ApiDirectMessageNewAction extends ApiAuthAction
         $this->user = $this->auth_user;
 
         if (empty($this->user)) {
+            // TRANS: Client error when user not found for an API direct message action.
             $this->clientError(_('No such user.'), 404, $this->format);
             return;
         }
@@ -113,7 +113,7 @@ class ApiDirectMessageNewAction extends ApiAuthAction
 
         if (empty($this->content)) {
             $this->clientError(
-                // TRANS: Client error (406).
+                // TRANS: Client error displayed when no message text was submitted (406).
                 _('No message text!'),
                 406,
                 $this->format
index 90a29d2288962121241383ef2585d7cd8dc0fe19..b2f6266ebfb9154bb0c1862f3c63154424729edb 100644 (file)
@@ -58,7 +58,6 @@ class ApiFavoriteCreateAction extends ApiAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
     function prepare($args)
     {
@@ -95,6 +94,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction
 
         if (!in_array($this->format, array('xml', 'json'))) {
             $this->clientError(
+                // TRANS: Client error displayed when trying to handle an unknown API method.
                 _('API method not found.'),
                 404,
                 $this->format
index c2e1ebafc7a5d5703455a558a326ec747d23e08f..f86c985dc0ff1c81f5053e96620ec59525603ed4 100644 (file)
@@ -48,10 +48,8 @@ require_once INSTALLDIR . '/lib/apiauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiFavoriteDestroyAction extends ApiAuthAction
 {
-
     var $notice = null;
 
     /**
@@ -60,9 +58,7 @@ class ApiFavoriteDestroyAction extends ApiAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -82,7 +78,6 @@ class ApiFavoriteDestroyAction extends ApiAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
@@ -99,6 +94,7 @@ class ApiFavoriteDestroyAction extends ApiAuthAction
 
         if (!in_array($this->format, array('xml', 'json'))) {
             $this->clientError(
+                // TRANS: Client error displayed when trying to handle an unknown API method.
                 _('API method not found.'),
                 404,
                 $this->format
@@ -108,6 +104,7 @@ class ApiFavoriteDestroyAction extends ApiAuthAction
 
         if (empty($this->notice)) {
             $this->clientError(
+                // TRANS: Client error displayed when trying to remove a favourite with an invalid ID.
                 _('No status found with that ID.'),
                 404,
                 $this->format
@@ -121,6 +118,7 @@ class ApiFavoriteDestroyAction extends ApiAuthAction
 
         if (!$fave->find(true)) {
             $this->clientError(
+                // TRANS: Client error displayed when trying to remove a favourite that was not a favourite.
                 _('That status is not a favorite.'),
                 403,
                 $this->favorite
@@ -133,6 +131,7 @@ class ApiFavoriteDestroyAction extends ApiAuthAction
         if (!$result) {
             common_log_db_error($fave, 'DELETE', __FILE__);
             $this->clientError(
+                // TRANS: Client error displayed when removing a favourite has failed.
                 _('Could not delete favorite.'),
                 404,
                 $this->format
@@ -148,5 +147,4 @@ class ApiFavoriteDestroyAction extends ApiAuthAction
             $this->show_single_json_status($this->notice);
         }
     }
-
 }
index 64c857c70c2c4a97dfe3a5e8f666a33d2291480f..89557f8392f6ce1065dab16145c0461a099826bf 100644 (file)
@@ -48,7 +48,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiFriendshipsCreateAction extends ApiAuthAction
 {
     var $other  = null;
@@ -61,7 +60,6 @@ class ApiFriendshipsCreateAction extends ApiAuthAction
      * @return boolean success flag
      *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -81,7 +79,6 @@ class ApiFriendshipsCreateAction extends ApiAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
@@ -98,6 +95,7 @@ class ApiFriendshipsCreateAction extends ApiAuthAction
 
         if (!in_array($this->format, array('xml', 'json'))) {
             $this->clientError(
+                // TRANS: Client error displayed when trying to handle an unknown API method.
                 _('API method not found.'),
                 404,
                 $this->format
@@ -107,6 +105,7 @@ class ApiFriendshipsCreateAction extends ApiAuthAction
 
         if (empty($this->other)) {
             $this->clientError(
+                // TRANS: Client error displayed when trying follow who's profile could not be found.
                 _('Could not follow user: profile not found.'),
                 403,
                 $this->format
@@ -116,6 +115,8 @@ class ApiFriendshipsCreateAction extends ApiAuthAction
 
         if ($this->user->isSubscribed($this->other)) {
             $errmsg = sprintf(
+                // TRANS: Client error displayed when trying to follow a user that's already being followed.
+                // TRANS: %s is the nickname of the user that is already being followed.
                 _('Could not follow user: %s is already on your list.'),
                 $this->other->nickname
             );
@@ -134,5 +135,4 @@ class ApiFriendshipsCreateAction extends ApiAuthAction
         $this->showProfile($this->other, $this->format);
         $this->endDocument($this->format);
     }
-
 }
index 21da23ef7cbc9500b85991e62fd03e3dada8f844..a5dff08bab5759cdc8748a942f678e6378636c9c 100644 (file)
@@ -48,7 +48,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiFriendshipsDestroyAction extends ApiAuthAction
 {
     var $other  = null;
@@ -61,7 +60,6 @@ class ApiFriendshipsDestroyAction extends ApiAuthAction
      * @return boolean success flag
      *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -81,7 +79,6 @@ class ApiFriendshipsDestroyAction extends ApiAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
@@ -98,6 +95,7 @@ class ApiFriendshipsDestroyAction extends ApiAuthAction
 
         if (!in_array($this->format, array('xml', 'json'))) {
             $this->clientError(
+                // TRANS: Client error displayed when trying to handle an unknown API method.
                 _('API method not found.'),
                 404,
                 $this->format
@@ -107,6 +105,7 @@ class ApiFriendshipsDestroyAction extends ApiAuthAction
 
         if (empty($this->other)) {
             $this->clientError(
+                // TRANS: Client error displayed when trying to unfollow a user that cannot be found.
                 _('Could not unfollow user: User not found.'),
                 403,
                 $this->format
@@ -118,6 +117,7 @@ class ApiFriendshipsDestroyAction extends ApiAuthAction
 
         if ($this->user->id == $this->other->id) {
             $this->clientError(
+                // TRANS: Client error displayed when trying to unfollow self.
                 _("You cannot unfollow yourself."),
                 403,
                 $this->format
@@ -132,5 +132,4 @@ class ApiFriendshipsDestroyAction extends ApiAuthAction
         $this->showProfile($this->other, $this->format);
         $this->endDocument($this->format);
     }
-
 }
index 725178fd427bf52d0265909871cdfda465b900eb..c8766633b67f07181ed75a3c5d339117d9bcb2b5 100644 (file)
@@ -47,7 +47,6 @@ require_once INSTALLDIR . '/lib/apiprivateauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiFriendshipsExistsAction extends ApiPrivateAuthAction
 {
     var $profile_a = null;
@@ -59,9 +58,7 @@ class ApiFriendshipsExistsAction extends ApiPrivateAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -81,13 +78,13 @@ class ApiFriendshipsExistsAction extends ApiPrivateAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
 
         if (empty($this->profile_a) || empty($this->profile_b)) {
             $this->clientError(
+                // TRANS: Client error displayed when supplying invalid parameters to an API call checking if a friendship exists.
                 _('Two valid IDs or screen_names must be supplied.'),
                 400,
                 $this->format
@@ -122,10 +119,8 @@ class ApiFriendshipsExistsAction extends ApiPrivateAuthAction
      *
      * @return boolean is read only action?
      */
-
     function isReadOnly($args)
     {
         return true;
     }
-
 }
index f29e63713759ac007f81afb7b63823fb9b144276..6b069c4fcfe09f7107e4bf01174950c47a6f0080 100644 (file)
@@ -46,7 +46,6 @@ require_once INSTALLDIR . '/lib/apibareauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiFriendshipsShowAction extends ApiBareAuthAction
 {
     var $source = null;
@@ -58,9 +57,7 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -93,7 +90,6 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction
      *
      * @return boolean true or false
      */
-
     function requiresAuth()
     {
         if (common_config('site', 'private')) {
@@ -119,18 +115,19 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
 
         if (!in_array($this->format, array('xml', 'json'))) {
+            // TRANS: Client error displayed trying to execute an unknown API method showing friendship.
             $this->clientError(_('API method not found.'), 404);
             return;
         }
 
         if (empty($this->source)) {
             $this->clientError(
+                // TRANS: Client error displayed when a source user could not be determined showing friendship.
                 _('Could not determine source user.'),
                 404
              );
@@ -139,6 +136,7 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction
 
         if (empty($this->target)) {
             $this->clientError(
+                // TRANS: Client error displayed when a target user could not be determined showing friendship.
                 _('Could not find target user.'),
                 404
             );
@@ -161,7 +159,6 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction
         default:
             break;
         }
-
     }
 
     /**
@@ -178,5 +175,4 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction
     {
         return true;
     }
-
 }
index 1608e030b8c44ab026ae5743ee27dd0fb44b1c22..54875a7188fd77c68a6e2de900db81e5d462cd30 100644 (file)
@@ -66,9 +66,7 @@ class ApiGroupCreateAction extends ApiAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -150,7 +148,6 @@ class ApiGroupCreateAction extends ApiAuthAction
      *
      * @return void
      */
-
     function validateParams()
     {
         $valid = Validate::string(
@@ -218,7 +215,11 @@ class ApiGroupCreateAction extends ApiAuthAction
         } elseif (User_group::descriptionTooLong($this->description)) {
             $this->clientError(
                 sprintf(
-                    _('Description is too long (max %d chars).'),
+                    // TRANS: Client error shown when providing too long a description during group creation.
+                    // TRANS: %d is the maximum number of allowed characters.
+                    _m('Description is too long (maximum %d character).',
+                      'Description is too long (maximum %d characters).',
+                      User_group::maxDescription()),
                     User_group::maxDescription()
                 ),
                 403,
@@ -229,6 +230,7 @@ class ApiGroupCreateAction extends ApiAuthAction
             !is_null($this->location)
             && mb_strlen($this->location) > 255) {
                 $this->clientError(
+                    // TRANS: Client error shown when providing too long a location during group creation.
                     _('Location is too long (maximum 255 characters).'),
                     403,
                     $this->format
@@ -248,7 +250,11 @@ class ApiGroupCreateAction extends ApiAuthAction
         if (count($this->aliases) > common_config('group', 'maxaliases')) {
             $this->clientError(
                 sprintf(
-                    _('Too many aliases! Maximum %d.'),
+                    // TRANS: Client error shown when providing too many aliases during group creation.
+                    // TRANS: %d is the maximum number of allowed aliases.
+                    _m('Too many aliases! Maximum %d allowed.',
+                       'Too many aliases! Maximum %d allowed.',
+                       common_config('group', 'maxaliases')),
                     common_config('group', 'maxaliases')
                 ),
                 403,
@@ -269,6 +275,8 @@ class ApiGroupCreateAction extends ApiAuthAction
 
             if (!$valid) {
                 $this->clientError(
+                    // TRANS: Client error shown when providing an invalid alias during group creation.
+                    // TRANS: %s is the invalid alias.
                     sprintf(_('Invalid alias: "%s".'), $alias),
                     403,
                     $this->format
@@ -278,6 +286,8 @@ class ApiGroupCreateAction extends ApiAuthAction
             if ($this->groupNicknameExists($alias)) {
                 $this->clientError(
                     sprintf(
+                        // TRANS: Client error displayed when trying to use an alias during group creation that is already in use.
+                        // TRANS: %s is the alias that is already in use.
                         _('Alias "%s" already in use. Try another one.'),
                         $alias
                     ),
@@ -291,6 +301,7 @@ class ApiGroupCreateAction extends ApiAuthAction
 
             if (strcmp($alias, $this->nickname) == 0) {
                 $this->clientError(
+                    // TRANS: Client error displayed when trying to use an alias during group creation that is the same as the group's nickname.
                     _('Alias can\'t be the same as nickname.'),
                     403,
                     $this->format
@@ -299,7 +310,7 @@ class ApiGroupCreateAction extends ApiAuthAction
             }
         }
 
-        // Evarything looks OK
+        // Everything looks OK
 
         return true;
     }
@@ -311,7 +322,6 @@ class ApiGroupCreateAction extends ApiAuthAction
      *
      * @return boolean true or false
      */
-
     function groupNicknameExists($nickname)
     {
         $local = Local_group::staticGet('nickname', $nickname);
@@ -328,5 +338,4 @@ class ApiGroupCreateAction extends ApiAuthAction
 
         return false;
     }
-
 }
index eaa4769f3e1989db8db52dc687373125302d0447..8d31c65ddb8883d46bc66e8df4a2c823bbfcdd92 100644 (file)
@@ -49,7 +49,6 @@ require_once INSTALLDIR . '/lib/apibareauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiGroupIsMemberAction extends ApiBareAuthAction
 {
     var $group   = null;
@@ -60,7 +59,6 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
 
     function prepare($args)
@@ -82,17 +80,18 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
 
         if (empty($this->user)) {
+            // TRANS: Client error displayed when checking group membership for a non-existing user.
             $this->clientError(_('No such user.'), 404, $this->format);
             return;
         }
 
         if (empty($this->group)) {
+            // TRANS: Client error displayed when checking group membership for a non-existing group.
             $this->clientError(_('Group not found.'), 404, $this->format);
             return false;
         }
@@ -112,6 +111,7 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction
             break;
         default:
             $this->clientError(
+                // TRANS: Client error displayed trying to execute an unknown API method showing group membership.
                 _('API method not found.'),
                 400,
                 $this->format
@@ -129,10 +129,8 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction
      *
      * @return boolean is read only action?
      */
-
     function isReadOnly($args)
     {
         return true;
     }
-
 }
index a0c069974ba12bdbbf77d6640f9ddc08184a842b..345fed2215e7587d582a46605f2df578fd9c2721 100644 (file)
@@ -49,7 +49,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiGroupJoinAction extends ApiAuthAction
 {
     var $group   = null;
@@ -60,9 +59,7 @@ class ApiGroupJoinAction extends ApiAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -82,7 +79,6 @@ class ApiGroupJoinAction extends ApiAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
@@ -98,17 +94,20 @@ class ApiGroupJoinAction extends ApiAuthAction
         }
 
         if (empty($this->user)) {
+            // TRANS: Client error displayed when trying to have a non-existing user join a group.
             $this->clientError(_('No such user.'), 404, $this->format);
             return;
         }
 
         if (empty($this->group)) {
+            // TRANS: Client error displayed when trying to join a group that does not exist.
             $this->clientError(_('Group not found.'), 404, $this->format);
             return false;
         }
 
         if ($this->user->isMember($this->group)) {
             $this->clientError(
+                // TRANS: Server error displayed when trying to join a group the user is already a member of.
                 _('You are already a member of that group.'),
                 403,
                 $this->format
@@ -118,6 +117,7 @@ class ApiGroupJoinAction extends ApiAuthAction
 
         if (Group_block::isBlocked($this->group, $this->user->getProfile())) {
             $this->clientError(
+                // TRANS: Server error displayed when trying to join a group the user is blocked from joining.
                 _('You have been blocked from that group by the admin.'),
                 403,
                 $this->format
@@ -137,6 +137,8 @@ class ApiGroupJoinAction extends ApiAuthAction
             common_log_db_error($member, 'INSERT', __FILE__);
             $this->serverError(
                 sprintf(
+                    // TRANS: Server error displayed when joining a group fails.
+                    // TRANS: %1$s is a user nickname, $2$s is a group nickname.
                     _('Could not join user %1$s to group %2$s.'),
                     $this->user->nickname,
                     $this->group->nickname
@@ -154,6 +156,7 @@ class ApiGroupJoinAction extends ApiAuthAction
             break;
         default:
             $this->clientError(
+                // TRANS: Client error displayed trying to execute an unknown API method joining a group.
                 _('API method not found.'),
                 404,
                 $this->format
@@ -161,5 +164,4 @@ class ApiGroupJoinAction extends ApiAuthAction
             break;
         }
     }
-
 }
index c838f6c878b5a4cf16d13293b5ffa9058a28cbc5..0ceb3523c8483a95f6f45dc1a31a9a4a8d755175 100644 (file)
@@ -49,7 +49,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiGroupLeaveAction extends ApiAuthAction
 {
     var $group   = null;
@@ -60,9 +59,7 @@ class ApiGroupLeaveAction extends ApiAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -82,7 +79,6 @@ class ApiGroupLeaveAction extends ApiAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
@@ -98,11 +94,13 @@ class ApiGroupLeaveAction extends ApiAuthAction
         }
 
         if (empty($this->user)) {
+            // TRANS: Client error displayed when trying to have a non-existing user leave a group.
             $this->clientError(_('No such user.'), 404, $this->format);
             return;
         }
 
         if (empty($this->group)) {
+            // TRANS: Client error displayed when trying to leave a group that does not exist.
             $this->clientError(_('Group not found.'), 404, $this->format);
             return false;
         }
@@ -113,6 +111,7 @@ class ApiGroupLeaveAction extends ApiAuthAction
         $member->profile_id = $this->auth_user->id;
 
         if (!$member->find(true)) {
+            // TRANS: Server error displayed when trying to leave a group the user is not a member of.
             $this->serverError(_('You are not a member of this group.'));
             return;
         }
@@ -123,6 +122,8 @@ class ApiGroupLeaveAction extends ApiAuthAction
             common_log_db_error($member, 'DELETE', __FILE__);
             $this->serverError(
                 sprintf(
+                    // TRANS: Server error displayed when leaving a group fails.
+                    // TRANS: %1$s is a user nickname, $2$s is a group nickname.
                     _('Could not remove user %1$s from group %2$s.'),
                     $this->user->nickname,
                     $this->group->nickname
@@ -140,6 +141,7 @@ class ApiGroupLeaveAction extends ApiAuthAction
             break;
         default:
             $this->clientError(
+                // TRANS: Client error displayed trying to execute an unknown API method leaving a group.
                 _('API method not found.'),
                 404,
                 $this->format
@@ -147,5 +149,4 @@ class ApiGroupLeaveAction extends ApiAuthAction
             break;
         }
     }
-
 }
index 319a1e424d3c15285df9921ddcdb74a7f1d71fc4..1f6d44363f6377bc496550fe95bd2469c9257eec 100644 (file)
@@ -49,7 +49,6 @@ require_once INSTALLDIR . '/lib/apibareauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiGroupListAction extends ApiBareAuthAction
 {
     var $groups   = null;
@@ -60,9 +59,7 @@ class ApiGroupListAction extends ApiBareAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -88,13 +85,12 @@ class ApiGroupListAction extends ApiBareAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
 
         $sitename   = common_config('site', 'name');
-        // TRANS: %s is a user name
+        // TRANS: Used as title in check for group membership. %s is a user name.
         $title      = sprintf(_("%s's groups"), $this->user->nickname);
         $taguribase = TagURI::base();
         $id         = "tag:$taguribase:Groups";
@@ -104,8 +100,8 @@ class ApiGroupListAction extends ApiBareAuthAction
         );
 
         $subtitle   = sprintf(
-            // TRANS: Meant to convey the user %2$s is a member of each of the groups listed on site %1$s
-            _("%1\$s groups %2\$s is a member of."),
+            // TRANS: Used as subtitle in check for group membership. %1$s is a user name, %2$s is the site name.
+            _('%1$s groups %2$s is a member of.'),
             $sitename,
             $this->user->nickname
         );
@@ -134,13 +130,13 @@ class ApiGroupListAction extends ApiBareAuthAction
             break;
         default:
             $this->clientError(
+                // TRANS: Client error displayed trying to execute an unknown API method checking group membership.
                 _('API method not found.'),
                 404,
                 $this->format
             );
             break;
         }
-
     }
 
     /**
@@ -148,7 +144,6 @@ class ApiGroupListAction extends ApiBareAuthAction
      *
      * @return array groups
      */
-
     function getGroups()
     {
         $groups = array();
@@ -174,7 +169,6 @@ class ApiGroupListAction extends ApiBareAuthAction
      *
      * @return boolean true
      */
-
     function isReadOnly($args)
     {
         return true;
@@ -203,7 +197,6 @@ class ApiGroupListAction extends ApiBareAuthAction
      *
      * @return string etag
      */
-
     function etag()
     {
         if (!empty($this->groups) && (count($this->groups) > 0)) {
@@ -224,5 +217,4 @@ class ApiGroupListAction extends ApiBareAuthAction
 
         return null;
     }
-
 }
index cc7cd901dcfe052c1307e20c061a3a6205758b92..d05baa0992d928fdc35e5cb3b58d205d90a408da 100644 (file)
@@ -49,7 +49,6 @@ require_once INSTALLDIR . '/lib/apiprivateauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiGroupListAllAction extends ApiPrivateAuthAction
 {
     var $groups   = null;
@@ -60,9 +59,7 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -82,17 +79,17 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
 
         $sitename   = common_config('site', 'name');
-        // TRANS: Message is used as a title. %s is a site name.
+        // TRANS: Message is used as a title when listing the lastest 20 groups. %s is a site name.
         $title      = sprintf(_("%s groups"), $sitename);
         $taguribase = TagURI::base();
         $id         = "tag:$taguribase:Groups";
         $link       = common_local_url('groups');
+        // TRANS: Message is used as a subtitle when listing the lastest 20 groups. %s is a site name.
         $subtitle   = sprintf(_("groups on %s"), $sitename);
 
         switch($this->format) {
@@ -119,13 +116,13 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
             break;
         default:
             $this->clientError(
+                // TRANS: Client error displayed trying to execute an unknown API method listing the latest 20 groups.
                 _('API method not found.'),
                 404,
                 $this->format
             );
             break;
         }
-
     }
 
     /**
@@ -133,7 +130,6 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
      *
      * @return array groups
      */
-
     function getGroups()
     {
         $qry = 'SELECT user_group.* '.
@@ -165,7 +161,6 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
      *
      * @return boolean true
      */
-
     function isReadOnly($args)
     {
         return true;
@@ -176,7 +171,6 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
      *
      * @return string datestamp of the site's latest group
      */
-
     function lastModified()
     {
         if (!empty($this->groups) && (count($this->groups) > 0)) {
@@ -194,7 +188,6 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
      *
      * @return string etag
      */
-
     function etag()
     {
         if (!empty($this->groups) && (count($this->groups) > 0)) {
@@ -214,5 +207,4 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
 
         return null;
     }
-
 }
index b7f3064b5ad8490fbb3ceaa5e9dd304cef0311ce..99ac965fa18d2c5aa9de82cf91ef317a3be8e025 100644 (file)
@@ -49,7 +49,6 @@ require_once INSTALLDIR . '/lib/apiprivateauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiGroupMembershipAction extends ApiPrivateAuthAction
 {
     var $group    = null;
@@ -61,9 +60,7 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -83,12 +80,12 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
 
         if (empty($this->group)) {
+            // TRANS: Client error displayed trying to show group membership on a non-existing group.
             $this->clientError(_('Group not found.'), 404, $this->format);
             return false;
         }
@@ -104,6 +101,7 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction
             break;
         default:
             $this->clientError(
+                // TRANS: Client error displayed trying to execute an unknown API method showing group membership.
                 _('API method not found.'),
                 404,
                 $this->format
@@ -117,7 +115,6 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction
      *
      * @return array $profiles list of profiles
      */
-
     function getProfiles()
     {
         $profiles = array();
@@ -143,7 +140,6 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction
      *
      * @return boolean true
      */
-
     function isReadOnly($args)
     {
         return true;
@@ -154,7 +150,6 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction
      *
      * @return string datestamp of the lastest profile in the group
      */
-
     function lastModified()
     {
         if (!empty($this->profiles) && (count($this->profiles) > 0)) {
@@ -173,7 +168,6 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction
      *
      * @return string etag
      */
-
     function etag()
     {
         if (!empty($this->profiles) && (count($this->profiles) > 0)) {
@@ -194,5 +188,4 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction
 
         return null;
     }
-
 }
index 9b90e6b3832df6717c2ef7165f778defa9a55f9a..471aa141f9c1684cfa814eddcfbe6e45a51b0e8c 100644 (file)
@@ -50,7 +50,6 @@ require_once INSTALLDIR . '/lib/apiprivateauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiGroupShowAction extends ApiPrivateAuthAction
 {
     var $group = null;
@@ -61,9 +60,7 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -80,6 +77,7 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
                 common_redirect(common_local_url('ApiGroupShow', $args), 301);
             } else {
                 $this->clientError(
+                    // TRANS: Client error displayed when trying to show a group that could not be found.
                     _('Group not found.'),
                     404,
                     $this->format
@@ -100,7 +98,6 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
@@ -113,6 +110,7 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
             $this->showSingleJsonGroup($this->group);
             break;
         default:
+            // TRANS: Client error displayed trying to execute an unknown API method showing a group.
             $this->clientError(_('API method not found.'), 404, $this->format);
             break;
         }
@@ -123,7 +121,6 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
      *
      * @return string datestamp of the latest notice in the stream
      */
-
     function lastModified()
     {
         if (!empty($this->group)) {
@@ -141,7 +138,6 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
      *
      * @return string etag
      */
-
     function etag()
     {
         if (!empty($this->group)) {
@@ -169,10 +165,8 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
      *
      * @return boolean is read only action?
      */
-
     function isReadOnly($args)
     {
         return true;
     }
-
 }
index d0e9e4926f55ca85adfce968ef50a9feb9cb83f3..fbe5f1278460f56de3429b1a91be6e97d9680597 100644 (file)
@@ -44,19 +44,15 @@ require_once INSTALLDIR . '/lib/apiprivateauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiHelpTestAction extends ApiPrivateAuthAction
 {
-
     /**
      * Take arguments for running
      *
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -70,7 +66,6 @@ class ApiHelpTestAction extends ApiPrivateAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
@@ -85,6 +80,7 @@ class ApiHelpTestAction extends ApiPrivateAuthAction
             $this->endDocument('json');
         } else {
             $this->clientError(
+                // TRANS: Client error displayed trying to execute an unknown API method testing API connectivity.
                 _('API method not found.'),
                 404,
                 $this->format
@@ -101,11 +97,8 @@ class ApiHelpTestAction extends ApiPrivateAuthAction
      *
      * @return boolean is read only action?
      */
-
     function isReadOnly($args)
     {
         return true;
     }
-
 }
-
index ebfe9b599d993d753c8677cc534c633a393a0d03..2951920362740e149c0650ae9fbfcc03e19ef7f1 100644 (file)
@@ -142,7 +142,12 @@ class NewgroupAction extends Action
             $this->showForm(_('Full name is too long (maximum 255 characters).'));
             return;
         } else if (User_group::descriptionTooLong($description)) {
-            $this->showForm(sprintf(_('description is too long (max %d chars).'), User_group::maxDescription()));
+            // TRANS: Form validation error creating a new group because the description is too long.
+            // TRANS: %d is the maximum number of allowed characters.
+            $this->showForm(sprintf(_m('Description is too long (maximum %d character).',
+                                       'Description is too long (maximum %d characters).',
+                                       User_group::maxDescription(),
+                                    User_group::maxDescription()));
             return;
         } else if (!is_null($location) && mb_strlen($location) > 255) {
             $this->showForm(_('Location is too long (maximum 255 characters).'));
@@ -156,7 +161,11 @@ class NewgroupAction extends Action
         }
 
         if (count($aliases) > common_config('group', 'maxaliases')) {
-            $this->showForm(sprintf(_('Too many aliases! Maximum %d.'),
+            // TRANS: Client error shown when providing too many aliases during group creation.
+            // TRANS: %d is the maximum number of allowed aliases.
+            $this->showForm(sprintf(_m('Too many aliases! Maximum %d allowed.',
+                                       'Too many aliases! Maximum %d allowed.',
+                                       common_config('group', 'maxaliases')),
                                     common_config('group', 'maxaliases')));
             return;
         }