From 6e10d3f2f845a9cd4c39c0fdd4d541a0ed404ffe Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 18 Feb 2002 13:23:03 +0000 Subject: fuzzy language finding between available langs when it doesn't match (useful for upgrades where fr_FR was fr_FR@euro) --- perl-install/lang.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'perl-install') diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 83105b15c..36993fe4e 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -607,6 +607,7 @@ sub read { my $file = $prefix . ($user_only ? "$ENV{HOME}/.i18n" : '/etc/sysconfig/i18n'); my %h = getVarsFromSh("$prefix$file"); my $lang = $h{LC_MESSAGES} || 'en_US'; + $lang = bestMatchSentence($lang, list()) if !exists $languages{$lang}; my $langs = $user_only ? () : cat_("$prefix/etc/rpm/macros") =~ /%_install_langs (.*)/ ? unpack_langs($1) : { $lang => 1 }; $lang, $langs; -- cgit v1.2.1