korean.pmd
上传用户:shbosideng
上传日期:2013-05-04
资源大小:1555k
文件大小:5k
- ###### PATCHTAG00 ####################################################
- ### Korean
- ### => Kensoon Hwang <lovesh@static.co.kr>
- ### CHOI Junho <cjh@kr.FreeBSD.org>
- ###### PATCHTAG10 ####################################################
- &korean
- ###### PATCHTAG20 ####################################################
- 'korean' => &korean,
- ###### PATCHTAG30 ####################################################
- # korean
- ,'korean' =>
- "茄臂皋矫瘤 锅开:
- <a href="mailto:lovesh@static.co.kr">炔扒鉴</a>,
- <a href="mailto:cjh@kr.FreeBSD.org">弥霖龋</a>",
- ###### PATCHTAG40 ####################################################
- $credits::LOCALE{'korean'}=$credits::LOCALE{'korean'};
- ###### PATCHTAG50 ####################################################
- # Korean
- sub korean
- {
- 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' => 'euc-kr',
- 'Maximal 5 Minute Incoming Traffic' => '5盒埃 弥措 荐脚',
- 'Maximal 5 Minute Outgoing Traffic' => '5盒埃 弥措 价脚',
- 'the device' => '厘摹',
- 'The statistics were last updated(.*)' => '弥辆 盎脚 老矫: $1',
- ' Average)' => ' 乞闭蔼 扁霖)',
- 'Average' => '乞闭',
- 'Max' => '弥措',
- 'Current' => '泅犁',
- 'version' => '滚傈',
- '`Daily' Graph ((.*) Minute' => '老埃 弊贰橇 ($1 盒 窜困',
- '`Weekly' Graph (30 Minute' => '林埃 弊贰橇 (30 盒 窜困' ,
- '`Monthly' Graph (2 Hour' => '岿埃 弊贰橇 (2 矫埃 窜困',
- '`Yearly' Graph (1 Day' => '楷埃 弊贰橇 (1 老 窜困',
- 'Incoming Traffic in (S+) per Second' => '檬寸 荐脚等 飘贰侨 ($1)',
- 'Outgoing Traffic in (S+) per Second' => '檬寸 价脚等 飘贰侨 ($1)',
- 'at which time (.*) had been up for(.*)' => '$1狼 啊悼 矫埃: $2',
- '([kMG]?)([bB])/s' => '$1$2/檬',
- '([kMG]?)([bB])/min' => '$1$2/盒',
- '([kMG]?)([bB])/h' => '$1$2/矫',
- 'Bits' => '厚飘',
- 'Bytes' => '官捞飘',
- 'In' => '荐脚',
- 'Out' => '价脚',
- 'Percentage' => '欺季飘',
- 'Ported to OpenVMS Alpha by' => 'OpenVMS Alpha 器泼',
- 'Ported to WindowsNT by' => 'WindowsNT 器泼',
- 'and' => '客',
- '^GREEN' => '踌祸',
- 'BLUE' => '没祸',
- 'DARK GREEN' => '柳茄踌祸',
- 'MAGENTA' => '盒全祸',
- 'AMBER' => '林炔祸'
- );
- # 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' => '老夸老', 'Sun' => '老',
- 'Monday' => '岿夸老', 'Mon' => '岿',
- 'Tuesday' => '拳夸老', 'Tue' => '拳',
- 'Wednesday' => '荐夸老', 'Wed' => '荐',
- 'Thursday' => '格夸老', 'Thu' => '格',
- 'Friday' => '陛夸老', 'Fri' => '陛',
- 'Saturday' => '配夸老', 'Sat' => '配'
- );
- %month =
- (
- 'January' => '1岿', 'February' => '2岿' , 'March' => '3岿',
- 'Jan' => '1岿', 'Feb' => '2岿', 'Mar' => '3岿',
- 'April' => '4岿', 'May' => '5岿', 'June' => '6岿',
- 'Apr' => '4岿', 'May' => '5岿', 'Jun' => '6岿',
- 'July' => '7岿', 'August' => '8岿', 'September' => '9岿',
- 'Jul' => '7岿', 'Aug' => '8岿', 'Sep' => '9岿',
- 'October' => '10岿', 'November' => '11岿', 'December' => '12岿',
- 'Oct' => '10岿', 'Nov' => '11岿', 'Dec' => '12岿'
- );
- @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];
- $foo[3]=$quux[0];
- $foo[4]=$quux[1];
- };
- return $foo[3]."斥 $month{$foo[2]} $foo[1]老 $wday{$foo[0]} $foo[4]";
- # return "$wday{$foo[0]} den $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;
- };