From: Frank Lichtenheld Date: Tue, 11 Dec 2007 23:15:15 +0000 (+0100) Subject: Packages::Dispatcher: Fix fallback to English for non-po langs X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=63d7e11b96daf6d545a0c886215efc2b307efab8;p=deb%2Fpackages.git Packages::Dispatcher: Fix fallback to English for non-po langs 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. --- diff --git a/lib/Packages/Dispatcher.pm b/lib/Packages/Dispatcher.pm index 3113683..e6a9d52 100755 --- a/lib/Packages/Dispatcher.pm +++ b/lib/Packages/Dispatcher.pm @@ -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 };