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/internal/CaptchaService.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/internal/CaptchaService.py') diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py index a1ec633e8..aa8758344 100644 --- a/module/plugins/internal/CaptchaService.py +++ b/module/plugins/internal/CaptchaService.py @@ -28,7 +28,7 @@ class CaptchaService: if hasattr(self.plugin, "html") and self.plugin.html: html = self.plugin.html else: - errmsg = "%s html not found" % self.__name__ + errmsg = _("%s html not found") % self.__name__ self.plugin.fail(errmsg) #@TODO: replace all plugin.fail(errmsg) with plugin.error(errmsg) in 0.4.10 raise TypeError(errmsg) @@ -68,7 +68,7 @@ class ReCaptcha(CaptchaService): if hasattr(self.plugin, "html") and self.plugin.html: html = self.plugin.html else: - errmsg = "ReCaptcha not found" + errmsg = _("ReCaptcha html not found") self.plugin.fail(errmsg) raise TypeError(errmsg) @@ -87,7 +87,7 @@ class ReCaptcha(CaptchaService): if self.detect_key(): key = self.key else: - errmsg = "ReCaptcha key not found" + errmsg = _("ReCaptcha key not found") self.plugin.fail(errmsg) raise TypeError(errmsg) @@ -127,7 +127,7 @@ class AdsCaptcha(CaptchaService): if hasattr(self.plugin, "html") and self.plugin.html: html = self.plugin.html else: - errmsg = "AdsCaptcha html not found" + errmsg = _("AdsCaptcha html not found") self.plugin.fail(errmsg) raise TypeError(errmsg) @@ -147,7 +147,7 @@ class AdsCaptcha(CaptchaService): if self.detect_key(): key = self.key else: - errmsg = "AdsCaptcha key not found" + errmsg = _("AdsCaptcha key not found") self.plugin.fail(errmsg) raise TypeError(errmsg) @@ -188,7 +188,7 @@ class SolveMedia(CaptchaService): if self.detect_key(): key = self.key else: - errmsg = "SolveMedia key not found" + errmsg = _("SolveMedia key not found") self.plugin.fail(errmsg) raise TypeError(errmsg) -- cgit v1.2.3