X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FPtitUrl%2FPtitUrlPlugin.php;h=3a3e767e43df2f58805eb4124a8cdc8a0818a876;hb=d6b28c64830f632bb2f4b6f3c9369b9e56ad217a;hp=25a463c0be08470c185e56b9e6d811c92f52251f;hpb=0dbdcf2936a00282114f1368ead2f5edebc6ae61;p=quix0rs-gnu-social.git diff --git a/plugins/PtitUrl/PtitUrlPlugin.php b/plugins/PtitUrl/PtitUrlPlugin.php index 25a463c0be..3a3e767e43 100644 --- a/plugins/PtitUrl/PtitUrlPlugin.php +++ b/plugins/PtitUrl/PtitUrlPlugin.php @@ -38,7 +38,8 @@ class PtitUrlPlugin extends UrlShortenerPlugin function onInitializePlugin(){ parent::onInitializePlugin(); if(!isset($this->serviceUrl)){ - throw new Exception("must specify a serviceUrl"); + // TRANS: Exception thrown when URL shortening plugin was configured incorrectly. + throw new Exception(_m('You must specify a serviceUrl for ptit URL shortening.')); } } @@ -50,23 +51,24 @@ class PtitUrlPlugin extends UrlShortenerPlugin @$dom->loadHTML($response); $y = @simplexml_import_dom($dom); if (!isset($y->body)) return; + // @TODO Super-ugly style??? $xml = $y->body->center->table->tr->td->pre->a->attributes(); if (isset($xml['href'])) { return strval($xml['href']); } } - function onPluginVersion(&$versions) + function onPluginVersion(array &$versions) { $versions[] = array('name' => sprintf('PtitUrl (%s)', $this->shortenerName), - 'version' => STATUSNET_VERSION, + 'version' => GNUSOCIAL_VERSION, 'author' => 'Craig Andrews', 'homepage' => 'http://status.net/wiki/Plugin:PtitUrl', 'rawdescription' => + // TRANS: Plugin description. %1$s is the URL shortening service base URL (for example "bit.ly"). sprintf(_m('Uses %1$s URL-shortener service.'), $this->shortenerName)); return true; } } -