icelandic.pmd
上传用户:shbosideng
上传日期:2013-05-04
资源大小:1555k
文件大小:6k
- #
- # Sample Translation for mrtg ...
- #
- ######################################################################
- # Adds support for Icelandic to locales_mrtg.pm. Translate this file to
- # your language and send the translation to oetiker@ee.ethz.ch if you
- # want to integrate your translation to the existing locales_mrtg.pm
- # use
- #
- # locales_pt.pl locales_mrtg.pm yourlanguage.pt > locales_mrtg.new.pm
- #
- #####################################################################
- ###### PATCHTAG 00 ###################################################
- ### Icelandic/Islenska
- ### => Halldor Karl H鰃nason <halldor.hognason@islandssimi.is>
- ###### PATCHTAG 10 ###################################################
- &icelandic
- ###### PATCHTAG 20 ###################################################
- 'icelandic' => &icelandic,
- 'islenska' => &icelandic,
- ###### PATCHTAG 30 ###################################################
- # Icelandic/islenska
- 'icelandic' =>
- "Þýtt yfir á íslensku af
- <a href="http://www.islandssimi.is">Halldór Karl Högnason</a>
- <a href="mailto:halldor.hognason@islandssimi.is"><halldor.hognason@islandssimi.is></a>",
- ###### PATCHTAG 40 ###################################################
- $credits::LOCALE{'islenska'}=$credits::LOCALE{'icelandic'};
- ###### PATCHTAG 50 ###################################################
- # Icelandic
- sub icelandic
- {
- 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' => 'Hámarks 5 mínútna umferð inn',
- 'Maximal 5 Minute Outgoing Traffic' => 'Hámarks 5 mínútna umferð út',
- 'the device' => 't鎘ið',
- 'The statistics were last updated(.*)' => 'Gögnin voru síðast uppfærð$1',
- ' Average)' => ' Meðaltal)',
- 'Average' => 'Meðaltal',
- 'Max' => 'Hámark',
- 'Current' => 'Nú',
- 'version' => 'útgáfa',
- '`Daily' Graph ((.*) Minute' => '`Dagleg' staða ($1 mínútur',
- '`Weekly' Graph (30 Minute' => '`Vikuleg' staða (30 mínútur',
- '`Monthly' Graph (2 Hour' => '`Mánaðarleg' staða (2 klst.',
- '`Yearly' Graph (1 Day' => '`&Aarleg' staða (1 dags',
- 'Incoming Traffic in (S+) per Second' => 'Umferð inn í $1 á sekúndu',
- 'Outgoing Traffic in (S+) per Second' => 'Umferð út í $1 á sekúndu',
- 'at which time (.*) had been up for(.*)' => 'þegar $1 hafði verið uppi í$2',
- # '([kMG]?)([bB])/s' => '$1$2/sek',
- # '([kMG]?)([bB])/min' => '$1$2/mín',
- '([kMG]?)([bB])/h' => '$1$2/klst',
- # 'Bits' => 'Bitar',
- # 'Bytes' => 'Bæti'
- 'In' => 'Inn',
- 'Out' => 'Út',
- 'Percentage' => 'Prósent',
- 'Ported to OpenVMS Alpha by' => 'Staðfært á OpenVMS af',
- 'Ported to WindowsNT by' => 'Staðfært á WindowsNT af',
- 'and' => 'og',
- '^GREEN' => 'GRÆNt',
- 'BLUE' => 'BLÁTT',
- 'DARK GREEN' => 'DÖKK GRÆNN',
- 'MAGENTA' => 'BLÁRAUÐUR',
- 'AMBER' => 'GULBRÚNN'
- );
- # 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' => 'Sunnudagur', 'Sun' => 'Sun',
- 'Monday' => 'Mánudagur', 'Mon' => 'Mán',
- 'Tuesday' => 'Þriðjudagur', 'Tue' => 'Þri',
- 'Wednesday' => 'Miðvikudagur', 'Wed' => 'Mið',
- 'Thursday' => 'Fimmtudagur', 'Thu' => 'Fim',
- 'Friday' => 'Föstudagur', 'Fri' => 'Fös',
- 'Saturday' => 'Laugardagur', 'Sat' => 'Lau'
- );
- %month =
- (
- 'January' => 'Janúar', 'February' => 'Febrúar' , 'March' => 'Mars',
- 'Jan' => 'Jan', 'Feb' => 'Feb', 'Mar' => 'Mar',
- 'April' => 'Apríl', 'May' => 'Maí', 'June' => 'Júní',
- 'Apr' => 'Apr', 'May' => 'Maí', 'Jun' => 'Jún',
- 'July' => 'Júlí', 'August' => 'Ágúst', 'September' => 'September',
- 'Jul' => 'Júl', 'Aug' => 'Ágú', 'Sep' => 'Sep',
- 'October' => 'Október', 'November' => 'Nóvember', 'December' => 'Desember',
- 'Oct' => 'Okt', 'Nov' => 'Nóv', 'Dec' => 'Des'
- );
- @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]} 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;
- };