estonian.pmd
上传用户:shbosideng
上传日期:2013-05-04
资源大小:1555k
文件大小:5k
- ###### PATCHTAG00 ####################################################
- ### Estonian/Eesti
- ### => Klemens Kasemaa <klem@linux.ee>
- ###### PATCHTAG10 ####################################################
- &estonian
- ###### PATCHTAG20 ####################################################
- 'estonian' => &estonian,
- 'eesti' => &estonian,
- ###### PATCHTAG30 ####################################################
- # Estonian/Eesti
- 'estonian' =>
- "Tõlge eesti keelde
- <a href="http://www.linux.ee/~klem">Klemens Kasemaa</a>
- <a href="mailto:klem@linux.ee"><klem@linux.ee></a>",
- # the estonian string means: "Translation to estonian by"
- ###### PATCHTAG40 ####################################################
- $credits::LOCALE{'eesti'}=$credits::LOCALE{'estonian'};
- ###### PATCHTAG50 ####################################################
- # Estonian
- sub estonian
- {
- my $string = shift;
- return "" unless defined $string;
- my(%translations,%month,%wday);
- my($i,$j);
- my(@dollar,@quux,@foo);
-
- # regexp => replacement string NOTE does not use autovars $1,$2...
- # charset=iso-2022-jp
- %translations =
- (
- #'charset=iso-8859-1' => 'charset=iso-8859-1',
- 'Maximal 5 Minute Incoming Traffic' => '5 minuti maksimaalne sisenev liiklus',
- 'Maximal 5 Minute Outgoing Traffic' => '5 minuti maksimaalne väljuv liiklus',
- 'the device' => 'seade',
- 'The statistics were last updated(.*)' => 'Statistikat uuendati viimati$1',
- ' Average)' => ' keskmine)',
- 'Average' => 'Keskmine',
- #'Max' => 'Max',
- 'Current' => 'Hetkel',
- 'version' => 'versioon',
- '`Daily' Graph ((.*) Minute' => '`Päevane' graafik ($1 minuti',
- '`Weekly' Graph (30 Minute' => '`Nädala' graafik (30 minuti' ,
- '`Monthly' Graph (2 Hour' => '`Kuu ' graafik (2 tunni',
- '`Yearly' Graph (1 Day' => '`Aasta' graafik (1 päeva',
- 'Incoming Traffic in (S+) per Second' => 'Sisenev liiklus $1 sekundi kohta',
- 'Outgoing Traffic in (S+) per Second' => 'Väljuv liiklus $1 sekundi kohta',
- 'at which time (.*) had been up for(.*)' => 'kui $1 on katkematult töötanud$2',
- # '([kMG]?)([bB])/s' => '$1$2/s',
- # '([kMG]?)([bB])/min' => '$1$2/min',
- '([kMG]?)([bB])/h' => '$1$2/t',
- 'Bits' => 'bitti',
- 'Bytes' => 'baiti',
- 'In' => 'sisse',
- 'Out' => 'välja',
- 'Percentage' => 'protsent',
- 'Ported to OpenVMS Alpha by' => 'portis OpenVMS-le:',
- 'Ported to WindowsNT by' => 'portis WindowsNT-le:',
- 'and' => 'ja',
- '^GREEN' => 'ROHELINE',
- 'BLUE' => 'SININE',
- 'DARK GREEN' => 'TUMEROHELINE',
- 'MAGENTA' => 'LILLA',
- 'AMBER' => 'HELEROHELINE'
- );
- # maybe expansions with replacement of whitespace would be more appropriate
- foreach $i (keys %translations)
- {
- my $trans = $translations{$i};
- $trans =~ s/|/|/;
- return $string if eval " $string =~ s|${i}|${trans}| ";
- };
- %wday =
- (
- 'Sunday' => 'pühapäev', 'Sun' => 'P',
- 'Monday' => 'esmaspäev', 'Mon' => 'E',
- 'Tuesday' => 'teisipäev', 'Tue' => 'T',
- 'Wednesday' => 'kolmapäev', 'Wed' => 'K',
- 'Thursday' => 'neljapäev', 'Thu' => 'N',
- 'Friday' => 'reede', 'Fri' => 'R',
- 'Saturday' => 'laupäev', 'Sat' => 'L'
- );
- %month =
- (
- 'January' => 'jaanuar', 'February' => 'veebruar' , 'March' => 'märts',
- 'Jan' => 'jaan', 'Feb' => 'veebr', 'Mar' => 'märts',
- 'April' => 'aprill', 'May' => 'mai', 'June' => 'juuni',
- 'Apr' => 'aprill', 'May' => 'mai', 'Jun' => 'juuni',
- 'July' => 'juuli', 'August' => 'august', 'September' => 'september',
- 'Jul' => 'juuli', 'Aug' => 'aug', 'Sep' => 'sept',
- 'October' => 'oktoober', 'November' => 'november', 'December' => 'detsember',
- 'Oct' => 'okt', 'Nov' => 'nov', 'Dec' => 'dets'
- );
- @foo=($string=~/(S+),s+(S+)s+(S+)(.*)/);
- if($foo[0] && $wday{$foo[0]} && $foo[2] && $month{$foo[2]} )
- {
- if($foo[3]=~(/(.*)at(.*)/))
- {
- @quux=split(/at/,$foo[3]);
- $foo[3]=$quux[0]." kl.".$quux[1];
- };
- return "$wday{$foo[0]}, $foo[1]. $month{$foo[2]} $foo[3]";
- };
- #
- # handle two different time/date formats:
- # return "$wday, $mday $month ".($year+1900)." at $hour:$min";
- # return "$wday, $mday $month ".($year+1900)." $hour:$min:$sec GMT";
- #
- # handle nontranslated strings which ought to be translated
- # print STDERR "$_n" or print DEBUG "not translated $_";
- # but then again we might not want/need to translate all strings
-
- return $string;
- };