diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-02-18 13:23:03 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-02-18 13:23:03 +0000 |
commit | 6e10d3f2f845a9cd4c39c0fdd4d541a0ed404ffe (patch) | |
tree | 669e9b85882d65f7a11d1fd5519735fb41b44949 /perl-install/lang.pm | |
parent | 6ad5c76a1da1f18c16974df03a92fffd30dcf6b5 (diff) | |
download | drakx-6e10d3f2f845a9cd4c39c0fdd4d541a0ed404ffe.tar drakx-6e10d3f2f845a9cd4c39c0fdd4d541a0ed404ffe.tar.gz drakx-6e10d3f2f845a9cd4c39c0fdd4d541a0ed404ffe.tar.bz2 drakx-6e10d3f2f845a9cd4c39c0fdd4d541a0ed404ffe.tar.xz drakx-6e10d3f2f845a9cd4c39c0fdd4d541a0ed404ffe.zip |
fuzzy language finding between available langs when it doesn't match (useful for upgrades where fr_FR was fr_FR@euro)
Diffstat (limited to 'perl-install/lang.pm')
-rw-r--r-- | perl-install/lang.pm | 1 |
1 files changed, 1 insertions, 0 deletions
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; |