From 6e80f580bf9a7507920505355aa59c2daab6b934 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Wed, 23 Apr 2008 04:42:55 +0200 Subject: [PATCH] Packages::Template: Always provide a fallback g() function This will only get used if no catalogue is specified. Fixes the about/debtags page. --- lib/Packages/Template.pm | 1 + 1 file changed, 1 insertion(+) 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}, @_) }; } -- 2.39.2