]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Poll/Poll.php
merge 0.9.x into 1.0.x
[quix0rs-gnu-social.git] / plugins / Poll / Poll.php
index 1f26bbf6e40b003dc627fba74697ba50f057924b..0c274341b2bbca204e32fed2b6c8b1cedf14690f 100644 (file)
@@ -64,7 +64,6 @@ class Poll extends Managed_DataObject
      * @return User_greeting_count object found, or null for no hits
      *
      */
-
     function staticGet($k, $v=null)
     {
         return Memcached_DataObject::staticGet('Poll', $k, $v);
@@ -82,7 +81,6 @@ class Poll extends Managed_DataObject
      * @return Bookmark object found, or null for no hits
      *
      */
-
     function pkeyGet($kv)
     {
         return Memcached_DataObject::pkeyGet('Poll', $kv);
@@ -117,7 +115,6 @@ class Poll extends Managed_DataObject
      *
      * @return Poll found poll or null
      */
-
     function getByNotice($notice)
     {
         return self::staticGet('uri', $notice->uri);
@@ -209,7 +206,6 @@ class Poll extends Managed_DataObject
      *
      * @return Notice saved notice
      */
-
     static function saveNew($profile, $question, $opts, $options=null)
     {
         if (empty($options)) {
@@ -239,12 +235,15 @@ class Poll extends Managed_DataObject
         common_log(LOG_DEBUG, "Saving poll: $p->id $p->uri");
         $p->insert();
 
-        $content  = sprintf(_m('Poll: %s %s'),
+        // TRANS: Notice content creating a poll.
+        // TRANS: %1$s is the poll question, %2$s is a link to the poll.
+        $content  = sprintf(_m('Poll: %1$s %2$s'),
                             $question,
                             $p->uri);
-        $rendered = sprintf(_m('Poll: <a href="%s">%s</a>'),
-                            htmlspecialchars($p->uri),
-                            htmlspecialchars($question));
+        $link = '<a href="' . htmlspecialchars($p->uri) . '">' . htmlspecialchars($question) . '</a>';
+        // TRANS: Rendered version of the notice content creating a poll.
+        // TRANS: %s is a link to the poll with the question as link description.
+        $rendered = sprintf(_m('Poll: %s'), $link);
 
         $tags    = array('poll');
         $replies = array();