slovenian.pmd
上传用户:shbosideng
上传日期:2013-05-04
资源大小:1555k
文件大小:5k
- ###### PATCHTAG 00 ###################################################
- ### Slovenian/Slovensko
- ### => Aljosa Us <us@sweet-sorrow.com>
- ###### PATCHTAG 10 ###################################################
- &slovenian
- ###### PATCHTAG 20 ###################################################
- 'slovenian' => &slovenian,
- ###### PATCHTAG 30 ###################################################
- # Slovenian/Slovensko
- 'slovenian' =>
- "Slovenski prevod pripravil
Aljosa Us
<a href="mailto:us@sweet-sorrow.com"><us@sweet-sorrow.com></a>",
###### PATCHTAG 40 ###################################################
- $credits::LOCALE{'slovenian'}=$credits::LOCALE{'slovenian'};
- ###### PATCHTAG 50 ###################################################
- # Slovenian
- sub slovenian
- {
- 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 =
- (
- 'iso-8859-1' => 'windows-1250',
'Maximal 5 Minute Incoming Traffic' => 'Najvecji petminutni vhodni promet',
- 'Maximal 5 Minute Outgoing Traffic' => 'Najvecji petminutni izhodni promet',
- 'the device' => 'naprava',
- 'The statistics were last updated(.*)' => 'Zadnja posodobitev podatkov:$1',
- ' Average)' => ' povprecje)',
'Average' => 'Povprecje',
'Max' => 'Maksimalno',
'Current' => 'Trenutno',
'version' => 'verzija',
- '`Daily' Graph ((.*) Minute' => 'Dnevni graf ($1 min.',
'`Weekly' Graph (30 Minute' => 'Tedenski graf (30 min.' ,
'`Monthly' Graph (2 Hour' => 'Mesecni graf (2 urno',
'`Yearly' Graph (1 Day' => 'Letni graf (1 dnevno',
'Incoming Traffic in (S+) per Second' => 'Vhodni promet v $1 na sekundo.',
- 'Outgoing Traffic in (S+) per Second' => 'Izhodni promet v $1 na sekundo.',
- 'at which time (.*) had been up for(.*)' => 'Cas od zadnjega restarta sistema $1 : $2',
- #'([kMG]?)([bB])/s' => '$1$2/s',
- #'([kMG]?)([bB])/min' => '$1$2/min',
- #'([kMG]?)([bB])/h' => '$1$2/h',
- 'Bits' => 'bitov',
- 'Bytes' => 'bytov',
- 'In' => 'Vhod',
'Out' => 'Izhod',
'Percentage' => 'Proc.',
'Ported to OpenVMS Alpha by' => 'Na OpenVMS portiral',
- 'Ported to WindowsNT by' => 'Na WindowsNT portiral',
- 'and' => 'in',
- '^GREEN' => 'Zeleno',
- 'BLUE' => 'Modro',
- 'DARK GREEN' => 'Temnozeleno',
- 'MAGENTA' => 'Vijolicasto',
- 'AMBER' => 'Oranzno'
- );
- # 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' => 'Nedelja', 'Sun' => 'Ne',
- 'Monday' => 'Ponedeljek', 'Mon' => 'Po',
- 'Tuesday' => 'Torek', 'Tue' => 'To',
- 'Wednesday' => 'Sreda', 'Wed' => 'Sr',
- 'Thursday' => 'Cetrtek', 'Thu' => 'Ce',
- 'Friday' => 'Petek', 'Fri' => 'Po',
- 'Saturday' => 'Sobota', 'Sat' => 'So'
- );
- %month =
- (
- 'January' => 'Januar', 'February' => 'Februar', 'March' => 'Marec',
- 'Jan' => 'Jan', 'Feb' => 'Feb', 'Mar' => 'Mar',
- 'April' => 'April', 'May' => 'Maj', 'June' => 'Jun',
- 'Apr' => 'Apr', 'May' => 'Maj', 'Jun' => 'Jun',
- 'July' => 'Julij', 'August' => 'Avgust', 'September' => 'September',
- 'Jul' => 'Jul', 'Aug' => 'Avg', 'Sep' => 'Sep',
- 'October' => 'Oktober','November' => 'November','December' => 'December',
- 'Oct' => 'Okt','Nov' => 'Nov','Dec' => 'Dec'
- );
- @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].",".$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;
- }
- #