summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-02-18 13:23:03 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-02-18 13:23:03 +0000
commit6e10d3f2f845a9cd4c39c0fdd4d541a0ed404ffe (patch)
tree669e9b85882d65f7a11d1fd5519735fb41b44949
parent6ad5c76a1da1f18c16974df03a92fffd30dcf6b5 (diff)
downloaddrakx-backup-do-not-use-6e10d3f2f845a9cd4c39c0fdd4d541a0ed404ffe.tar
drakx-backup-do-not-use-6e10d3f2f845a9cd4c39c0fdd4d541a0ed404ffe.tar.gz
drakx-backup-do-not-use-6e10d3f2f845a9cd4c39c0fdd4d541a0ed404ffe.tar.bz2
drakx-backup-do-not-use-6e10d3f2f845a9cd4c39c0fdd4d541a0ed404ffe.tar.xz
drakx-backup-do-not-use-6e10d3f2f845a9cd4c39c0fdd4d541a0ed404ffe.zip
fuzzy language finding between available langs when it doesn't match (useful for upgrades where fr_FR was fr_FR@euro)
-rw-r--r--perl-install/lang.pm1
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;