From 9f2ebe486a3e155fb6a60e07cccb77ab6a772eb2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 26 Oct 2014 02:31:54 +0200 Subject: Extend translation support in plugins + a lot of code cosmetics and typo fixes --- module/plugins/hoster/LinksnappyCom.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/LinksnappyCom.py') diff --git a/module/plugins/hoster/LinksnappyCom.py b/module/plugins/hoster/LinksnappyCom.py index 3c417a9d3..512f55686 100644 --- a/module/plugins/hoster/LinksnappyCom.py +++ b/module/plugins/hoster/LinksnappyCom.py @@ -33,7 +33,7 @@ class LinksnappyCom(Hoster): new_url = pyfile.url elif not self.account: self.logError(_("Please enter your %s account or deactivate this plugin") % "Linksnappy.com") - self.fail("No Linksnappy.com account provided") + self.fail(_("No Linksnappy.com account provided")) else: self.logDebug("Old URL: %s" % pyfile.url) host = self._get_host(pyfile.url) @@ -48,8 +48,9 @@ class LinksnappyCom(Hoster): j = json_loads(r)['links'][0] if j['error']: - self.logError("Error converting the link: %s" % j['error']) - self.fail("Error converting the link") + msg = _("Error converting the link") + self.logError(msg, j['error']) + self.fail(msg) pyfile.name = j['filename'] new_url = j['generated'] @@ -66,7 +67,7 @@ class LinksnappyCom(Hoster): check = self.checkDownload({"html302": "302 Found"}) if check == "html302": - self.retry(wait_time=5, reason="Linksnappy returns only HTML data.") + self.retry(wait_time=5, reason="Linksnappy returns only HTML data") @staticmethod -- cgit v1.2.3