summaryrefslogtreecommitdiffstats
path: root/perl-install/lang.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-08-09 02:53:29 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-08-09 02:53:29 +0000
commita4501b58868e1de2b90a202ace72df7e1b6c5277 (patch)
tree7ffede019ae3341d21faab9747139ceaecd7df8a /perl-install/lang.pm
parent5fe5e4c59aa4530fdd5a427aac82265549fba86a (diff)
downloaddrakx-backup-do-not-use-a4501b58868e1de2b90a202ace72df7e1b6c5277.tar
drakx-backup-do-not-use-a4501b58868e1de2b90a202ace72df7e1b6c5277.tar.gz
drakx-backup-do-not-use-a4501b58868e1de2b90a202ace72df7e1b6c5277.tar.bz2
drakx-backup-do-not-use-a4501b58868e1de2b90a202ace72df7e1b6c5277.tar.xz
drakx-backup-do-not-use-a4501b58868e1de2b90a202ace72df7e1b6c5277.zip
- move extra scim combinations in %IM_config
- drop set_default_im(), moving data directly in %IM_config
Diffstat (limited to 'perl-install/lang.pm')
-rw-r--r--perl-install/lang.pm32
1 files changed, 16 insertions, 16 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index fec3cdb6d..b81280b6e 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -583,7 +583,17 @@ my %IM_config =
GTK_IM_MODULE => 'scim',
XIM_PROGRAM => 'scim -d',
XMODIFIERS => '@im=SCIM',
+ default_for_lang => 'am ja ko zh_CN zh_TW',
},
+
+ (map {
+ ("scim+$_" => {
+ GTK_IM_MODULE => 'scim',
+ XIM_PROGRAM => 'scim -d',
+ XMODIFIERS => '@im=SCIM',
+ });
+ } qw(anthy canna ccinput fcitx m17n prime skk uim)),
+
skim => {
GTK_IM_MODULE => 'scim',
XIM_PROGRAM => 'skim -d',
@@ -603,7 +613,8 @@ my %IM_config =
},
'x-unikey' => {
GTK_IM_MODULE => 'xim',
- XMODIFIERS => '@im=unikey'
+ XMODIFIERS => '@im=unikey',
+ default_for_lang => 'vi',
},
);
@@ -636,24 +647,14 @@ my %IM_locale_specific_config = (
},
);
-my %default_im;
sub get_default_im {
my ($lang) = @_;
- $default_im{$lang}{IM};
+ find {
+ member($lang, split(' ', $IM_config{$_}{default_for_lang}));
+ } keys %IM_config;
}
-sub set_default_im {
- my ($im, @langs) = @_;
- foreach (@langs) {
- $default_im{$_}{IM} = $im;
- }
-}
-
-set_default_im('x-unikey', qw(vi));
-# CJK default input methods:
-set_default_im('scim+(default)', qw(am ja ko zh_CN zh_TW));
-
# keep the following list in sync with share/rpmsrate:
my %IM2packages = (
'chinput' => { generic => [ 'miniChinput' ] },
@@ -685,10 +686,9 @@ sub IM2packages {
} else { () }
}
-# enable to select extra SCIM combinaisons:
+# enable to select extra SCIM combinations:
my @SCIM_aliasees = qw(anthy canna ccinput fcitx m17n prime skk uim);
$IM2packages{"scim+$_"} = { generic => [ "scim-$_" ] } foreach @SCIM_aliasees;
-$IM_config{"scim+$_"} = $IM_config{'scim+(default)'} foreach @SCIM_aliasees;
#- [0]: console font name
#- [1]: sfm map for console font (if needed)