]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/lib/salmon.php
* i18n/L10n update
[quix0rs-gnu-social.git] / plugins / OStatus / lib / salmon.php
index ef7719a40c3861513549b11dc6096e89d25d56b5..963da650840ecf869fe1bc868779f3ad67d1508a 100644 (file)
@@ -31,10 +31,10 @@ class Salmon
     const REL_SALMON = 'salmon';
     const REL_MENTIONED = 'mentioned';
 
-    // XXX: these are deprecated 
+    // XXX: these are deprecated
     const NS_REPLIES = "http://salmon-protocol.org/ns/salmon-replies";
     const NS_MENTIONS = "http://salmon-protocol.org/ns/salmon-mention";
-    
+
     /**
      * Sign and post the given Atom entry as a Salmon message.
      *
@@ -87,9 +87,10 @@ class Salmon
                 // No keypair yet, let's generate one.
                 $magickey = new Magicsig();
                 $magickey->generate($user->id);
-            } 
+            }
         } else {
-            throw new Exception("Salmon invalid actor for signing");
+            // TRANS: Exception.
+            throw new Exception(_m('Salmon invalid actor for signing.'));
         }
 
         try {
@@ -100,11 +101,10 @@ class Salmon
         return $magic_env->toXML($env);
     }
 
-
     public function verifyMagicEnv($text)
     {
         $magic_env = new MagicEnvelope();
-        
+
         $env = $magic_env->parse($text);
 
         return $magic_env->verify($env);