mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
Script modules should also use the new name of translation methods
This commit is contained in:
+4
-4
@@ -5,7 +5,7 @@ package perleval;
|
||||
use base 'ZNC::Module';
|
||||
|
||||
sub description {
|
||||
shift->t('Evaluates perl code')
|
||||
shift->t_s('Evaluates perl code')
|
||||
}
|
||||
|
||||
sub wiki_page {
|
||||
@@ -15,7 +15,7 @@ sub wiki_page {
|
||||
sub OnLoad {
|
||||
my $self = shift;
|
||||
if (!$self->GetUser->IsAdmin) {
|
||||
$_[1] = $self->t('Only admin can load this module');
|
||||
$_[1] = $self->t_s('Only admin can load this module');
|
||||
return 0
|
||||
}
|
||||
return 1
|
||||
@@ -26,9 +26,9 @@ sub OnModCommand {
|
||||
my $cmd = shift;
|
||||
my $x = eval $cmd;
|
||||
if ($@) {
|
||||
$self->PutModule($self->f('Error: %s')->($@));
|
||||
$self->PutModule($self->t_f('Error: %s')->($@));
|
||||
} else {
|
||||
$self->PutModule($self->f('Result: %s')->($x));
|
||||
$self->PutModule($self->t_f('Result: %s')->($x));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ class pyeval(znc.Module, InteractiveInterpreter):
|
||||
|
||||
def OnLoad(self, args, message):
|
||||
if not self.GetUser().IsAdmin():
|
||||
message.s = self.t(
|
||||
message.s = self.t_s(
|
||||
'You must have admin privileges to load this module.')
|
||||
return False
|
||||
|
||||
@@ -78,4 +78,4 @@ class pyeval(znc.Module, InteractiveInterpreter):
|
||||
del self.locals['client']
|
||||
del self.locals['network']
|
||||
|
||||
pyeval.description = pyeval.t('Evaluates python code')
|
||||
pyeval.description = pyeval.t_s('Evaluates python code')
|
||||
|
||||
Reference in New Issue
Block a user