summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-08-24 07:14:38 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-08-24 07:14:38 +0000
commitb3f4a6839de1ecd67b9a1fb0189bf6fdf71b5491 (patch)
treeee2a40d3824565e680edbfc879337c7bac161c4d
parentf3cd1cd19ba02bc33e70def4aed3b7c778db31e9 (diff)
downloaddrakx-b3f4a6839de1ecd67b9a1fb0189bf6fdf71b5491.tar
drakx-b3f4a6839de1ecd67b9a1fb0189bf6fdf71b5491.tar.gz
drakx-b3f4a6839de1ecd67b9a1fb0189bf6fdf71b5491.tar.bz2
drakx-b3f4a6839de1ecd67b9a1fb0189bf6fdf71b5491.tar.xz
drakx-b3f4a6839de1ecd67b9a1fb0189bf6fdf71b5491.zip
(IM2packages) introduce it in order to know which packages need to be
installed for a (locale, input method) tuple
-rw-r--r--perl-install/lang.pm18
1 files changed, 18 insertions, 0 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 6e8c233b0..8264182ee 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -644,6 +644,24 @@ set_default_im('x-unikey', qw(vi_VN vi_VN.TCVN vi_VN.UTF-8 vi_VN.VISCII));
# CJK default input methods:
set_default_im('scim', qw(ja_JP ja_JP.UTF-8 ko_KR ko_KR.UTF-8 zh_CN zh_CN.UTF-8 zh_HK zh_HK.UTF-8 zh_SG zh_SG.UTF-8 zh_TW zh_TW.UTF-8));
+# keep the following list in sync with share/rpmsrate:
+my %IM2packages = (
+ 'scim' => {
+ generic => [ qw(scim scim-tables) ],
+ 'ko' => [ qw(scim-hangul) ],
+ 'zh' => [ qw(scim-chinese scim-tables) ],
+ },
+ 'scim+uim' => { generic => [ qw(scim-uim) ] },
+ 'uim' => { generic => [ qw(uim-applet) ] },
+ );
+
+sub IM2packages {
+ my ($im, $locale) = @_;
+ return if $im eq "None";
+ my $packages = $IM2packages{$im}{$locale} || $IM2packages{$im}{generic};
+ return $packages ? @$packages : $im;
+}
+
#- [0]: console font name
#- [1]: sfm map for console font (if needed)