diff --git a/doc/CHANGELOG b/doc/CHANGELOG index de3ebd9..dd89205 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log 3.0 Indev =============================================================================== + * Added the ability to use printf(3) % variables in trans(). * Added slog() to API::Log for logging to IRC. * Added a Greet module for greeting users on join. * Added PostgreSQL support. Official modules do not support this yet. diff --git a/lib/API/Std.pm b/lib/API/Std.pm index 770444c..f455085 100644 --- a/lib/API/Std.pm +++ b/lib/API/Std.pm @@ -337,11 +337,11 @@ sub conf_get # Translation subroutine. sub trans { - my ($id) = @_; + my $id = shift; $id =~ s/ /_/gsm; if (defined $API::Std::LANGE{$id}) { - return $API::Std::LANGE{$id}; + return sprintf $API::Std::LANGE{$id}, @_; } else { $id =~ s/_/ /gsm;