]> git.deb.at Git - deb/packages.git/commitdiff
Packages::Dispatcher: Fix fallback to English for non-po langs
authorFrank Lichtenheld <frank@lichtenheld.de>
Tue, 11 Dec 2007 23:15:15 +0000 (00:15 +0100)
committerFrank Lichtenheld <frank@lichtenheld.de>
Tue, 11 Dec 2007 23:15:15 +0000 (00:15 +0100)
Locale::Maketext tries to do very smart things with
I18N::LangTags::panic_languages. We want to fall back
to "en" always, though, so let it know that.

lib/Packages/Dispatcher.pm

index 3113683c010cf210de0f24c88162a7189df4b2e8..e6a9d5220dfe764fc607317c91953d861a5294d5 100755 (executable)
@@ -273,9 +273,8 @@ sub do_dispatch {
     Packages::CGI::init_url( $input, \%params, \%opts );
 
     my $charset = "UTF-8";
-    my $cat = Packages::I18N::Locale->get_handle( $opts{lang} )
-       || Packages::I18N::Locale->get_handle( 'en' );
-    die "get_handle failed for $opts{lang}" unless $cat;
+    my $cat = Packages::I18N::Locale->get_handle( $opts{lang}, "en" )
+       or die "get_handle failed for $opts{lang}";
     $opts{cat} = $cat;
 
     $opts{h_suites} = { map { $_ => 1 } @suites };