From 63d7e11b96daf6d545a0c886215efc2b307efab8 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Wed, 12 Dec 2007 00:15:15 +0100 Subject: [PATCH] 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. --- lib/Packages/Dispatcher.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 }; -- 2.39.2