summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakxtv
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-02-08 22:09:29 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-02-08 22:09:29 +0000
commit7fa65d931c24bd00a7d9ec9b26adaf7ad80023b9 (patch)
tree71e2baa4516d151f4462c692502a3a7dff5ef4df /perl-install/standalone/drakxtv
parentdd9a661c53728a4ea265882a1029c9b323cd6d3c (diff)
downloaddrakx-7fa65d931c24bd00a7d9ec9b26adaf7ad80023b9.tar
drakx-7fa65d931c24bd00a7d9ec9b26adaf7ad80023b9.tar.gz
drakx-7fa65d931c24bd00a7d9ec9b26adaf7ad80023b9.tar.bz2
drakx-7fa65d931c24bd00a7d9ec9b26adaf7ad80023b9.tar.xz
drakx-7fa65d931c24bd00a7d9ec9b26adaf7ad80023b9.zip
language/country selection change:
- first install step is selection of your language, in your language; it uses images for that - language->country is probed, the selection of the country is possible if there was a problem, in the Summary step - in the $o big structure, we now use $o->{locale} which contains three keys: lang, country and utf8 - lang.pm has been cleaned and rewritten a bit - keyboard probing now done only on language (because this step is at the beginning of the install) - timezone probing done on country, if use changes country before timezone in the Summary, re-probe timezone accordingly
Diffstat (limited to 'perl-install/standalone/drakxtv')
-rwxr-xr-xperl-install/standalone/drakxtv43
1 files changed, 21 insertions, 22 deletions
diff --git a/perl-install/standalone/drakxtv b/perl-install/standalone/drakxtv
index d373b6e05..515af17a9 100755
--- a/perl-install/standalone/drakxtv
+++ b/perl-install/standalone/drakxtv
@@ -71,33 +71,32 @@ You can install it by typing \"urpmi xawtv\" as root, in a console.")));
);
# Info: HRC means "Harmonically Related Carrier"
- # default to pal since most people use that
- $norm = "PAL";
my %countries =
(
- "ar" => [ "argentina" ],
- "au" => [ "australia" ],
- "(br|fr)" => ["france", "SECAM"],
- "ca" => [ "canada-cable" ],
- "(ga|ie)" => [ "ireland" ],
- "it" => [ "italy" ],
- "jp" => [ "japan-bcast", "NTSC-JP" ],
- "nz" => [ "newzealand" ],
- "(at|be|ch|de|eu|gb|se)" => [ "europe-west" ],
- "us" => [ "us-bcast", "NTSC" ],
- "za" => [ "southafrica" ],
- "(zh|TW|Big5|CN.GB2312|CN)" => [ "china-bcast" ]
+ "AR" => [ "argentina" ],
+ "AU" => [ "australia" ],
+ "FR" => [ "france", "SECAM"],
+ "CA" => [ "canada-cable" ],
+ "IE" => [ "ireland" ],
+ "IT" => [ "italy" ],
+ "JP" => [ "japan-bcast", "NTSC-JP" ],
+ "NZ" => [ "newzealand" ],
+ "AT|BE|CH|DE|ES|GB|SE" => [ "europe-west" ],
+ "US" => [ "us-bcast", "NTSC" ],
+ "ZA" => [ "southafrica" ],
+ "CN|TW" => [ "china-bcast" ]
);
- ($_) = lang::read('', $>);
- foreach my $i (keys %countries) {
- if (/($i|$i.UTF-8)$/i) {
- my $tbl = $countries{$i};
- $ftable_id = $tbl->[0];
- $norm = $tbl->[1] if $tbl->[1];
- }
+ my $tbl;
+ my $locale = lang::read('', $>);
+ $locale->{country} =~ /$_/ and $tbl = $countries{$_} foreach keys %countries;
+ if ($tbl) {
+ $ftable_id = $tbl->[0];
+ $norm = $tbl->[1] if $tbl->[1];
}
- log::l("[drakxtv] guess lang=>$_, norm=>$norm, area=>$ftable_id");
+ # default to pal since most people use that
+ $norm ||= "PAL";
+ log::l("[drakxtv] guess country=>$locale->{country}, norm=>$norm, area=>$ftable_id");
if ($in->ask_from("TVdrake", N("Please,\ntype in your tv norm and country"),
[