Added the ability to use printf(3) % variables in trans()

This commit is contained in:
Elijah Perrault committed 2011-02-14 20:55:49 -07:00
1 parent 934a10d880
commit 31e2c8b4f9
2 files changed
+3 -2

No files matched your search

+1
View File
@@ -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.
+2 -2
View File
@@ -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;