From 3503fdff6eb1d9dde6f49be8472bcd6c9cfd1a1e Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sun, 31 Jan 2016 11:29:26 +0000 Subject: [PATCH] Make pyeval module translatable --- modules/pyeval.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/pyeval.py b/modules/pyeval.py index 0ff9b43b..524a5366 100644 --- a/modules/pyeval.py +++ b/modules/pyeval.py @@ -24,7 +24,6 @@ import znc class pyeval(znc.Module, InteractiveInterpreter): module_types = [znc.CModInfo.UserModule, znc.CModInfo.NetworkModule] - description = 'Evaluates python code' def write(self, data): for line in data.split('\n'): @@ -45,7 +44,8 @@ class pyeval(znc.Module, InteractiveInterpreter): def OnLoad(self, args, message): if not self.GetUser().IsAdmin(): - message.s = 'You must have admin privileges to load this module.' + message.s = self.t( + 'You must have admin privileges to load this module.') return False self.filename = "" @@ -78,3 +78,4 @@ class pyeval(znc.Module, InteractiveInterpreter): del self.locals['client'] del self.locals['network'] +pyeval.description = pyeval.t('Evaluates python code')