]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Many i18n and L10n updates.
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Fri, 1 Apr 2011 20:08:38 +0000 (22:08 +0200)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Fri, 1 Apr 2011 20:08:38 +0000 (22:08 +0200)
plugins/Event/EventPlugin.php
plugins/Event/RSVP.php
plugins/Event/eventform.php
plugins/Event/newevent.php
plugins/Event/showrsvp.php

index d1dda6336de09bac7a463a8f8384982e251a9108..528c855bda588a3c4c471f9b072ab49d794e3d2c 100644 (file)
@@ -168,7 +168,7 @@ class EventPlugin extends MicroappPlugin
         $happeningObj = $activity->objects[0];
 
         if ($happeningObj->type != Happening::OBJECT_TYPE) {
-            throw new Exception('Wrong type for object.');
+            throw new Exception(_m('Wrong type for object.'));
         }
 
         $notice = null;
@@ -189,12 +189,12 @@ class EventPlugin extends MicroappPlugin
             $happening = Happening::staticGet('uri', $happeningObj->id);
             if (empty($happening)) {
                 // FIXME: save the event
-                throw new Exception("RSVP for unknown event.");
+                throw new Exception(_m('RSVP for unknown event.'));
             }
             $notice = RSVP::saveNew($actor, $happening, $activity->verb, $options);
             break;
         default:
-            throw new Exception("Unknown verb for events");
+            throw new Exception(_m('Unknown verb for events'));
         }
 
         return $notice;
@@ -225,13 +225,13 @@ class EventPlugin extends MicroappPlugin
         }
 
         if (empty($happening)) {
-            throw new Exception("Unknown object type.");
+            throw new Exception(_m('Unknown object type.'));
         }
 
         $notice = $happening->getNotice();
 
         if (empty($notice)) {
-            throw new Exception("Unknown event notice.");
+            throw new Exception(_m('Unknown event notice.'));
         }
 
         $obj = new ActivityObject();
index cce0f6ee56b89f48f732c0b983d804470481a48a..314d297a3604c8aaa38df0b2f6781f8513f8fad4 100644 (file)
@@ -219,7 +219,7 @@ class RSVP extends Managed_DataObject
             return '?';
             break;
         default:
-            throw new Exception("Unknown verb {$verb}");
+            throw new Exception(sprintf(_m('Unknown verb "%s"'),$verb));
         }
     }
 
@@ -236,7 +236,7 @@ class RSVP extends Managed_DataObject
             return RSVP::POSSIBLE;
             break;
         default:
-            throw new Exception("Unknown code {$code}");
+            throw new Exception(sprintf(_m('Unknown code "%s".'),$code));
         }
     }
 
@@ -244,7 +244,7 @@ class RSVP extends Managed_DataObject
     {
         $notice = Notice::staticGet('uri', $this->uri);
         if (empty($notice)) {
-            throw new ServerException("RSVP {$this->id} does not correspond to a notice in the DB.");
+            throw new ServerException(sprintf(_m('RSVP %s does not correspond to a notice in the database.'),$this->id));
         }
         return $notice;
     }
@@ -278,7 +278,7 @@ class RSVP extends Managed_DataObject
     {
         $profile = Profile::staticGet('id', $this->profile_id);
         if (empty($profile)) {
-            throw new Exception("No profile with ID {$this->profile_id}");
+            throw new Exception(sprintf(_m('No profile with ID %s.'),$this->profile_id));
         }
         return $profile;
     }
@@ -287,7 +287,7 @@ class RSVP extends Managed_DataObject
     {
         $event = Happening::staticGet('id', $this->event_id);
         if (empty($event)) {
-            throw new Exception("No event with ID {$this->event_id}");
+            throw new Exception(sprintf(_m('No event with ID %s.'),$this->event_id));
         }
         return $event;
     }
@@ -316,16 +316,16 @@ class RSVP extends Managed_DataObject
 
         switch ($response) {
         case 'Y':
-            $fmt = _m("<span class='automatic event-rsvp'><a href='%1$s'>%2$s</a> is attending <a href='%3$s'>%4$s</a>.</span>");
+            $fmt = _m("<span class='automatic event-rsvp'><a href='%1\$s'>%2\$s</a> is attending <a href='%3\$s'>%4\$s</a>.</span>");
             break;
         case 'N':
-            $fmt = _m("<span class='automatic event-rsvp'><a href='%1$s'>%2$s</a> is not attending <a href='%3$s'>%4$s</a>.</span>");
+            $fmt = _m("<span class='automatic event-rsvp'><a href='%1\$s'>%2\$s</a> is not attending <a href='%3\$s'>%4\$s</a>.</span>");
             break;
         case '?':
-            $fmt = _m("<span class='automatic event-rsvp'><a href='%1$s'>%2$s</a> might attend <a href='%3$s'>%4$s</a>.</span>");
+            $fmt = _m("<span class='automatic event-rsvp'><a href='%1\$s'>%2\$s</a> might attend <a href='%3\$s'>%4\$s</a>.</span>");
             break;
         default:
-            throw new Exception(sprintf(_('Unknown response code %s.'),$response));
+            throw new Exception(sprintf(_m('Unknown response code %s.'),$response));
             break;
         }
 
@@ -351,16 +351,16 @@ class RSVP extends Managed_DataObject
 
         switch ($response) {
         case 'Y':
-            $fmt = _m("%1$s is attending %2$s.");
+            $fmt = _m('%1$s is attending %2$s.');
             break;
         case 'N':
-            $fmt = _m("%1$s is not attending %2$s.");
+            $fmt = _m('%1$s is not attending %2$s.');
             break;
         case '?':
-            $fmt = _m("%1$s might attend %2$s.>");
+            $fmt = _m('%1$s might attend %2$s.');
             break;
         default:
-            throw new Exception("Unknown response code {$response}");
+            throw new Exception(sprintf(_m('Unknown response code %s.'),$response));
             break;
         }
 
index 327c8a31e607f3acc871c949bb9cb7a3de1c77b6..31fecb1278d0fb099ce754b6a067eba15022b57e 100644 (file)
@@ -95,56 +95,56 @@ class EventForm extends Form
         $this->out->input('title',
                           _m('LABEL','Title'),
                           null,
-                          _m('Title of the event'));
+                          _m('Title of the event.'));
         $this->unli();
 
         $this->li();
         $this->out->input('startdate',
                           _m('LABEL','Start date'),
                           null,
-                          _m('Date the event starts'));
+                          _m('Date the event starts.'));
         $this->unli();
 
         $this->li();
         $this->out->input('starttime',
                           _m('LABEL','Start time'),
                           null,
-                          _m('Time the event starts'));
+                          _m('Time the event starts.'));
         $this->unli();
 
         $this->li();
         $this->out->input('enddate',
                           _m('LABEL','End date'),
                           null,   
-                          _m('Date the event ends'));
+                          _m('Date the event ends.'));
         $this->unli();
 
         $this->li();
         $this->out->input('endtime',
                           _m('LABEL','End time'),
                           null,
-                          _m('Time the event ends'));
+                          _m('Time the event ends.'));
         $this->unli();
 
         $this->li();
         $this->out->input('location',
                           _m('LABEL','Location'),
                           null,
-                          _m('Event location'));
+                          _m('Event location.'));
         $this->unli();
 
         $this->li();
         $this->out->input('url',
                           _m('LABEL','URL'),
                           null,
-                          _m('URL for more information'));
+                          _m('URL for more information.'));
         $this->unli();
 
         $this->li();
         $this->out->input('description',
                           _m('LABEL','Description'),
                           null,
-                          _m('Description of the event'));
+                          _m('Description of the event.'));
         $this->unli();
 
         $this->out->elementEnd('ul');
index 7fe80f0857bd5344dbdf52e3fde13993c3a5a6ca..082f12bb4bbdbdc5b376e312f98ca64a7b388f74 100644 (file)
@@ -81,7 +81,7 @@ class NeweventAction extends Action
         $this->user = common_current_user();
 
         if (empty($this->user)) {
-            throw new ClientException(_m("Must be logged in to post a event."),
+            throw new ClientException(_m('Must be logged in to post a event.'),
                                       403);
         }
 
@@ -135,13 +135,13 @@ class NeweventAction extends Action
         $this->endTime   = strtotime($end);
 
         if ($this->startTime == 0) {
-            throw new Exception(sprintf(_m('Could not parse date "%s"'),
+            throw new Exception(sprintf(_m('Could not parse date "%s".'),
                                         $start));
         }
 
 
         if ($this->endTime == 0) {
-            throw new Exception(sprintf(_m('Could not parse date "%s"'),
+            throw new Exception(sprintf(_m('Could not parse date "%s".'),
                                         $end));
         }
 
index f08857dcc46430d9fd91076fe1035321987c4a83..7b129177e1114dd2d27bcebf8400466075853e1f 100644 (file)
@@ -65,7 +65,7 @@ class ShowrsvpAction extends ShownoticeAction
 
         if (empty($this->event)) {
             // TRANS: Client exception thrown when referring to a non-existing event.
-            throw new ClientException(_m('No such Event.'), 404);
+            throw new ClientException(_m('No such event.'), 404);
         }
 
         $notice = $this->rsvp->getNotice();