X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FBlogspamNet%2FBlogspamNetPlugin.php;h=edb9406d9ad82082889136d04492f2df848436d3;hb=e8e6d494d2457680c5d3c4f90e1e851e1323a80d;hp=06198e6c54846deb937897bdc65a136c1e58b009;hpb=1e73ba00bdd37f46415eb45b1b904dc894fb801c;p=quix0rs-gnu-social.git diff --git a/plugins/BlogspamNet/BlogspamNetPlugin.php b/plugins/BlogspamNet/BlogspamNetPlugin.php index 06198e6c54..edb9406d9a 100644 --- a/plugins/BlogspamNet/BlogspamNetPlugin.php +++ b/plugins/BlogspamNet/BlogspamNetPlugin.php @@ -82,13 +82,19 @@ class BlogspamNetPlugin extends Plugin } else { common_debug("Blogspamnet results = " . $response); if (preg_match('/^ERROR(:(.*))?$/', $response, $match)) { - throw new ServerException(sprintf(_m("Error from %1$s: %2$s"), $this->baseUrl, $match[2]), 500); + // TRANS: Server exception thrown when blogspam.net returns error status. + // TRANS: %1$s is the base URL, %2$s is the error (unknown contents; no period). + 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(_m("Spam checker results: %s"), $match[2]), 400); + // TRANS: Server exception thrown when blogspam.net returns spam status. + // TRANS: Does not end with period because of unknown contents for %s (spam match). + 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(_m("Unexpected response from %1$s: %2$s"), $this->baseUrl, $response), 500); + // TRANS: Server exception thrown when blogspam.net returns an unexpected status. + // TRANS: %1$s is the base URL, %2$s is the response (unknown contents; no period). + throw new ServerException(sprintf(_m('Unexpected response from %1$s: %2$s'), $this->baseUrl, $response), 500); } } return true; @@ -149,6 +155,7 @@ class BlogspamNetPlugin extends Plugin 'author' => 'Evan Prodromou, Brion Vibber', 'homepage' => 'http://status.net/wiki/Plugin:BlogspamNet', 'rawdescription' => + // TRANS: Plugin description. _m('Plugin to check submitted notices with blogspam.net.')); return true; }