summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-11-30 15:22:41 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-11-30 15:22:41 +0000
commit6ac26c2948ede4d2e24e732e66f0e5aeb785267e (patch)
tree44d6a54f4ae7769c449490ac0fdf81e98b4f2afc /perl-install
parent93a72d0fd18125bcc0d6277faae62f41ae154edc (diff)
downloaddrakx-6ac26c2948ede4d2e24e732e66f0e5aeb785267e.tar
drakx-6ac26c2948ede4d2e24e732e66f0e5aeb785267e.tar.gz
drakx-6ac26c2948ede4d2e24e732e66f0e5aeb785267e.tar.bz2
drakx-6ac26c2948ede4d2e24e732e66f0e5aeb785267e.tar.xz
drakx-6ac26c2948ede4d2e24e732e66f0e5aeb785267e.zip
- localedrake:
o restrict the proposed input-methods for each language
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/any.pm2
-rw-r--r--perl-install/install/NEWS1
-rw-r--r--perl-install/lang.pm25
4 files changed, 24 insertions, 5 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index aa3c3dfad..372b3a345 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,5 +1,6 @@
- localedrake:
o adapt to cooker: scim-tables-skim is now skim-scim-tables
+ o restrict the proposed input-methods for each language
- bootloader:
o when reading existing menu.lst, keep verbatim entries for which the device
has no mount-point
diff --git a/perl-install/any.pm b/perl-install/any.pm
index efdc1b615..8c9dea9f3 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -1060,7 +1060,7 @@ sub selectCountry {
list => [ @countries ], advanced => scalar(@best), changed => sub { $other = 1 } },
{ val => \$locale->{IM}, type => 'combo', label => N("Input method:"),
sort => 0, separator => '|',
- list => [ '', sort(lang::get_ims()) ],
+ list => [ '', lang::get_ims($locale->{lang}) ],
format => sub { $_[0] ? uc($_[0] =~ /(.*)\+(.*)/ ? "$1|$1+$2" : $_[0]) : N("None") },
advanced => !$locale->{IM},
},
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 653796bcc..e18b7ef1a 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,4 @@
+- restrict the proposed input-methods for each language
- /dev/<vg> may not exist if LVs have not been created, it must not be an error (#31478)
- use xkb instead of xmodmap
(this fixes XF86_Switch_VT_X not defined in our xmodmaps)
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index eed576f83..ef2b38f22 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -573,6 +573,7 @@ my %IM_config =
'zh_HK' => 'chinput -big5',
'zh_TW' => 'chinput -big5',
},
+ langs => 'zh',
packages => { generic => sub { 'miniChinput' } },
},
fcitx => {
@@ -580,12 +581,14 @@ my %IM_config =
XIM => 'fcitx',
XIM_PROGRAM => 'fcitx',
XMODIFIERS => '@im=fcitx',
+ langs => 'zh',
},
gcin => {
GTK_IM_MODULE => 'gcin',
XIM => 'gcin',
XIM_PROGRAM => 'gcin',
XMODIFIERS => '@im=gcin',
+ langs => 'zh',
},
'im-ja' => {
GTK_IM_MODULE => 'im-ja',
@@ -593,6 +596,7 @@ my %IM_config =
XIM => 'im-ja-xim-server',
XIM_PROGRAM => 'im-ja-xim-server',
XMODIFIERS => '@im=im-ja-xim-server',
+ langs => 'ja',
},
kinput2 => {
@@ -600,6 +604,7 @@ my %IM_config =
XIM => 'kinput2',
XIM_PROGRAM => 'kinput2',
XMODIFIERS => '@im=kinput2',
+ langs => 'ja',
packages => { generic => sub { 'kinput2-wnn' } },
},
nabi => {
@@ -607,6 +612,7 @@ my %IM_config =
XIM => 'nabi',
XIM_PROGRAM => 'nabi',
XMODIFIERS => '@im=nabi',
+ langs => 'ko',
},
oxim => {
@@ -614,6 +620,7 @@ my %IM_config =
XIM => 'oxim',
XIM_PROGRAM => 'oxim',
XMODIFIERS => '@im=oxim', # '@im=SCIM' is broken for now
+ langs => 'zh_TW',
packages => { generic => sub { 'oxim' } },
},
'scim' => {
@@ -665,6 +672,7 @@ my %IM_config =
XIM => 'uim',
XIM_PROGRAM => 'uim-xim',
XMODIFIERS => '@im=uim',
+ langs => 'ja',
packages => { generic => sub { qw(uim-gtk uim) } },
},
xcin => {
@@ -672,17 +680,15 @@ my %IM_config =
XIM_PROGRAM => 'xcin',
XMODIFIERS => '@im=xcin-zh_TW',
GTK_IM_MODULE => 'xim',
+ langs => 'zh',
},
'x-unikey' => {
GTK_IM_MODULE => 'xim',
XMODIFIERS => '@im=unikey',
+ langs => 'vi',
},
);
-sub get_ims() { keys %IM_config }
-
-
-
#-------------------------------------------------------------
#
# Locale configuration regarding encoding/IM
@@ -709,6 +715,17 @@ my %IM_locale_specific_config = (
);
+sub get_ims {
+ my ($lang) = @_;
+ my $main_lang = analyse_locale_name($lang)->{main};
+
+ sort grep {
+ my $langs = $IM_config{$_}{langs};
+ !$langs || intersection([ $lang, $main_lang ],
+ [ split(' ', $langs) ]);
+ } keys %IM_config;
+}
+
sub get_default_im {
my ($lang) = @_;
find {