###### PATCHTAG00 ####################################################
###      Macedonian/Makedonski   
###      => Delev Zoran <delevz@esmak.com.mk>
###### PATCHTAG10 ####################################################
  &macedonian
###### PATCHTAG20 ####################################################
  'macedonian'       => \&macedonian, 
  'makedonski'        => \&macedonian,
###### PATCHTAG30 ####################################################
# Macedonian/makedonski
   'macedonian' =>
   "  <HR NOSHADE>
    Makedonska lokalizacija - 
    <NOBR><A HREF=\"http://www.esmak.com.mk\">Delev D Zoran</A>
  <A HREF=\"mailto:delevz\@esmak.com.mk\">
  &lt;delevz\@esmak.com.mk&gt;</A></NOBR>",
# the macedonian string means: "Prepared for languages and translated to macedonian by"
###### PATCHTAG40 ####################################################
$credits::LOCALE{'macedonian'}=$credits::LOCALE{'macedonian'};
###### PATCHTAG50 ####################################################
# Macedonian

sub macedonian
{
  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=windows-1251',
     'Maximal 5 Minute Incoming Traffic'      => 'Максимален 5 минутен влезен сообраќај',
     'Maximal 5 Minute Outgoing Traffic'      => 'Максимален 5 минутен излезен сообраќај',
     'the device'                             => 'уред',
     'The statistics were last updated(.*)'   => 'Последно ажурирање на податоците$1',
     ' Average\)</B><BR>'                     => ' просек)</B><BR>',
     '<TD ALIGN=right><SMALL>Average(.*)'     => '<TD ALIGN=right><SMALL>Просечен$1',
     '<TD ALIGN=right><SMALL>Max(.*)'         => '<TD ALIGN=right><SMALL>Максимал$1',
     '<TD ALIGN=right><SMALL>Current(.*)'     => '<TD ALIGN=right><SMALL>Мoмент$1',
     'version'                                => 'верзија',
     '<B>`Daily\' Graph \((.*) Minute'        => '<B>`Дневен\' граф ($1 минути',
     '<B>`Weekly\' Graph \(30 Minute'         => '<B>`Неделен\' граф (30 минути' ,
     '<B>`Monthly\' Graph \(2 Hour'           => '<B>`Месечен\' граф (2 часа',
     '<B>`Yearly\' Graph \(1 Day'             => '<B>`Годишен\' граф (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/s',
     # '([kMG]?)([bB])/min'              => '\$1\$2/min',
     '([kMG]?)([bB])/h'                       => '$1$2/h',
     # 'Bits'                                => 'Битови',
     # 'Bytes'                              => 'Бајти'
     '&nbsp;In:</FONT>'                      => '&nbsp;Влез:</FONT>',
     '&nbsp;Out:</FONT>'                     => '&nbsp;Излез:</FONT>',
     '&nbsp;Percentage</FONT>'               => '&nbsp;Процент:</FONT>',
     'Ported to OpenVMS Alpha by'             => 'Портирано на OpenVMS од', 
     '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'   => 'Јануар',    'February'  => 'Февруар' ,    'March'     => 'Март',
      'Jan'       => 'Јан',       'Feb'       => 'Фев',         'Mar'       => 'Мар',
      'April'     => 'Април',     'May'       => 'Мај',         'June'      => 'Јуни', 
      'Apr'       => 'Апр',       'May'       => 'Мај',         'Jun'       => 'Јун',
      'July'      => 'Јули',      'August'    => 'Август',      'September' => 'Септември', 
      'Jul'       => 'Јул',       'Aug'       => 'Авг',         'Sep'       => 'Сеп', 
      'October'   => 'Октомври',  'November'  => 'Ноември',     'December'  => 'Декември', 
      'Oct'       => 'Окт',       'Nov'       => 'Ное',         '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]." 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;

  };