From: Frank Lichtenheld Date: Wed, 23 Apr 2008 02:42:55 +0000 (+0200) Subject: Packages::Template: Always provide a fallback g() function X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=6e80f580bf9a7507920505355aa59c2daab6b934;p=deb%2Fpackages.git Packages::Template: Always provide a fallback g() function This will only get used if no catalogue is specified. Fixes the about/debtags page. --- diff --git a/lib/Packages/Template.pm b/lib/Packages/Template.pm index c2919f1..b48e690 100644 --- a/lib/Packages/Template.pm +++ b/lib/Packages/Template.pm @@ -35,6 +35,7 @@ sub new { }; $vars->{make_search_url} = sub { return &Packages::CGI::make_search_url(@_) }; $vars->{make_url} = sub { return &Packages::CGI::make_url(@_) }; + $vars->{g} = sub { my ($f, @a) = @_; return sprintf($f, @a); }; if ($vars->{cat}) { $vars->{g} = sub { return Packages::I18N::Locale::g($vars->{cat}, @_) }; }