summaryrefslogtreecommitdiffstats
path: root/perl-install/timezone.pm
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2000-11-08 00:01:16 +0000
committerMystery Man <unknown@mandriva.org>2000-11-08 00:01:16 +0000
commitd5c526273db473a7d87a26000585900fc10dda7d (patch)
tree0fdaabe7a00921b6cc556601b103d344fc7ac781 /perl-install/timezone.pm
parent9c164312d4bfff6d93e1c4529de6b992f2bebc44 (diff)
downloaddrakx-d5c526273db473a7d87a26000585900fc10dda7d.tar
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.gz
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.bz2
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.xz
drakx-d5c526273db473a7d87a26000585900fc10dda7d.zip
This commit was manufactured by cvs2svn to create branch
'unlabeled-1.1.1'.
Diffstat (limited to 'perl-install/timezone.pm')
-rw-r--r--perl-install/timezone.pm69
1 files changed, 5 insertions, 64 deletions
diff --git a/perl-install/timezone.pm b/perl-install/timezone.pm
index 13a29029a..8ff037a0f 100644
--- a/perl-install/timezone.pm
+++ b/perl-install/timezone.pm
@@ -3,9 +3,6 @@ package timezone;
use diagnostics;
use strict;
-use common qw(:common :system);
-use commands;
-use log;
sub getTimeZones {
@@ -17,53 +14,24 @@ sub getTimeZones {
@l;
}
-sub read ($) {
- my ($f) = @_;
- my %t = getVarsFromSh($f) or die "cannot open file $f: $!";
-
- ("timezone", $t{ZONE}, "UTC", text2bool($t{UTC}));
-}
-
-sub write($$$) {
- my ($prefix, $t, $f) = @_;
-
- eval { commands::cp("-f", "$prefix/usr/share/zoneinfo/$t->{timezone}", "$prefix/etc/localtime") };
- $@ and log::l("installing /etc/localtime failed");
- setVarsInSh($f, {
- ZONE => $t->{timezone},
- UTC => bool2text($t->{UTC}),
- ARC => "false",
- });
-}
-
my %l2t = (
-'Brezhoneg (Brittany)' => 'Europe/Paris',
-'Chinese (China)' => 'Asia/Shanghai',
-'Croatian (Bosnia)' => 'Europe/Sarajevo',
-'Croatian (Croatia)' => 'Europe/Zagreb',
'Danish (Denmark)' => 'Europe/Copenhagen',
-'Dutch (Netherlands)' => 'Europe/Amsterdam',
'English (USA)' => 'America/New_York',
'English (UK)' => 'Europe/London',
-'Esperanto' => 'Europe/Warsaw',
'Estonian (Estonia)' => 'Europe/Tallinn',
'Finnish (Finland)' => 'Europe/Helsinki',
'French (France)' => 'Europe/Paris',
'French (Belgium)' => 'Europe/Brussels',
'French (Canada)' => 'Canada/Atlantic', # or Newfoundland ? or Eastern ?
-'Gaeilge (Ireland)' => 'Europe/Dublin',
-'German (Austria)' => 'Europe/Vienna',
'German (Germany)' => 'Europe/Berlin',
-'Greek (Greece)' => 'Europe/Athens',
'Hungarian (Hungary)' => 'Europe/Budapest',
'Icelandic (Iceland)' => 'Atlantic/Reykjavik',
'Indonesian (Indonesia)' => 'Asia/Jakarta',
'Italian (Italy)' => 'Europe/Rome',
-#-'Italian (San Marino)' => 'Europe/San_Marino',
-#-'Italian (Vatican)' => 'Europe/Vatican',
-#-'Italian (Switzerland)' => 'Europe/Zurich',
-'Japanese (Japon)' => 'Asia/Tokyo',
-'Korean (Korea)' => 'Asia/Seoul',
+'Italian (San Marino)' => 'Europe/San_Marino',
+'Italian (Vatican)' => 'Europe/Vatican',
+'Italian (Switzerland)' => 'Europe/Zurich',
+'Japanese' => 'Asia/Tokyo',
'Latvian (Latvia)' => 'Europe/Riga',
'Lithuanian (Lithuania)' => 'Europe/Vilnius',
'Norwegian (Bokmaal)' => 'Europe/Oslo',
@@ -73,38 +41,11 @@ my %l2t = (
'Portuguese (Portugal)' => 'Europe/Lisbon',
'Romanian (Rumania)' => 'Europe/Bucharest',
'Russian (Russia)' => 'Europe/Moscow',
-'Serbian (Serbia)' => 'Europe/Belgrade',
'Slovak (Slovakia)' => 'Europe/Bratislava',
-'Spanish (Argentina)' => 'America/Buenos_Aires',
-'Spanish (Mexico)' => 'America/Mexico_City',
'Spanish (Spain)' => 'Europe/Madrid',
+'Swedish (Finland)' => 'Europe/Helsinki'
'Swedish (Sweden)' => 'Europe/Stockholm',
-'Thai (Thailand)' => 'Asia/Bangkok',
'Turkish (Turkey)' => 'Europe/Istanbul',
'Ukrainian (Ukraine)' => 'Europe/Kiev',
'Walon (Belgium)' => 'Europe/Brussels',
);
-
-sub bestTimezone {
- my ($langtext) = @_;
- $l2t{common::bestMatchSentence($langtext, keys %l2t)};
-}
-
-my %sex = (
-fr_FR => { '[iln]a$' => 1, '[cdilnst]e$' => 1, 'e$' => .8, 'n$' => .1, 'd$' => .05, 't$' => 0 },
-en => { 'a$' => 1, 'o$' => 0, '[ln]$' => .3, '[rs]$' => .2 },
-);
-
-
-sub sexProb($) {
- local ($_) = @_;
- my $l = $sex{$ENV{LC_ALL}} or return 0.5;
-
- my ($prob, $nb) = (0, 0);
- foreach my $k (keys %$l) {
- /$k/ and $prob += $l->{$k}, $nb++;
- }
- $nb ? $prob / $nb : 0.5;
-}
-
-1;