]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix gettext domain for messages in plugins "_()" to "_m()".
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Wed, 30 Mar 2011 20:30:23 +0000 (22:30 +0200)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Wed, 30 Mar 2011 20:31:23 +0000 (22:31 +0200)
Some other i18n and L10n updates, too.

i18n/L10n review not complete.

67 files changed:
plugins/BitlyUrl/bitlyadminpanelaction.php
plugins/BlogspamNet/BlogspamNetPlugin.php
plugins/Bookmark/Bookmark.php
plugins/Bookmark/BookmarkPlugin.php
plugins/Bookmark/bookmarkform.php
plugins/Bookmark/bookmarkpopup.php
plugins/Bookmark/deliciousbackupimporter.php
plugins/Bookmark/importbookmarks.php
plugins/Bookmark/importdelicious.php
plugins/Bookmark/newbookmark.php
plugins/Bookmark/noticebyurl.php
plugins/Bookmark/showbookmark.php
plugins/Directory/DirectoryPlugin.php
plugins/Directory/actions/userdirectory.php
plugins/EmailSummary/EmailSummaryPlugin.php
plugins/EmailSummary/useremailsummaryhandler.php
plugins/Event/EventPlugin.php
plugins/Event/Happening.php
plugins/Event/RSVP.php
plugins/Event/cancelrsvp.php
plugins/Event/cancelrsvpform.php
plugins/Event/eventform.php
plugins/Event/newevent.php
plugins/Event/newrsvp.php
plugins/Event/rsvpform.php
plugins/Event/showrsvp.php
plugins/ExtendedProfile/lib/extendedprofilewidget.php
plugins/FacebookBridge/actions/facebooksettings.php
plugins/FollowEveryone/FollowEveryonePlugin.php
plugins/GroupPrivateMessage/GroupPrivateMessagePlugin.php
plugins/GroupPrivateMessage/Group_message.php
plugins/GroupPrivateMessage/Group_message_profile.php
plugins/GroupPrivateMessage/Group_privacy_settings.php
plugins/GroupPrivateMessage/groupinbox.php
plugins/GroupPrivateMessage/groupmessagecommand.php
plugins/GroupPrivateMessage/groupmessageform.php
plugins/GroupPrivateMessage/newgroupmessage.php
plugins/GroupPrivateMessage/showgroupmessage.php
plugins/Irc/IrcPlugin.php
plugins/Irc/ircmanager.php
plugins/LdapCommon/LdapCommon.php
plugins/LinkPreview/oembedproxyaction.php
plugins/Linkback/LinkbackPlugin.php
plugins/ModPlus/remoteprofileaction.php
plugins/Mollom/MollomPlugin.php
plugins/OStatus/actions/usersalmon.php
plugins/OpenID/finishopenidlogin.php
plugins/OpenID/openidadminpanel.php
plugins/Poll/PollPlugin.php
plugins/RSSCloud/LoggingAggregator.php
plugins/Recaptcha/RecaptchaPlugin.php
plugins/RequireValidatedEmail/confirmfirstemail.php
plugins/SearchSub/searchsubaction.php
plugins/SearchSub/searchsubform.php
plugins/SearchSub/searchunsubform.php
plugins/SubMirror/actions/mirrorsettings.php
plugins/SubscriptionThrottle/SubscriptionThrottlePlugin.php
plugins/TagSub/tagsubaction.php
plugins/TagSub/tagsubform.php
plugins/TagSub/tagsubsaction.php
plugins/TagSub/tagunsubform.php
plugins/Template/TemplatePlugin.php
plugins/TwitterBridge/twitterauthorization.php
plugins/UserFlag/adminprofileflag.php
plugins/UserLimit/UserLimitPlugin.php
plugins/WikiHashtags/WikiHashtagsPlugin.php
plugins/Xmpp/XmppPlugin.php

index 05b8e8326748540758e52f7fb4da076b34baad74..70cb664b846c96aac7612d7d98d0245099dfd699 100644 (file)
@@ -233,6 +233,10 @@ class BitlyAdminPanelForm extends AdminForm
 
     function formActions()
     {
-        $this->out->submit('submit', _('Save'), 'submit', null, _m('Save bit.ly settings'));
+        $this->out->submit('submit',
+                           _m('BUTTON','Save'),
+                           'submit',
+                           null,
+                           _m('Save bit.ly settings'));
     }
 }
index 51a86b4f36a6e3a92c497560ce6a74e353dcdb07..06198e6c54846deb937897bdc65a136c1e58b009 100644 (file)
@@ -82,13 +82,13 @@ class BlogspamNetPlugin extends Plugin
         } else {
             common_debug("Blogspamnet results = " . $response);
             if (preg_match('/^ERROR(:(.*))?$/', $response, $match)) {
-                throw new ServerException(sprintf(_("Error from %s: %s"), $this->baseUrl, $match[2]), 500);
+                throw new ServerException(sprintf(_m("Error from %1$s: %2$s"), $this->baseUrl, $match[2]), 500);
             } else if (preg_match('/^SPAM(:(.*))?$/', $response, $match)) {
-                throw new ClientException(sprintf(_("Spam checker results: %s"), $match[2]), 400);
+                throw new ClientException(sprintf(_m("Spam checker results: %s"), $match[2]), 400);
             } else if (preg_match('/^OK$/', $response)) {
                 // don't do anything
             } else {
-                throw new ServerException(sprintf(_("Unexpected response from %s: %s"), $this->baseUrl, $response), 500);
+                throw new ServerException(sprintf(_m("Unexpected response from %1$s: %2$s"), $this->baseUrl, $response), 500);
             }
         }
         return true;
index 04cd8dbfa866ea1fa6056176084b4f82afba6fd4..9ae4f7cfc69ffcd5ddf0dc1dcad471220921a39e 100644 (file)
@@ -199,7 +199,7 @@ class Bookmark extends Memcached_DataObject
         $nb = self::getByURL($profile, $url);
 
         if (!empty($nb)) {
-            throw new ClientException(_('Bookmark already exists.'));
+            throw new ClientException(_m('Bookmark already exists.'));
         }
 
         if (empty($options)) {
@@ -209,7 +209,7 @@ class Bookmark extends Memcached_DataObject
         if (array_key_exists('uri', $options)) {
             $other = Bookmark::staticGet('uri', $options['uri']);
             if (!empty($other)) {
-                throw new ClientException(_('Bookmark already exists.'));
+                throw new ClientException(_m('Bookmark already exists.'));
             }
         }
 
@@ -288,16 +288,19 @@ class Bookmark extends Memcached_DataObject
             $shortUrl = $url;
         }
 
-        $content = sprintf(_('"%s" %s %s %s'),
+        // @todo FIXME: i18n documentation.
+        // TRANS: %1$s is a title, %2$s is a short URL, %3$s is a description,
+       // TRANS: %4$s is space separated list of hash tags.
+        $content = sprintf(_m('"%1$s" %2$s %3$s %4$s'),
                            $title,
                            $shortUrl,
                            $description,
                            implode(' ', $hashtags));
 
-        $rendered = sprintf(_('<span class="xfolkentry">'.
-                              '<a class="taggedlink" href="%s">%s</a> '.
-                              '<span class="description">%s</span> '.
-                              '<span class="meta">%s</span>'.
+        $rendered = sprintf(_m('<span class="xfolkentry">'.
+                              '<a class="taggedlink" href="%1$s">%2$s</a> '.
+                              '<span class="description">%3$s</span> '.
+                              '<span class="meta">%4$s</span>'.
                               '</span>'),
                             htmlspecialchars($url),
                             htmlspecialchars($title),
index 4c13ec79cb3f335542d81968dc743010c67081ad..a24f2077207c293781aa96845fe8b2df1a5428c9 100644 (file)
@@ -274,7 +274,7 @@ class BookmarkPlugin extends MicroAppPlugin
             $action->elementStart('li');
             $action->element('a',
                              array('href' => common_local_url('importdelicious')),
-                             _('Import del.icio.us bookmarks'));
+                             _m('Import del.icio.us bookmarks'));
             $action->elementEnd('li');
         }
 
@@ -379,7 +379,7 @@ class BookmarkPlugin extends MicroAppPlugin
         $relLinkEls = ActivityUtils::getLinks($bookmark->element, 'related');
 
         if (count($relLinkEls) < 1) {
-            throw new ClientException(_('Expected exactly 1 link '.
+            throw new ClientException(_m('Expected exactly 1 link '.
                                         'rel=related in a Bookmark.'));
         }
 
@@ -472,7 +472,7 @@ class BookmarkPlugin extends MicroAppPlugin
         $attachments = $notice->attachments();
 
         if (count($attachments) != 1) {
-            throw new ServerException(_('Bookmark notice with the '.
+            throw new ServerException(_m('Bookmark notice with the '.
                                         'wrong number of attachments.'));
         }
 
index d8cf1f7f5b64537aa168cdfed64c05b1f082a7ac..074571e162654cc886919674b9b394c999d943f4 100644 (file)
@@ -121,30 +121,30 @@ class BookmarkForm extends Form
 
         $this->li();
         $this->out->input('title',
-                          _('Title'),
+                          _m('LABEL','Title'),
                           $this->_title,
-                          _('Title of the bookmark'));
+                          _m('Title of the bookmark'));
         $this->unli();
 
         $this->li();
         $this->out->input('url',
-                          _('URL'),
+                          _m('LABEL','URL'),
                           $this->_url,   
-                          _('URL to bookmark'));
+                          _m('URL to bookmark'));
         $this->unli();
 
         $this->li();
         $this->out->input('tags',
-                          _('Tags'),
+                          _m('LABEL','Tags'),
                           $this->_tags,   
-                          _('Comma- or space-separated list of tags'));
+                          _m('Comma- or space-separated list of tags'));
         $this->unli();
 
         $this->li();
         $this->out->input('description',
-                          _('Description'),
+                          _m('LABEL','Description'),
                           $this->_description,   
-                          _('Description of the URL'));
+                          _m('Description of the URL'));
         $this->unli();
 
         $this->out->elementEnd('ul');
index 33f983a93a38578afcd14d3d66aa961a9dc7f1a9..f254557b815dd80869b8bb652a887a915a082527 100644 (file)
@@ -55,7 +55,7 @@ class BookmarkpopupAction extends NewbookmarkAction
         // TRANS: Title for mini-posting window loaded from bookmarklet.
         // TRANS: %s is the StatusNet site name.
         $this->element('title', 
-                       null, sprintf(_('Bookmark on %s'), 
+                       null, sprintf(_m('Bookmark on %s'), 
                                      common_config('site', 'name')));
     }
 
index 197c7a143bc18af208782ca91c5e82af87858e7a..a8d2819fe7c0f04bff88c0b93d242f7cf93b6ee0 100644 (file)
@@ -82,7 +82,7 @@ class DeliciousBackupImporter extends QueueHandler
         $dls = $doc->getElementsByTagName('dl');
 
         if ($dls->length != 1) {
-            throw new ClientException(_("Bad import file."));
+            throw new ClientException(_m("Bad import file."));
         }
 
         $dl = $dls->item(0);
@@ -165,7 +165,7 @@ class DeliciousBackupImporter extends QueueHandler
         $as = $dt->getElementsByTagName('a');
 
         if ($as->length == 0) {
-            throw new ClientException(_("No <A> tag in a <DT>."));
+            throw new ClientException(_m("No <A> tag in a <DT>."));
         }
 
         $a = $as->item(0);
@@ -173,7 +173,7 @@ class DeliciousBackupImporter extends QueueHandler
         $private = $a->getAttribute('private');
 
         if ($private != 0) {
-            throw new ClientException(_('Skipping private bookmark.'));
+            throw new ClientException(_m('Skipping private bookmark.'));
         }
 
         if (!empty($dd)) {
index 5518b00e9748a6f6e2bd9d41368d0e327223df4c..e16cf9d6333846ac25022e9c5bfdf1b9451cf00f 100644 (file)
@@ -75,7 +75,7 @@ function getBookmarksFile()
     }
 
     // TRANS: %s is the filename that contains a backup for a user.
-    printfv(_("Getting backup from file '%s'.")."\n", $filename);
+    printfv(_m("Getting backup from file \"%s\".")."\n", $filename);
 
     $html = file_get_contents($filename);
 
index b98b215717c1b286685af92baab4908c84f0644d..0d206e456da7123439706fe79a6fcf188e826fcb 100644 (file)
@@ -58,7 +58,7 @@ class ImportdeliciousAction extends Action
 
     function title()
     {
-        return _("Import del.icio.us bookmarks");
+        return _m("Import del.icio.us bookmarks");
     }
 
     /**
@@ -76,13 +76,13 @@ class ImportdeliciousAction extends Action
         $cur = common_current_user();
 
         if (empty($cur)) {
-            throw new ClientException(_('Only logged-in users can '.
+            throw new ClientException(_m('Only logged-in users can '.
                                         'import del.icio.us backups.'),
                                       403);
         }
 
         if (!$cur->hasRight(BookmarkPlugin::IMPORTDELICIOUS)) {
-            throw new ClientException(_('You may not restore your account.'), 403);
+            throw new ClientException(_m('You may not restore your account.'), 403);
         }
 
         return true;
@@ -121,7 +121,7 @@ class ImportdeliciousAction extends Action
         $this->checkSessionToken();
 
         if (!isset($_FILES[ImportDeliciousForm::FILEINPUT]['error'])) {
-            throw new ClientException(_('No uploaded file.'));
+            throw new ClientException(_m('No uploaded file.'));
         }
 
         switch ($_FILES[ImportDeliciousForm::FILEINPUT]['error']) {
@@ -129,42 +129,42 @@ class ImportdeliciousAction extends Action
             break;
         case UPLOAD_ERR_INI_SIZE:
             // TRANS: Client exception thrown when an uploaded file is too large.
-            throw new ClientException(_('The uploaded file exceeds the ' .
+            throw new ClientException(_m('The uploaded file exceeds the ' .
                 'upload_max_filesize directive in php.ini.'));
             return;
         case UPLOAD_ERR_FORM_SIZE:
             throw new ClientException(
                 // TRANS: Client exception.
-                _('The uploaded file exceeds the MAX_FILE_SIZE directive' .
+                _m('The uploaded file exceeds the MAX_FILE_SIZE directive' .
                 ' that was specified in the HTML form.'));
             return;
         case UPLOAD_ERR_PARTIAL:
             @unlink($_FILES[ImportDeliciousForm::FILEINPUT]['tmp_name']);
             // TRANS: Client exception.
-            throw new ClientException(_('The uploaded file was only' .
+            throw new ClientException(_m('The uploaded file was only' .
                 ' partially uploaded.'));
             return;
         case UPLOAD_ERR_NO_FILE:
             // No file; probably just a non-AJAX submission.
-            throw new ClientException(_('No uploaded file.'));
+            throw new ClientException(_m('No uploaded file.'));
             return;
         case UPLOAD_ERR_NO_TMP_DIR:
             // TRANS: Client exception thrown when a temporary folder is not present
-            throw new ClientException(_('Missing a temporary folder.'));
+            throw new ClientException(_m('Missing a temporary folder.'));
             return;
         case UPLOAD_ERR_CANT_WRITE:
             // TRANS: Client exception thrown when writing to disk is not possible
-            throw new ClientException(_('Failed to write file to disk.'));
+            throw new ClientException(_m('Failed to write file to disk.'));
             return;
         case UPLOAD_ERR_EXTENSION:
             // TRANS: Client exception thrown when a file upload has been stopped
-            throw new ClientException(_('File upload stopped by extension.'));
+            throw new ClientException(_m('File upload stopped by extension.'));
             return;
         default:
             common_log(LOG_ERR, __METHOD__ . ": Unknown upload error " .
                 $_FILES[ImportDeliciousForm::FILEINPUT]['error']);
             // TRANS: Client exception thrown when a file upload operation has failed
-            throw new ClientException(_('System error uploading file.'));
+            throw new ClientException(_m('System error uploading file.'));
             return;
         }
 
@@ -183,7 +183,7 @@ class ImportdeliciousAction extends Action
                 throw new ServerException("File '$filename' not readable.");
             }
         
-            common_debug(sprintf(_("Getting backup from file '%s'."), $filename));
+            common_debug(sprintf(_m("Getting backup from file '%s'."), $filename));
 
             $html = file_get_contents($filename);
 
@@ -219,10 +219,10 @@ class ImportdeliciousAction extends Action
     {
         if ($this->success) {
             $this->element('p', null,
-                           _('Bookmarks have been imported. Your bookmarks should now appear in search and your profile page.'));
+                           _m('Bookmarks have been imported. Your bookmarks should now appear in search and your profile page.'));
         } else if ($this->inprogress) {
             $this->element('p', null,
-                           _('Bookmarks are being imported. Please wait a few minutes for results.'));
+                           _m('Bookmarks are being imported. Please wait a few minutes for results.'));
         } else {
             $form = new ImportDeliciousForm($this);
             $form->show();
@@ -310,7 +310,7 @@ class ImportDeliciousForm extends Form
     {
         $this->out->elementStart('p', 'instructions');
 
-        $this->out->raw(_('You can upload a backed-up '.
+        $this->out->raw(_m('You can upload a backed-up '.
                           'delicious.com bookmarks file.'));
         
         $this->out->elementEnd('p');
@@ -340,6 +340,6 @@ class ImportDeliciousForm extends Form
                            _m('BUTTON', 'Upload'),
                            'submit',
                            null,
-                           _('Upload the file'));
+                           _m('Upload the file'));
     }
 }
index ebfdb6cb95c1818209a1574eb477fb3328c8cc2a..79266e52b2d2ed3e44320704f512c742331e9fab 100644 (file)
@@ -62,7 +62,7 @@ class NewbookmarkAction extends Action
 
     function title()
     {
-        return _('New bookmark');
+        return _m('New bookmark');
     }
 
     /**
@@ -80,7 +80,7 @@ class NewbookmarkAction extends Action
         $this->user = common_current_user();
 
         if (empty($this->user)) {
-            throw new ClientException(_("Must be logged in to post a bookmark."),
+            throw new ClientException(_m("Must be logged in to post a bookmark."),
                                       403);
         }
 
@@ -130,11 +130,11 @@ class NewbookmarkAction extends Action
         }
         try {
             if (empty($this->title)) {
-                throw new ClientException(_('Bookmark must have a title.'));
+                throw new ClientException(_m('Bookmark must have a title.'));
             }
 
             if (empty($this->url)) {
-                throw new ClientException(_('Bookmark must have an URL.'));
+                throw new ClientException(_m('Bookmark must have an URL.'));
             }
 
 
@@ -156,7 +156,7 @@ class NewbookmarkAction extends Action
             $this->elementStart('html');
             $this->elementStart('head');
             // TRANS: Page title after sending a notice.
-            $this->element('title', null, _('Notice posted'));
+            $this->element('title', null, _m('Notice posted'));
             $this->elementEnd('head');
             $this->elementStart('body');
             $this->showNotice($saved);
index 226c7a32bf0ff7d25cd038d174736f2a4bd6d189..b8bea78051eb3a6c683a3f0e8ed563906df7895f 100644 (file)
@@ -67,7 +67,7 @@ class NoticebyurlAction extends Action
         $this->file = File::staticGet('id', $this->trimmed('id'));
 
         if (empty($this->file)) {
-            throw new ClientException(_('Unknown URL'));
+            throw new ClientException(_m('Unknown URL'));
         }
 
         $pageArg = $this->trimmed('page');
@@ -89,9 +89,9 @@ class NoticebyurlAction extends Action
     function title()
     {
         if ($this->page == 1) {
-            return sprintf(_("Notices linking to %s"), $this->file->url);
+            return sprintf(_m("Notices linking to %s"), $this->file->url);
         } else {
-            return sprintf(_("Notices linking to %s, page %d"),
+            return sprintf(_m("Notices linking to %1$s, page %2$d"),
                            $this->file->url,
                            $this->page);
         }
index 40005c087f4edaa52f9da8f9216e81373bd2b821..6b9bf9bc2553a042415306618a86cf36a22fa064 100644 (file)
@@ -82,7 +82,7 @@ class ShowbookmarkAction extends ShownoticeAction
     {
         // TRANS: Title for bookmark.
         // TRANS: %1$s is a user nickname, %2$s is a bookmark title.
-        return sprintf(_('%1$s\'s bookmark for "%2$s"'),
+        return sprintf(_m('%1$s\'s bookmark for "%2$s"'),
                        $this->user->nickname,
                        $this->bookmark->title);
     }
index 541ec556bf0c791e59c55a7fa7e4b610b18ca8dc..cba75802e5f3ad235af2488c5302af8dfd6b7c9a 100644 (file)
@@ -165,8 +165,8 @@ class DirectoryPlugin extends Plugin
 
         $nav->out->menuItem(
             common_local_url('userdirectory'),
-            _('Directory'),
-            _('User Directory'),
+            _m('Directory'),
+            _m('User Directory'),
             $actionName == 'userdirectory',
             'nav_directory'
         );
index 85835e2c1f85b3e70bddfe6f54c9f06e2ed62736..6532f03c02d7637bca0e50aee0363d9829cd2150 100644 (file)
@@ -116,7 +116,7 @@ class UserdirectoryAction extends Action
     function getInstructions()
     {
         // TRANS: %%site.name%% is the name of the StatusNet site.
-        return _(
+        return _m(
             'Search for people on %%site.name%% by their name, '
             . 'location, or interests. Separate the terms by spaces; '
             . ' they must be 3 characters or more.'
@@ -256,11 +256,11 @@ class UserdirectoryAction extends Action
 
         $this->elementStart('fieldset');
 
-        $this->element('legend', null, _('Search site'));
+        $this->element('legend', null, _m('Search site'));
         $this->elementStart('ul', 'form_data');
         $this->elementStart('li');
 
-        $this->input('q', _('Keyword(s)'), $this->q);
+        $this->input('q', _m('Keyword(s)'), $this->q);
 
         $this->submit('search', _m('BUTTON','Search'));
         $this->elementEnd('li');
@@ -372,7 +372,7 @@ class UserdirectoryAction extends Action
                 )
             );
         } else {
-            $this->element('p', 'error', _('No results.'));
+            $this->element('p', 'error', _m('No results.'));
             $message = _m(<<<E_O_T
 * Make sure all words are spelled correctly.
 * Try different keywords.
index c37e4864d1370c4589aa25017b04ab0cf0898e48..66c1214106550e9d5d430a327c4c192ab8093223 100644 (file)
@@ -151,7 +151,7 @@ class EmailSummaryPlugin extends Plugin
         $action->elementStart('li');
         $action->checkbox('emailsummary',
                           // TRANS: Checkbox label in e-mail preferences form.
-                          _('Send me a periodic summary of updates from my network.'),
+                          _m('Send me a periodic summary of updates from my network.'),
                           Email_summary_status::getSendSummary($user->id));
         $action->elementEnd('li');
         return true;
index 8ba8a7a20b4b962b8ee1b80e80982a3dc44c7de6..5e10af40eb1f48d42bad570fc545980d5b825300 100644 (file)
@@ -128,7 +128,7 @@ class UserEmailSummaryHandler extends QueueHandler
                                         'style' => 'background-color: #ffffff; border: 4px solid #4c609a; padding: 10px;'));
 
         $out->elementStart('div', array('style' => 'color: #ffffff; background-color: #4c609a; font-weight: bold; margin-bottom: 10px; padding: 4px;'));
-       $out->raw(sprintf(_('Recent updates from %1s for %2s:'),
+       $out->raw(sprintf(_m('Recent updates from %1s for %2s:'),
                           common_config('site', 'name'),
                           $profile->getBestName()));
         $out->elementEnd('div');
@@ -184,7 +184,7 @@ class UserEmailSummaryHandler extends QueueHandler
                     $out->text(' ');
                     $out->element('a',
                                   array('href' => $convurl.'#notice-'.$notice->id),
-                                  _('in context'));
+                                  _m('in context'));
                 }
             }
             $out->elementEnd('div');
@@ -194,7 +194,7 @@ class UserEmailSummaryHandler extends QueueHandler
        
         $out->elementEnd('table');
 
-        $out->raw(sprintf(_('<p><a href="%1s">change your email settings for %2s</a></p>'),
+        $out->raw(sprintf(_m('<p><a href="%1s">change your email settings for %2s</a></p>'),
                           common_local_url('emailsettings'),
                           common_config('site', 'name')));
 
@@ -204,7 +204,7 @@ class UserEmailSummaryHandler extends QueueHandler
        
         // FIXME: do something for people who don't like HTML email
        
-        mail_to_user($user, _('Updates from your network'), $body,
+        mail_to_user($user, _m('Updates from your network'), $body,
                      array('Content-Type' => 'text/html; charset=UTF-8'));
 
         if (empty($ess)) {
index 1ee6ef4309a1033ba46e8a537e7859a7063e4c9b..d1dda6336de09bac7a463a8f8384982e251a9108 100644 (file)
@@ -365,7 +365,7 @@ class EventPlugin extends MicroappPlugin
 
         $out->elementStart('div', 'event-times'); // VEVENT/EVENT-TIMES IN
 
-        $out->element('strong', null, _('Time:'));
+        $out->element('strong', null, _m('Time:'));
 
         $out->element('abbr', array('class' => 'dtstart',
                                     'title' => common_date_iso8601($event->start_time)),
@@ -385,14 +385,14 @@ class EventPlugin extends MicroappPlugin
 
         if (!empty($event->location)) {
             $out->elementStart('div', 'event-location');
-            $out->element('strong', null, _('Location: '));
+            $out->element('strong', null, _m('Location:'));
             $out->element('span', 'location', $event->location);
             $out->elementEnd('div');
         }
 
         if (!empty($event->description)) {
             $out->elementStart('div', 'event-description');
-            $out->element('strong', null, _('Description: '));
+            $out->element('strong', null, _m('Description:'));
             $out->element('span', 'description', $event->description);
             $out->elementEnd('div');
         }
@@ -400,9 +400,11 @@ class EventPlugin extends MicroappPlugin
         $rsvps = $event->getRSVPs();
 
         $out->elementStart('div', 'event-rsvps');
-        $out->element('strong', null, _('Attending: '));
+        $out->element('strong', null, _m('Attending:'));
         $out->element('span', 'event-rsvps',
-                      sprintf(_('Yes: %d No: %d Maybe: %d'),
+                      // TRANS: RSVP counts.
+                     // TRANS: %1$d, %2$d and %3$d are numbers of RSVPs.
+                      sprintf(_m('Yes: %1$d No: %2$d Maybe: %3$d'),
                               count($rsvps[RSVP::POSITIVE]),
                               count($rsvps[RSVP::NEGATIVE]),
                               count($rsvps[RSVP::POSSIBLE])));
index 45398dfcf2b458c3698d5466bede3204ff3c1078..bbea213a1abb4c431c6657bc1524b2a347e70972 100644 (file)
@@ -122,7 +122,7 @@ class Happening extends Managed_DataObject
         if (array_key_exists('uri', $options)) {
             $other = Happening::staticGet('uri', $options['uri']);
             if (!empty($other)) {
-                throw new ClientException(_('Event already exists.'));
+                throw new ClientException(_m('Event already exists.'));
             }
         }
 
@@ -154,19 +154,21 @@ class Happening extends Managed_DataObject
 
         // XXX: does this get truncated?
 
-        $content = sprintf(_('"%s" %s - %s (%s): %s'),
+        // TRANS: Event description. %1$s is a title, %2$s is start time, %3$s is end time,
+       // TRANS: %4$s is location, %5$s is a description.
+        $content = sprintf(_m('"%1$s" %2$s - %3$s (%4$s): %5$s'),
                            $title,
                            common_exact_date($ev->start_time),
                            common_exact_date($ev->end_time),
                            $location,
                            $description);
 
-        $rendered = sprintf(_('<span class="vevent">'.
-                              '<span class="summary">%s</span> '.
-                              '<abbr class="dtstart" title="%s">%s</a> - '.
-                              '<abbr class="dtend" title="%s">%s</a> '.
-                              '(<span class="location">%s</span>): '.
-                              '<span class="description">%s</span> '.
+        $rendered = sprintf(_m('<span class="vevent">'.
+                              '<span class="summary">%1$s</span> '.
+                              '<abbr class="dtstart" title="%2$s">%3$s</a> - '.
+                              '<abbr class="dtend" title="%4$s">%5$s</a> '.
+                              '(<span class="location">%6$s</span>): '.
+                              '<span class="description">%7$s</span> '.
                               '</span>'),
                             htmlspecialchars($title),
                             htmlspecialchars(common_date_iso8601($ev->start_time)),
index beb377c5bc74ef0022f29a2bfd848e510e56a434..108fd5f4db18e8ef043a1bb51e031ba1ee21d423 100644 (file)
@@ -143,7 +143,7 @@ class RSVP extends Managed_DataObject
         if (array_key_exists('uri', $options)) {
             $other = RSVP::staticGet('uri', $options['uri']);
             if (!empty($other)) {
-                throw new ClientException(_('RSVP already exists.'));
+                throw new ClientException(_m('RSVP already exists.'));
             }
         }
 
@@ -151,7 +151,7 @@ class RSVP extends Managed_DataObject
                                      'event_id' => $event->id));
 
         if (!empty($other)) {
-            throw new ClientException(_('RSVP already exists.'));
+            throw new ClientException(_m('RSVP already exists.'));
         }
 
         $rsvp = new RSVP();
@@ -316,13 +316,13 @@ class RSVP extends Managed_DataObject
 
         switch ($response) {
         case 'Y':
-            $fmt = _("<span class='automatic event-rsvp'><a href='%1s'>%2s</a> is attending <a href='%3s'>%4s</a>.</span>");
+            $fmt = _m("<span class='automatic event-rsvp'><a href='%1s'>%2s</a> is attending <a href='%3s'>%4s</a>.</span>");
             break;
         case 'N':
-            $fmt = _("<span class='automatic event-rsvp'><a href='%1s'>%2s</a> is not attending <a href='%3s'>%4s</a>.</span>");
+            $fmt = _m("<span class='automatic event-rsvp'><a href='%1s'>%2s</a> is not attending <a href='%3s'>%4s</a>.</span>");
             break;
         case '?':
-            $fmt = _("<span class='automatic event-rsvp'><a href='%1s'>%2s</a> might attend <a href='%3s'>%4s</a>.</span>");
+            $fmt = _m("<span class='automatic event-rsvp'><a href='%1s'>%2s</a> might attend <a href='%3s'>%4s</a>.</span>");
             break;
         default:
             throw new Exception("Unknown response code {$response}");
@@ -331,7 +331,7 @@ class RSVP extends Managed_DataObject
 
         if (empty($event)) {
             $eventUrl = '#';
-            $eventTitle = _('an unknown event');
+            $eventTitle = _m('an unknown event');
         } else {
             $notice = $event->getNotice();
             $eventUrl = $notice->bestUrl();
@@ -351,13 +351,13 @@ class RSVP extends Managed_DataObject
 
         switch ($response) {
         case 'Y':
-            $fmt = _("%1s is attending %2s.");
+            $fmt = _m("%1s is attending %2s.");
             break;
         case 'N':
-            $fmt = _("%1s is not attending %2s.");
+            $fmt = _m("%1s is not attending %2s.");
             break;
         case '?':
-            $fmt = _("%1s might attend %2s.>");
+            $fmt = _m("%1s might attend %2s.>");
             break;
         default:
             throw new Exception("Unknown response code {$response}");
@@ -365,7 +365,7 @@ class RSVP extends Managed_DataObject
         }
 
         if (empty($event)) {
-            $eventTitle = _('an unknown event');
+            $eventTitle = _m('an unknown event');
         } else {
             $notice = $event->getNotice();
             $eventTitle = $event->title;
index 83dabe2de5e084bba93b2d41af404526daf81482..94f78bfca6563aec51d1a8deac0eb6ba3f40f158 100644 (file)
@@ -58,7 +58,7 @@ class CancelrsvpAction extends Action
 
     function title()
     {
-        return _('Cancel RSVP');
+        return _m('Cancel RSVP');
     }
 
     /**
@@ -79,25 +79,25 @@ class CancelrsvpAction extends Action
         $rsvpId = $this->trimmed('rsvp');
 
         if (empty($rsvpId)) {
-            throw new ClientException(_('No such rsvp.'));
+            throw new ClientException(_m('No such RSVP.'));
         }
 
         $this->rsvp = RSVP::staticGet('id', $rsvpId);
 
         if (empty($this->rsvp)) {
-            throw new ClientException(_('No such rsvp.'));
+            throw new ClientException(_m('No such RSVP.'));
         }
 
         $this->event = Happening::staticGet('id', $this->rsvp->event_id);
 
         if (empty($this->event)) {
-            throw new ClientException(_('No such event.'));
+            throw new ClientException(_m('No such event.'));
         }
 
         $this->user = common_current_user();
 
         if (empty($this->user)) {
-            throw new ClientException(_('You must be logged in to RSVP for an event.'));
+            throw new ClientException(_m('You must be logged in to RSVP for an event.'));
         }
 
         return true;
@@ -154,7 +154,7 @@ class CancelrsvpAction extends Action
             $this->elementStart('html');
             $this->elementStart('head');
             // TRANS: Page title after sending a notice.
-            $this->element('title', null, _('Event saved'));
+            $this->element('title', null, _m('Event saved'));
             $this->elementEnd('head');
             $this->elementStart('body');
             $this->elementStart('body');
index 955a782e62b8c0f29ad6932fda64625d7c87f206..14161d1897fc9ec957c0cf06681d050cd28d7a00 100644 (file)
@@ -102,13 +102,13 @@ class CancelRSVPForm extends Form
 
         switch (RSVP::verbFor($this->rsvp->response)) {
         case RSVP::POSITIVE:
-            $this->out->text(_('You will attend this event.'));
+            $this->out->text(_m('You will attend this event.'));
             break;
         case RSVP::NEGATIVE:
-            $this->out->text(_('You will not attend this event.'));
+            $this->out->text(_m('You will not attend this event.'));
             break;
         case RSVP::POSSIBLE:
-            $this->out->text(_('You might attend this event.'));
+            $this->out->text(_m('You might attend this event.'));
             break;
         }
 
index e6bc1e7016ae9da560c91b7da278003d3dabe891..327c8a31e607f3acc871c949bb9cb7a3de1c77b6 100644 (file)
@@ -93,58 +93,58 @@ class EventForm extends Form
 
         $this->li();
         $this->out->input('title',
-                          _('Title'),
+                          _m('LABEL','Title'),
                           null,
-                          _('Title of the event'));
+                          _m('Title of the event'));
         $this->unli();
 
         $this->li();
         $this->out->input('startdate',
-                          _('Start date'),
+                          _m('LABEL','Start date'),
                           null,
-                          _('Date the event starts'));
+                          _m('Date the event starts'));
         $this->unli();
 
         $this->li();
         $this->out->input('starttime',
-                          _('Start time'),
+                          _m('LABEL','Start time'),
                           null,
-                          _('Time the event starts'));
+                          _m('Time the event starts'));
         $this->unli();
 
         $this->li();
         $this->out->input('enddate',
-                          _('End date'),
+                          _m('LABEL','End date'),
                           null,   
-                          _('Date the event ends'));
+                          _m('Date the event ends'));
         $this->unli();
 
         $this->li();
         $this->out->input('endtime',
-                          _('End time'),
+                          _m('LABEL','End time'),
                           null,
-                          _('Time the event ends'));
+                          _m('Time the event ends'));
         $this->unli();
 
         $this->li();
         $this->out->input('location',
-                          _('Location'),
+                          _m('LABEL','Location'),
                           null,
-                          _('Event location'));
+                          _m('Event location'));
         $this->unli();
 
         $this->li();
         $this->out->input('url',
-                          _('URL'),
+                          _m('LABEL','URL'),
                           null,
-                          _('URL for more information'));
+                          _m('URL for more information'));
         $this->unli();
 
         $this->li();
         $this->out->input('description',
-                          _('Description'),
+                          _m('LABEL','Description'),
                           null,
-                          _('Description of the event'));
+                          _m('Description of the event'));
         $this->unli();
 
         $this->out->elementEnd('ul');
index 5551e0ce2c71380d003dc63044b3a1d9707d2577..7fe80f0857bd5344dbdf52e3fde13993c3a5a6ca 100644 (file)
@@ -63,7 +63,7 @@ class NeweventAction extends Action
 
     function title()
     {
-        return _('New event');
+        return _m('New event');
     }
 
     /**
@@ -81,7 +81,7 @@ class NeweventAction extends Action
         $this->user = common_current_user();
 
         if (empty($this->user)) {
-            throw new ClientException(_("Must be logged in to post a event."),
+            throw new ClientException(_m("Must be logged in to post a event."),
                                       403);
         }
 
@@ -92,7 +92,7 @@ class NeweventAction extends Action
         $this->title       = $this->trimmed('title');
 
         if (empty($this->title)) {
-            throw new ClientException(_('Title required.'));
+            throw new ClientException(_m('Title required.'));
         }
 
         $this->location    = $this->trimmed('location');
@@ -102,7 +102,7 @@ class NeweventAction extends Action
         $startDate = $this->trimmed('startdate');
 
         if (empty($startDate)) {
-            throw new ClientException(_('Start date required.'));
+            throw new ClientException(_m('Start date required.'));
         }
 
         $startTime = $this->trimmed('starttime');
@@ -114,7 +114,7 @@ class NeweventAction extends Action
         $endDate   = $this->trimmed('enddate');
 
         if (empty($endDate)) {
-            throw new ClientException(_('End date required.'));
+            throw new ClientException(_m('End date required.'));
         }
 
         $endTime   = $this->trimmed('endtime');
@@ -135,13 +135,13 @@ class NeweventAction extends Action
         $this->endTime   = strtotime($end);
 
         if ($this->startTime == 0) {
-            throw new Exception(sprintf(_('Could not parse date "%s"'),
+            throw new Exception(sprintf(_m('Could not parse date "%s"'),
                                         $start));
         }
 
 
         if ($this->endTime == 0) {
-            throw new Exception(sprintf(_('Could not parse date "%s"'),
+            throw new Exception(sprintf(_m('Could not parse date "%s"'),
                                         $end));
         }
 
@@ -179,15 +179,15 @@ class NeweventAction extends Action
     {
         try {
             if (empty($this->title)) {
-                throw new ClientException(_('Event must have a title.'));
+                throw new ClientException(_m('Event must have a title.'));
             }
 
             if (empty($this->startTime)) {
-                throw new ClientException(_('Event must have a start time.'));
+                throw new ClientException(_m('Event must have a start time.'));
             }
 
             if (empty($this->endTime)) {
-                throw new ClientException(_('Event must have an end time.'));
+                throw new ClientException(_m('Event must have an end time.'));
             }
 
             $profile = $this->user->getProfile();
@@ -216,7 +216,7 @@ class NeweventAction extends Action
             $this->elementStart('html');
             $this->elementStart('head');
             // TRANS: Page title after sending a notice.
-            $this->element('title', null, _('Event saved'));
+            $this->element('title', null, _m('Event saved'));
             $this->elementEnd('head');
             $this->elementStart('body');
             $this->showNotice($saved);
index 2b28580b1dbc6c18ccf0196908c533cbdde97e86..cb7f72d49c326fd6190860d8d2602c1a95682e52 100644 (file)
@@ -58,7 +58,7 @@ class NewrsvpAction extends Action
 
     function title()
     {
-        return _('New RSVP');
+        return _m('New RSVP');
     }
 
     /**
@@ -79,19 +79,19 @@ class NewrsvpAction extends Action
         $eventId = $this->trimmed('event');
 
         if (empty($eventId)) {
-            throw new ClientException(_('No such event.'));
+            throw new ClientException(_m('No such event.'));
         }
 
         $this->event = Happening::staticGet('id', $eventId);
 
         if (empty($this->event)) {
-            throw new ClientException(_('No such event.'));
+            throw new ClientException(_m('No such event.'));
         }
 
         $this->user = common_current_user();
 
         if (empty($this->user)) {
-            throw new ClientException(_('You must be logged in to RSVP for an event.'));
+            throw new ClientException(_m('You must be logged in to RSVP for an event.'));
         }
 
         common_debug(print_r($this->args, true));
@@ -159,7 +159,7 @@ class NewrsvpAction extends Action
             $this->elementStart('html');
             $this->elementStart('head');
             // TRANS: Page title after sending a notice.
-            $this->element('title', null, _('Event saved'));
+            $this->element('title', null, _m('Event saved'));
             $this->elementEnd('head');
             $this->elementStart('body');
             $this->elementStart('body');
index acc8cd8d12890893213fc3e6432003efe8cb9481..494e64929f7a42a64eb76bde4a60f5089e932dfe 100644 (file)
@@ -98,7 +98,7 @@ class RSVPForm extends Form
     {
         $this->out->elementStart('fieldset', array('id' => 'new_rsvp_data'));
 
-        $this->out->text(_('RSVP: '));
+        $this->out->text(_m('RSVP:'));
 
         $this->out->hidden('event', $this->event->id);
         $this->out->hidden('submitvalue', '');
index 145788feeac90928407a720be4f2159b5335f756..f08857dcc46430d9fd91076fe1035321987c4a83 100644 (file)
@@ -91,7 +91,7 @@ class ShowrsvpAction extends ShownoticeAction
     {
         // TRANS: Title for event.
        // TRANS: %1$s is a user nickname, %2$s is an event title.
-        return sprintf(_('%1$s\'s RSVP for "%2$s"'),
+        return sprintf(_m('%1$s\'s RSVP for "%2$s"'),
                        $this->user->nickname,
                        $this->event->title);
     }
index 53cb5d3b8752cc11535745f392689c4c5b3d273e..24c8b2f3d452974ec8f6eca6429b0ee4f9e5bedf 100644 (file)
@@ -618,7 +618,7 @@ class ExtendedProfileWidget extends Form
             _m('BUTTON','Save'),
             'submit form_action-secondary',
             'save',
-            _('Save details')
+            _m('Save details')
        );
     }
 
index b9526c12693e65ba69022c18aeeaa1a8d5cf4ba9..54e96ee400b10c3378dd2d9e0b1fc02864a9f689 100644 (file)
@@ -111,7 +111,7 @@ class FacebooksettingsAction extends SettingsAction {
      * @return instructions for use
      */
     function getInstructions() {
-        return _('Facebook settings');
+        return _m('Facebook settings');
     }
 
     /*
index 228efc93573a93ba4cd3800ee02845db3a1c0c4d..04ed9321220a2a32b667c23adc686f3615a592ba 100644 (file)
@@ -159,7 +159,7 @@ class FollowEveryonePlugin extends Plugin
 
         $action->elementStart('li');
         // TRANS: Checkbox label in form for profile settings.
-        $action->checkbox('followeveryone', _('Follow everyone'),
+        $action->checkbox('followeveryone', _m('Follow everyone'),
                           ($action->arg('followeveryone')) ?
                           $action->arg('followeveryone') :
                           User_followeveryone_prefs::followEveryone($user->id));
index 42a8a5d57396858fa496b2a4533ab4ed4459afb8..29e57c1aaed2d1a40ca6ffdf5efb0689bed5d7d4 100644 (file)
@@ -255,21 +255,21 @@ class GroupPrivateMessagePlugin extends Plugin
 
         $form->out->elementStart('li');
         $form->out->dropdown('allow_privacy',
-                             _('Private messages'),
-                             array(Group_privacy_settings::SOMETIMES => _('Sometimes'),
-                                   Group_privacy_settings::ALWAYS => _('Always'),
-                                   Group_privacy_settings::NEVER => _('Never')),
-                             _('Whether to allow private messages to this group'),
+                             _m('Private messages'),
+                             array(Group_privacy_settings::SOMETIMES => _m('Sometimes'),
+                                   Group_privacy_settings::ALWAYS => _m('Always'),
+                                   Group_privacy_settings::NEVER => _m('Never')),
+                             _m('Whether to allow private messages to this group'),
                              false,
                              (empty($gps)) ? Group_privacy_settings::SOMETIMES : $gps->allow_privacy);
         $form->out->elementEnd('li');
         $form->out->elementStart('li');
         $form->out->dropdown('allow_sender',
-                             _('Private sender'),
-                             array(Group_privacy_settings::EVERYONE => _('Everyone'),
-                                   Group_privacy_settings::MEMBER => _('Member'),
-                                   Group_privacy_settings::ADMIN => _('Admin')),
-                             _('Who can send private messages to the group'),
+                             _m('Private sender'),
+                             array(Group_privacy_settings::EVERYONE => _m('Everyone'),
+                                   Group_privacy_settings::MEMBER => _m('Member'),
+                                   Group_privacy_settings::ADMIN => _m('Admin')),
+                             _m('Who can send private messages to the group'),
                              false,
                              (empty($gps)) ? Group_privacy_settings::MEMBER : $gps->allow_sender);
         $form->out->elementEnd('li');
@@ -370,8 +370,8 @@ class GroupPrivateMessagePlugin extends Plugin
 
         $action->elementStart('li', 'entity_send-a-message');
         $action->element('a', array('href' => common_local_url('newgroupmessage', array('nickname' => $group->nickname)),
-                                    'title' => _('Send a direct message to this group')),
-                         _('Message'));
+                                    'title' => _m('Send a direct message to this group')),
+                         _m('Message'));
         // $form = new GroupMessageForm($action, $group);
         // $form->hidden = true;
         // $form->show();
@@ -454,7 +454,7 @@ class GroupPrivateMessagePlugin extends Plugin
 
                 // Don't save the notice!
                 // FIXME: this is probably cheating.
-                throw new ClientException(sprintf(_('Forced notice to private group message.')),
+                throw new ClientException(sprintf(_m('Forced notice to private group message.')),
                                           200);
             }
         }
@@ -476,7 +476,7 @@ class GroupPrivateMessagePlugin extends Plugin
         $gps = Group_privacy_settings::forGroup($group);
         
         if ($gps->allow_privacy == Group_privacy_settings::ALWAYS) {
-            $action->element('p', 'privategroupindicator', _('Private'));
+            $action->element('p', 'privategroupindicator', _m('Private'));
         }
 
         return true;
index f8c0c707c3f97e17782df24dc81f0c74e5788a81..9679f570318c5382fcc9f6e082b0fe73af21e3d4 100644 (file)
@@ -123,7 +123,7 @@ class Group_message extends Memcached_DataObject
     {
         if (!$user->hasRight(Right::NEWMESSAGE)) {
             // XXX: maybe break this out into a separate right
-            throw new Exception(sprintf(_('User %s not allowed to send private messages.'),
+            throw new Exception(sprintf(_m('User %s is not allowed to send private messages.'),
                                         $user->nickname));
         }
 
@@ -177,7 +177,7 @@ class Group_message extends Memcached_DataObject
     {
         $group = User_group::staticGet('id', $this->to_group);
         if (empty($group)) {
-            throw new ServerException(_('No group for group message'));
+            throw new ServerException(_m('No group for group message'));
         }
         return $group;
     }
@@ -186,7 +186,7 @@ class Group_message extends Memcached_DataObject
     {
         $sender = Profile::staticGet('id', $this->from_profile);
         if (empty($sender)) {
-            throw new ServerException(_('No sender for group message'));
+            throw new ServerException(_m('No sender for group message'));
         }
         return $sender;
     }
index c5832a92941e253d63a6df45fd9f28912b890321..cdd2839c12c9516ada6ffacaf6e242f503e8bcc5 100644 (file)
@@ -156,27 +156,27 @@ class Group_message_profile extends Memcached_DataObject
 
         // TRANS: Subject for direct-message notification email.
         // TRANS: %s is the sending user's nickname.
-        $subject = sprintf(_('New private message from %s to group %s'), $from_profile->nickname, $group->nickname);
+        $subject = sprintf(_m('New private message from %1$s to group %2$s'), $from_profile->nickname, $group->nickname);
 
         // TRANS: Body for direct-message notification email.
         // TRANS: %1$s is the sending user's long name, %2$s is the sending user's nickname,
         // TRANS: %3$s is the message content, %4$s a URL to the message,
         // TRANS: %5$s is the StatusNet sitename.
-        $body = sprintf(_("%1\$s (%2\$s) sent a private message to group %3\$s:\n\n".
+        $body = sprintf(_m("%1\$s (%2\$s) sent a private message to group %3\$s:\n\n".
                           "------------------------------------------------------\n".
                           "%4\$s\n".
                           "------------------------------------------------------\n\n".
                           "You can reply to their message here:\n\n".
                           "%5\$s\n\n".
-                          "Don't reply to this email; it won't get to them.\n\n".
+                          "Do not reply to this email; it will not get to them.\n\n".
                           "With kind regards,\n".
-                          "%6\$s\n"),
+                          "%6\$s"),
                         $from_profile->getBestName(),
                         $from_profile->nickname,
                         $group->nickname,
                         $gm->content,
                         common_local_url('newmessage', array('to' => $from_profile->id)),
-                        common_config('site', 'name'));
+                        common_config('site', 'name')) . "\n";
 
         $headers = _mail_prepare_headers('message', $to->nickname, $from_profile->nickname);
 
index 0176d3bd6e6f5fd635ce206427c67a137183cb33..7447ca9a622908d998ff2b0a1aced1e6baa4628c 100644 (file)
@@ -164,7 +164,7 @@ class Group_privacy_settings extends Memcached_DataObject
         $gps = self::forGroup($group);
 
         if ($gps->allow_privacy == Group_privacy_settings::NEVER) {
-            throw new Exception(sprintf(_('Group %s does not allow private messages.'),
+            throw new Exception(sprintf(_m('Group %s does not allow private messages.'),
                                         $group->nickname));
         }
 
@@ -172,27 +172,27 @@ class Group_privacy_settings extends Memcached_DataObject
         case Group_privacy_settings::EVERYONE:
             $profile = $user->getProfile();
             if (Group_block::isBlocked($group, $profile)) {
-                throw new Exception(sprintf(_('User %s is blocked from group %s.'),
+                throw new Exception(sprintf(_m('User %1$s is blocked from group %2$s.'),
                                             $user->nickname,
                                             $group->nickname));
             }
             break;
         case Group_privacy_settings::MEMBER:
             if (!$user->isMember($group)) {
-                throw new Exception(sprintf(_('User %s is not a member of group %s.'),
+                throw new Exception(sprintf(_m('User %1$s is not a member of group %2$s.'),
                                             $user->nickname,
                                             $group->nickname));
             }
             break;
         case Group_privacy_settings::ADMIN:
             if (!$user->isAdmin($group)) {
-                throw new Exception(sprintf(_('User %s is not an administrator of group %s.'),
+                throw new Exception(sprintf(_m('User %1$s is not an administrator of group %2$s.'),
                                             $user->nickname,
                                             $group->nickname));
             }
             break;
         default:
-            throw new Exception(sprintf(_('Unknown privacy settings for group %s.'),
+            throw new Exception(sprintf(_m('Unknown privacy settings for group %s.'),
                                         $group->nickname));
         }
 
index 39789cc9af4177e182383a5a80026318dc0612d5..e1c4fc996dee8f8e086b7cf34cafc2df484b6a9d 100644 (file)
@@ -63,7 +63,7 @@ class GroupinboxAction extends GroupDesignAction
         $cur = common_current_user();
 
         if (empty($cur)) {
-            throw new ClientException(_('Only for logged-in users'), 403);
+            throw new ClientException(_m('Only for logged-in users.'), 403);
         }
 
         $nicknameArg = $this->trimmed('nickname');
@@ -79,17 +79,17 @@ class GroupinboxAction extends GroupDesignAction
         $localGroup = Local_group::staticGet('nickname', $nickname);
 
         if (empty($localGroup)) {
-            throw new ClientException(_('No such group'), 404);
+            throw new ClientException(_m('No such group.'), 404);
         }
 
         $this->group = User_group::staticGet('id', $localGroup->group_id);
 
         if (empty($this->group)) {
-            throw new ClientException(_('No such group'), 404);
+            throw new ClientException(_m('No such group.'), 404);
         }
 
         if (!$cur->isMember($this->group)) {
-            throw new ClientException(_('Only for members'), 403);
+            throw new ClientException(_m('Only for members.'), 403);
         }
 
         $this->page = $this->trimmed('page');
@@ -167,11 +167,11 @@ class GroupinboxAction extends GroupDesignAction
         $base = $this->group->getFancyName();
 
         if ($this->page == 1) {
-            return sprintf(_('%s group inbox'), $base);
+            return sprintf(_m('%s group inbox'), $base);
         } else {
             // TRANS: Page title for any but first group page.
             // TRANS: %1$s is a group name, $2$s is a page number.
-            return sprintf(_('%1$s group inbox, page %2$d'),
+            return sprintf(_m('%1$s group inbox, page %2$d'),
                            $base,
                            $this->page);
         }
index 3b3cf4cfea4dd297113948bc0dcf1cb77acf35a2..bd865cb37c78d3f4d135e436f3206d9246819ba9 100644 (file)
@@ -77,7 +77,7 @@ class GroupMessageCommand extends Command
         $gm = Group_message::send($this->user, $group, $this->text);
 
         $channel->output($this->user, 
-                         sprintf(_('Direct message to group %s sent.'), 
+                         sprintf(_m('Direct message to group %s sent.'), 
                                  $group->nickname));
 
         return true;
index a832ce5978cf1894822e1449121128298a497f2e..6d440961230d727ad2f7e9a72f8fe60f058ec3c6 100644 (file)
@@ -87,7 +87,7 @@ class GroupMessageForm extends Form
     {
         $this->out->element('legend',
                             null,
-                            sprintf(_('Message to %s'), $this->group->nickname));
+                            sprintf(_m('Message to %s'), $this->group->nickname));
     }
 
     /**
@@ -128,7 +128,7 @@ class GroupMessageForm extends Form
     {
         $this->out->element('label', array('for' => 'notice_data-text',
                                            'id' => 'notice_data-text-label'),
-                            sprintf(_('Direct message to %s'), $this->group->nickname));
+                            sprintf(_m('Direct message to %s'), $this->group->nickname));
 
         $this->out->element('textarea', array('id' => 'notice_data-text',
                                               'cols' => 35,
@@ -140,7 +140,7 @@ class GroupMessageForm extends Form
 
         if ($contentLimit > 0) {
             $this->out->elementStart('dl', 'form_note');
-            $this->out->element('dt', null, _('Available characters'));
+            $this->out->element('dt', null, _m('Available characters'));
             $this->out->element('dd', array('class' => 'count'),
                                 $contentLimit);
             $this->out->elementEnd('dl');
index 1ad24c4a0ac889e7e278e50ea46f71eb477ef363..4271a8d22bc4e84192e07f316f4422338e5adb8b 100644 (file)
@@ -66,11 +66,11 @@ class NewgroupmessageAction extends Action
         $this->user = common_current_user();
 
         if (empty($this->user)) {
-            throw new ClientException(_('Must be logged in.'), 403);
+            throw new ClientException(_m('Must be logged in.'), 403);
         }
 
         if (!$this->user->hasRight(Right::NEWMESSAGE)) {
-            throw new Exception(sprintf(_('User %s not allowed to send private messages.'),
+            throw new Exception(sprintf(_m('User %s not allowed to send private messages.'),
                                         $this->user->nickname));
         }
 
@@ -87,13 +87,13 @@ class NewgroupmessageAction extends Action
         $localGroup = Local_group::staticGet('nickname', $nickname);
 
         if (empty($localGroup)) {
-            throw new ClientException(_('No such group'), 404);
+            throw new ClientException(_m('No such group.'), 404);
         }
 
         $this->group = User_group::staticGet('id', $localGroup->group_id);
 
         if (empty($this->group)) {
-            throw new ClientException(_('No such group'), 404);
+            throw new ClientException(_m('No such group.'), 404);
         }
 
         // This throws an exception on error
@@ -140,12 +140,12 @@ class NewgroupmessageAction extends Action
         if ($this->boolean('ajax')) {
             $this->startHTML('text/xml;charset=utf-8');
             $this->elementStart('head');
-            $this->element('title', null, _('Message sent'));
+            $this->element('title', null, _m('Message sent'));
             $this->elementEnd('head');
             $this->elementStart('body');
             $this->element('p',
                            array('id' => 'command_result'),
-                           sprintf(_('Direct message to %s sent.'),
+                           sprintf(_m('Direct message to %s sent.'),
                                    $this->group->nickname));
             $this->elementEnd('body');
             $this->elementEnd('html');
@@ -156,6 +156,6 @@ class NewgroupmessageAction extends Action
 
     function title()
     {
-        return sprintf(_('New message to group %s'), $this->group->nickname);
+        return sprintf(_m('New message to group %s'), $this->group->nickname);
     }
 }
index 73293255cfb69a030f873c492bf884b71e23317a..828b6765488591f37108381b42ecbb7f8ff30317 100644 (file)
@@ -67,7 +67,7 @@ class ShowgroupmessageAction extends Action
         $this->user = common_current_user();
 
         if (empty($this->user)) {
-            throw new ClientException(_('Only logged-in users can view private messages.'),
+            throw new ClientException(_m('Only logged-in users can view private messages.'),
                                       403);
         }
 
@@ -76,23 +76,23 @@ class ShowgroupmessageAction extends Action
         $this->gm = Group_message::staticGet('id', $id);
 
         if (empty($this->gm)) {
-            throw new ClientException(_('No such message'), 404);
+            throw new ClientException(_m('No such message.'), 404);
         }
 
         $this->group = User_group::staticGet('id', $this->gm->to_group);
 
         if (empty($this->group)) {
-            throw new ServerException(_('Group not found.'));
+            throw new ServerException(_m('Group not found.'));
         }
 
         if (!$this->user->isMember($this->group)) {
-            throw new ClientException(_('Cannot read message.'), 403);
+            throw new ClientException(_m('Cannot read message.'), 403);
         }
 
         $this->sender = Profile::staticGet('id', $this->gm->from_profile);
 
         if (empty($this->sender)) {
-            throw new ServerException(_('No sender found.'));
+            throw new ServerException(_m('No sender found.'));
         }
 
         return true;
@@ -117,7 +117,7 @@ class ShowgroupmessageAction extends Action
 
     function title()
     {
-        return sprintf(_('Message from %1$s to group %2$s on %3$s'),
+        return sprintf(_m('Message from %1$s to group %2$s on %3$s'),
                        $this->sender->nickname,
                        $this->group->nickname,
                        common_exact_date($this->gm->created));
index 7a53e5cbf5821af2101c3c2a995f71348c1c46fb..787781560424656bbbfe13902afcf59273098705 100644 (file)
@@ -290,12 +290,12 @@ class IrcPlugin extends ImPlugin {
      * @return boolean success value
      */
     public function sendConfirmationCode($screenname, $code, $user, $checked = false) {
-        $body = sprintf(_('User "%s" on %s has said that your %s screenname belongs to them. ' .
+        $body = sprintf(_m('User "%1$s" on %2$s has said that your %3$s screenname belongs to them. ' .
           'If that\'s true, you can confirm by clicking on this URL: ' .
-          '%s' .
+          '%4$s' .
           ' . (If you cannot click it, copy-and-paste it into the ' .
-          'address bar of your browser). If that user isn\'t you, ' .
-          'or if you didn\'t request this confirmation, just ignore this message.'),
+          'address bar of your browser). If that user is not you, ' .
+          'or if you did not request this confirmation, just ignore this message.'),
           $user->nickname, common_config('site', 'name'), $this->getDisplayName(), common_local_url('confirmaddress', array('code' => $code)));
 
         if ($this->regcheck && !$checked) {
index 6066293311cf11ed4d56d7d9cd91b909bcd64423..d9637352515d291a6408fb8b67f01281f2cfc2a4 100644 (file)
@@ -244,7 +244,7 @@ class IrcManager extends ImManager {
                     if (!$result) {
                         common_log_db_error($confirm, 'DELETE', __FILE__);
                         // TRANS: Server error thrown on database error canceling IM address confirmation.
-                        $this->serverError(_('Couldn\'t delete confirmation.'));
+                        $this->serverError(_m('Could not delete confirmation.'));
                         return;
                     }
                 }
index 3afcd824f96ac14ccd08a4643f009677678939cf..93e1e87dc04e37b9540d15417fd80640c7e2012c 100644 (file)
@@ -165,7 +165,7 @@ class LdapCommon
     function changePassword($username,$oldpassword,$newpassword)
     {
         if(! isset($this->attributes['password']) || !isset($this->password_encoding)){
-            //throw new Exception(_('Sorry, changing LDAP passwords is not supported at this time'));
+            //throw new Exception(_m('Sorry, changing LDAP passwords is not supported at this time.'));
             return false;
         }
         $entry = $this->get_user($username,array('dn' => 'dn'));
index bc80ee5cf9548cbaf963adf5365a9f73a211c906..5d76535b22991bcc881f3f0b6d7318f3852d27c2 100644 (file)
@@ -56,7 +56,7 @@ class OembedproxyAction extends OembedAction
         // We're not a general oEmbed proxy service; limit to valid sessions.
         $token = $this->trimmed('token');
         if (!$token || $token != common_session_token()) {
-            $this->clientError(_('There was a problem with your session token. '.
+            $this->clientError(_m('There was a problem with your session token. '.
                                  'Try again, please.'));
         }
 
index 797572d7f857f64f4577e8d21be6e3da1312de6c..c40000921c15ed0529f2b2e3c61fe7ad085cfcdb 100644 (file)
@@ -201,7 +201,7 @@ class LinkbackPlugin extends Plugin
     {
         $profile = $this->notice->getProfile();
 
-        $args = array('title' => sprintf(_('%1$s\'s status on %2$s'),
+        $args = array('title' => sprintf(_m('%1$s\'s status on %2$s'),
                                          $profile->nickname,
                                          common_exact_date($this->notice->created)),
                       'excerpt' => $this->notice->content,
index caa5e6fbf36037ada44fb388a10135e4d027978b..4822fc42486ef50bed71c99e59926bd22db09c15 100644 (file)
@@ -15,7 +15,7 @@ class RemoteProfileAction extends ShowstreamAction
         $this->profile = Profile::staticGet('id', $id);
 
         if (!$this->profile) {
-            $this->serverError(_('User has no profile.'));
+            $this->serverError(_m('User has no profile.'));
             return false;
         }
 
index 4c82c481aef543e27790c95463829732a4c82ce7..444a82adba72dc8083b0b30aa6fb8af67a0e4691 100644 (file)
@@ -86,7 +86,7 @@ class MollomPlugin extends Plugin
         );
         $response = $this->mollom('mollom.checkContent', $data);
         if ($response['spam'] == MOLLOM_ANALYSIS_SPAM) {
-          throw new ClientException(_("Spam Detected"), 400);
+          throw new ClientException(_m("Spam Detected."), 400);
         }
         if ($response['spam'] == MOLLOM_ANALYSIS_UNSURE) {
           //if unsure, let through
index 5355aeba03fed5b2eca9c762709d3466aae00f4b..c7ec33eeecd61fd95e30acb5d71ee2923eb1b00a 100644 (file)
@@ -157,7 +157,7 @@ class UsersalmonAction extends SalmonAction
 
         if (!empty($old)) {
             // TRANS: Client exception.
-            throw new ClientException(_('This is already a favorite.'));
+            throw new ClientException(_m('This is already a favorite.'));
         }
 
         if (!Fave::addNew($profile, $notice)) {
@@ -179,7 +179,7 @@ class UsersalmonAction extends SalmonAction
                                    'notice_id' => $notice->id));
         if (empty($fave)) {
             // TRANS: Client exception.
-            throw new ClientException(_('Notice wasn\'t favorited!'));
+            throw new ClientException(_m('Notice was not favorited!'));
         }
 
         $fave->delete();
index 6d2c5f31f06eaa497f1bc0a6c2f459272e8e0a39..bc93bc21a62f219734cf0d4ed82437946f0f0564 100644 (file)
@@ -125,12 +125,12 @@ class FinishopenidloginAction extends Action
         $this->elementStart('li');
         $this->input('newname', _m('New nickname'),
                      ($this->username) ? $this->username : '',
-                     _m('1-64 lowercase letters or numbers, no punctuation or spaces'));
+                     _m('1-64 lowercase letters or numbers, no punctuation or spaces.'));
         $this->elementEnd('li');
         $this->elementStart('li');
-        $this->input('email', _('Email'), $this->getEmail(),
-                     _('Used only for updates, announcements, '.
-                       'and password recovery'));
+        $this->input('email', _m('Email'), $this->getEmail(),
+                     _m('Used only for updates, announcements, '.
+                       'and password recovery.'));
         $this->elementEnd('li');
 
         // Hook point for captcha etc
@@ -146,7 +146,7 @@ class FinishopenidloginAction extends Action
                                           'class' => 'checkbox'));
         // TRANS: OpenID plugin link text.
         // TRANS: %s is a link to a licese with the license name as link text.
-        $message = _('My text and files are available under %s ' .
+        $message = _m('My text and files are available under %s ' .
                      'except this private data: password, ' .
                      'email address, IM address, and phone number.');
         $link = '<a href="' .
index 38df183fef2cbb67f930cdf7cff4a2228d000e82..9299261e909e44484dc66ecb70a0d5a5734ce874 100644 (file)
@@ -275,6 +275,6 @@ class OpenIDAdminPanelForm extends AdminForm
 
     function formActions()
     {
-        $this->out->submit('submit', _('Save'), 'submit', null, _m('Save OpenID settings'));
+        $this->out->submit('submit', _m('Save'), 'submit', null, _m('Save OpenID settings.'));
     }
 }
index 941c13dd37d42b5388884105d6debf296a2af239..4e7b2c5273140a6b06ada0c1b336e7e389b4821a 100644 (file)
@@ -444,7 +444,7 @@ class PollPlugin extends MicroAppPlugin
                 $form->show();
             }
         } else {
-            $out->text(_('Poll data is missing'));
+            $out->text(_m('Poll data is missing'));
         }
         $out->elementEnd('div');
 
index c7d7a40e3bb0a7e973464a6f5158d0ce73e7f6e5..26fde9c3e2e90983835aa428ecbde70fd64b7fe6 100644 (file)
@@ -82,7 +82,7 @@ class LoggingAggregatorAction extends Action
         parent::handle($args);
 
         if (empty($this->url)) {
-            $this->showError(_('A URL parameter is required.'));
+            $this->showError(_m('A URL parameter is required.'));
             return;
         }
 
index 5a33e7132e101faeb83bdd76968f9b894cf5aa66..adbd022e80365ca8f11fb48c51c609600d6a79ad 100644 (file)
@@ -93,7 +93,7 @@ class RecaptchaPlugin extends Plugin
 
         if (!$resp->is_valid) {
             if($this->display_errors) {
-                $action->showForm(sprintf(_("(reCAPTCHA error: %s)", $resp->error)));
+                $action->showForm(sprintf(_m("(reCAPTCHA error: %s)", $resp->error)));
             }
             $action->showForm(_m("Captcha does not match!"));
             return false;
index 1f22487a681ac24761f97a4868bde5e6e5a4e9ca..974a95a7cf83a4069e8e6bdeb5897ed06f219577 100644 (file)
@@ -66,7 +66,7 @@ class ConfirmfirstemailAction extends Action
         $user = common_current_user();
 
         if (!empty($user)) {
-            throw new ClientException(_('You are already logged in.'));
+            throw new ClientException(_m('You are already logged in.'));
         }
 
         $this->code = $this->trimmed('code');
@@ -74,25 +74,25 @@ class ConfirmfirstemailAction extends Action
         $this->confirm = Confirm_address::staticGet('code', $this->code);
 
         if (empty($this->confirm)) {
-            throw new ClientException(_('Confirmation code not found.'));
+            throw new ClientException(_m('Confirmation code not found.'));
             return;
         }
 
         $this->user = User::staticGet('id', $this->confirm->user_id);
 
         if (empty($this->user)) {
-            throw new ServerException(_('No user for that confirmation code.'));
+            throw new ServerException(_m('No user for that confirmation code.'));
         }
 
         $type = $this->confirm->address_type;
 
         if ($type != 'email') {
-            throw new ServerException(sprintf(_('Unrecognized address type %s.'), $type));
+            throw new ServerException(sprintf(_m('Unrecognized address type %s.'), $type));
         }
 
         if (!empty($this->user->email) && $this->user->email == $confirm->address) {
             // TRANS: Client error for an already confirmed email/jabber/sms address.
-            throw new ClientException(_('That address has already been confirmed.'));
+            throw new ClientException(_m('That address has already been confirmed.'));
         }
 
         if ($this->isPost()) {
@@ -103,10 +103,10 @@ class ConfirmfirstemailAction extends Action
             $confirm  = $this->trimmed('confirm');
 
             if (strlen($password) < 6) {
-                throw new ClientException(_('Password too short.'));
+                throw new ClientException(_m('Password too short.'));
                 return;
             } else if (0 != strcmp($password, $confirm)) {
-                throw new ClientException(_("Passwords don't match."));
+                throw new ClientException(_m("Passwords do not match."));
                 return;
             }
 
@@ -162,7 +162,7 @@ class ConfirmfirstemailAction extends Action
     function showContent()
     {
         $this->element('p', 'instructions',
-                       sprintf(_('You have confirmed the email address for your new user account %s. '.
+                       sprintf(_m('You have confirmed the email address for your new user account %s. '.
                                  'Use the form below to set your new password.'),
                                $this->user->nickname));
 
@@ -172,7 +172,7 @@ class ConfirmfirstemailAction extends Action
 
     function title()
     {
-        return _('Set a password');
+        return _m('Set a password');
     }
 }
 
@@ -188,7 +188,7 @@ class ConfirmFirstEmailForm extends Form
 
     function formLegend()
     {
-        return _('Confirm email');
+        return _m('Confirm email');
     }
 
     function action()
@@ -206,18 +206,18 @@ class ConfirmFirstEmailForm extends Form
     {
         $this->out->elementStart('ul', 'form_data');
         $this->out->elementStart('li');
-        $this->out->password('password', _('New password'),
-                             _('6 or more characters.'));
+        $this->out->password('password', _m('New password'),
+                             _m('6 or more characters.'));
         $this->out->elementEnd('li');
         $this->out->elementStart('li');
-        $this->out->password('confirm', _('Confirm'),
-                             _('Same as password above.'));
+        $this->out->password('confirm', _m('Confirm'),
+                             _m('Same as password above.'));
         $this->out->elementEnd('li');
         $this->out->elementEnd('ul');
     }
 
     function formActions()
     {
-        $this->out->submit('save', _('Save'));
+        $this->out->submit('save', _m('Save'));
     }
 }
index 67bc178df69ac196eff7bf0b2ac5f6cdbc993ec3..db1a0e9abcdeae6c4bd8ebe5a047ade35517d4e8 100644 (file)
@@ -75,7 +75,7 @@ class SearchsubAction extends Action
         if ($_SERVER['REQUEST_METHOD'] != 'POST') {
             // TRANS: Client error displayed trying to perform any request method other than POST.
             // TRANS: Do not translate POST.
-            $this->clientError(_('This action only accepts POST requests.'));
+            $this->clientError(_m('This action only accepts POST requests.'));
             return false;
         }
 
@@ -85,7 +85,7 @@ class SearchsubAction extends Action
 
         if (!$token || $token != common_session_token()) {
             // TRANS: Client error displayed when the session token is not okay.
-            $this->clientError(_('There was a problem with your session token.'.
+            $this->clientError(_m('There was a problem with your session token.'.
                                  ' Try again, please.'));
             return false;
         }
@@ -96,7 +96,7 @@ class SearchsubAction extends Action
 
         if (empty($this->user)) {
             // TRANS: Client error displayed trying to subscribe when not logged in.
-            $this->clientError(_('Not logged in.'));
+            $this->clientError(_m('Not logged in.'));
             return false;
         }
 
@@ -106,7 +106,7 @@ class SearchsubAction extends Action
 
         if (empty($this->search)) {
             // TRANS: Client error displayed trying to subscribe to a non-existing profile.
-            $this->clientError(_('No such profile.'));
+            $this->clientError(_m('No such profile.'));
             return false;
         }
 
index 8078cdde1b6f95e59fad90ee0d123bcbee2f266b..7b053773971380dddccb00f2085179eed1ca439e 100644 (file)
@@ -137,6 +137,6 @@ class SearchSubForm extends Form
 
     function formActions()
     {
-        $this->out->submit('submit', _('Subscribe'), 'submit', null, _m('Subscribe to this search'));
+        $this->out->submit('submit', _m('BUTTON','Subscribe'), 'submit', null, _m('Subscribe to this search'));
     }
 }
index 296b74f4a1d134c60883db65ce363f52fd813443..f90531f6aac5f62fc0b6e0384609da73fadaa97a 100644 (file)
@@ -104,6 +104,6 @@ class SearchUnsubForm extends SearchSubForm
 
     function formActions()
     {
-        $this->out->submit('submit', _('Unsubscribe'), 'submit', null, _m('Unsubscribe from this search'));
+        $this->out->submit('submit', _m('BUTTON','Unsubscribe'), 'submit', null, _m('Unsubscribe from this search'));
     }
 }
index 90bbf3dffb30f0dd0e3e301ac67a74f7dfb62318..d6e1ed5d1bc8ffa1960f3b7eeb74f3b0f3bcfdf7 100644 (file)
@@ -129,7 +129,7 @@ class MirrorSettingsAction extends SettingsAction
             header('Content-Type: text/html;charset=utf-8');
             $this->elementStart('html');
             $this->elementStart('head');
-            $this->element('title', null, _('Provider add'));
+            $this->element('title', null, _m('Provider add'));
             $this->elementEnd('head');
             $this->elementStart('body');
 
index 114113360e96835bd83576dbd4d9ea82125376b8..e898ce9ae0a376d592c8e5ae4d3a369d4b16d535 100644 (file)
@@ -71,7 +71,7 @@ class SubscriptionThrottlePlugin extends Plugin
                 $subtime = strtotime($sub->created);
                 $now     = time();
                 if ($now - $subtime < $seconds) {
-                    throw new Exception(_("Too many subscriptions. Take a break and try again later."));
+                    throw new Exception(_m("Too many subscriptions. Take a break and try again later."));
                 }
             }
         }
@@ -97,7 +97,7 @@ class SubscriptionThrottlePlugin extends Plugin
                 $jointime = strtotime($mem->created);
                 $now      = time();
                 if ($now - $jointime < $seconds) {
-                    throw new Exception(_("Too many memberships. Take a break and try again later."));
+                    throw new Exception(_m("Too many memberships. Take a break and try again later."));
                 }
             }
         }
index 2e4e25d6e1cd1a870ff8909a575be7b08249c472..83bf106bed0bc6626f417f9310af1499fc9b1e6c 100644 (file)
@@ -75,7 +75,7 @@ class TagsubAction extends Action
         if ($_SERVER['REQUEST_METHOD'] != 'POST') {
             // TRANS: Client error displayed trying to perform any request method other than POST.
             // TRANS: Do not translate POST.
-            $this->clientError(_('This action only accepts POST requests.'));
+            $this->clientError(_m('This action only accepts POST requests.'));
             return false;
         }
 
@@ -85,7 +85,7 @@ class TagsubAction extends Action
 
         if (!$token || $token != common_session_token()) {
             // TRANS: Client error displayed when the session token is not okay.
-            $this->clientError(_('There was a problem with your session token.'.
+            $this->clientError(_m('There was a problem with your session token.'.
                                  ' Try again, please.'));
             return false;
         }
@@ -96,7 +96,7 @@ class TagsubAction extends Action
 
         if (empty($this->user)) {
             // TRANS: Client error displayed trying to subscribe when not logged in.
-            $this->clientError(_('Not logged in.'));
+            $this->clientError(_m('Not logged in.'));
             return false;
         }
 
@@ -106,7 +106,7 @@ class TagsubAction extends Action
 
         if (empty($this->tag)) {
             // TRANS: Client error displayed trying to subscribe to a non-existing profile.
-            $this->clientError(_('No such profile.'));
+            $this->clientError(_m('No such profile.'));
             return false;
         }
 
index 108558be242c8c90d5e55415c79aa896c136af42..169ccc4adbbc780398a8a628c2bfe574eb4790b6 100644 (file)
@@ -137,6 +137,6 @@ class TagSubForm extends Form
 
     function formActions()
     {
-        $this->out->submit('submit', _('Subscribe'), 'submit', null, _m('Subscribe to this tag'));
+        $this->out->submit('submit', _m('BUTTON','Subscribe'), 'submit', null, _m('Subscribe to this tag'));
     }
 }
index f11935229b4f935f40fe1325617cbaceff39cc3e..21ddf5035fd3c61af301e00dc28d4f8d4880b6ee 100644 (file)
@@ -115,13 +115,13 @@ class TagSubsAction extends GalleryAction
             $current_user = common_current_user();
             if ($this->user->id === $current_user->id) {
                 // TRANS: Tag subscription list text when the logged in user has no tag subscriptions.
-                $message = _('You\'re not listening to any hash tags right now. You can push the "Subscribe" button ' .
+                $message = _m('You are not listening to any hash tags right now. You can push the "Subscribe" button ' .
                              'on any hashtag page to automatically receive any public messages on this site that use that ' .
-                             'tag, even if you\'re not subscribed to the poster.');
+                             'tag, even if you are not subscribed to the poster.');
             } else {
                 // TRANS: Tag subscription list text when looking at the subscriptions for a of a user other
                 // TRANS: than the logged in user that has no tag subscriptions. %s is the user nickname.
-                $message = sprintf(_('%s is not listening to any tags.'), $this->user->nickname);
+                $message = sprintf(_m('%s is not listening to any tags.'), $this->user->nickname);
             }
         }
         else {
index 0b44648071e1af882cae9f3ac2ab7107247a73a1..d26e99a3e59589423612f97b14bfd13de663ede3 100644 (file)
@@ -104,6 +104,6 @@ class TagUnsubForm extends TagSubForm
 
     function formActions()
     {
-        $this->out->submit('submit', _('Unsubscribe'), 'submit', null, _m('Unsubscribe from this tag'));
+        $this->out->submit('submit', _m('BUTTON','Unsubscribe'), 'submit', null, _m('Unsubscribe from this tag'));
     }
 }
index 80625c5b70e8bff693f2273d964d849e1830e429..c013f9f4d10124c9442f878d4fe610c3ea24a84e 100644 (file)
@@ -285,7 +285,7 @@ class TemplateAction extends Action
       header('WWW-Authenticate: Basic realm="StatusNet API"');
 
       // cancelled the browser login form
-      $this->clientError(_('Authentication error!'), $code = 401);
+      $this->clientError(_m('Authentication error!'), $code = 401);
 
     } else {
 
@@ -299,7 +299,7 @@ class TemplateAction extends Action
 
         // verify that user is admin
         if (!($user->id == 1))
-          $this->clientError(_('Only User #1 can update the template.'), $code = 401);
+          $this->clientError(_m('Only User #1 can update the template.'), $code = 401);
 
         // open the old template
         $tpl_file = $this->templateFolder() . '/index.html';
@@ -316,7 +316,7 @@ class TemplateAction extends Action
       } else {
 
         // bad username and password
-        $this->clientError(_('Authentication error!'), $code = 401);
+        $this->clientError(_m('Authentication error!'), $code = 401);
 
       }
 
index 972fa527d41340fac906c14482bb2064237002d3..1870c6a4774dcf29ca260c2b62242882469c0ee8 100644 (file)
@@ -392,8 +392,8 @@ class TwitterauthorizationAction extends Action
                      _m('1-64 lowercase letters or numbers, no punctuation or spaces'));
         $this->elementEnd('li');
         $this->elementStart('li');
-        $this->input('email', _('Email'), $this->getEmail(),
-                     _('Used only for updates, announcements, '.
+        $this->input('email', _m('LABEL','Email'), $this->getEmail(),
+                     _m('Used only for updates, announcements, '.
                        'and password recovery'));
         $this->elementEnd('li');
 
index df0450f66a53d6cbd4a80c13d963cee3b3acec94..2f62fa7c41e8eb54afebdc98bb714ec18d724b6c 100644 (file)
@@ -61,7 +61,7 @@ class AdminprofileflagAction extends Action
         // User must be logged in.
 
         if (!common_logged_in()) {
-            $this->clientError(_('Not logged in.'));
+            $this->clientError(_m('Not logged in.'));
             return;
         }
 
@@ -85,7 +85,7 @@ class AdminprofileflagAction extends Action
         // User must have the right to review flags
 
         if (!$user->hasRight(UserFlagPlugin::REVIEWFLAGS)) {
-            $this->clientError(_('You cannot review profile flags.'));
+            $this->clientError(_m('You cannot review profile flags.'));
             return false;
         }
 
index ab3187299ed8ef2eec4f99e561f3a012c7ad996a..ad2c6e363e2de44b149264926e48a87aca1b5df6 100644 (file)
@@ -71,7 +71,8 @@ class UserLimitPlugin extends Plugin
             $cnt = $cls->count();
 
             if ($cnt >= $this->maxUsers) {
-                $msg = sprintf(_('Cannot register; maximum number of users (%d) reached.'),
+                // @todo FIXME: i18n issue. Needs plural.
+                $msg = sprintf(_m('Cannot register; maximum number of users (%d) reached.'),
                                $this->maxUsers);
 
                 throw new ClientException($msg);
index c6c976b8f46849cd79150d1c8d19295857475aa0..46ae4bc0689091bfeacf5eb1c0fd927239148625 100644 (file)
@@ -81,16 +81,16 @@ class WikiHashtagsPlugin extends Plugin
                     $action->raw($html);
                     $action->elementStart('p');
                     $action->element('a', array('href' => $editurl,
-                                                'title' => sprintf(_('Edit the article for #%s on WikiHashtags'), $tag)),
-                                     _('Edit'));
+                                                'title' => sprintf(_m('Edit the article for #%s on WikiHashtags'), $tag)),
+                                     _m('Edit'));
                     $action->element('a', array('href' => 'http://www.gnu.org/copyleft/fdl.html',
-                                                'title' => _('Shared under the terms of the GNU Free Documentation License'),
+                                                'title' => _m('Shared under the terms of the GNU Free Documentation License'),
                                                 'rel' => 'license'),
                                      'GNU FDL');
                     $action->elementEnd('p');
                 } else {
                     $action->element('a', array('href' => $editurl),
-                                     sprintf(_('Start the article for #%s on WikiHashtags'), $tag));
+                                     sprintf(_m('Start the article for #%s on WikiHashtags'), $tag));
                 }
 
                 $action->elementEnd('div');
index 20025417824e0126741cff6aad11e1d071cc9c72..f7df6812cf3db6a294b17d5084ccd2730d595009 100644 (file)
@@ -354,8 +354,9 @@ class XmppPlugin extends ImPlugin
         $xs->text(" ");
         $xs->element('a', array(
             'href'=>common_local_url('conversation',
-                array('id' => $notice->conversation)).'#notice-'.$notice->id
-             ),sprintf(_('[%s]'),$notice->id));
+                array('id' => $notice->conversation)).'#notice-'.$notice->id),
+             // TRANS: %s is a notice ID.
+             sprintf(_m('[%s]'),$notice->id));
         $xs->elementEnd('body');
         $xs->elementEnd('html');