Diff for /loncom/localize/localize/synch.pl between versions 1.11 and 1.12

version 1.11, 2009/01/15 11:28:12 version 1.12, 2009/01/16 15:20:29
Line 13  my $numbered=0; Line 13  my $numbered=0;
 # Add a translation help comment after each new translation.  # Add a translation help comment after each new translation.
 # This comment contains a combination of translations which are built by using already existing translations.  # This comment contains a combination of translations which are built by using already existing translations.
 # 1: add, 0: don't add  # 1: add, 0: don't add
 my $helper=0;   my $helper=0;
   
 # Debug Mode  # Debug Mode
 # Displays additional output for debugging purposes  # Displays additional output for debugging purposes
Line 81  sub ignorefile { Line 81  sub ignorefile {
     }      }
     return 0;      return 0;
 }  }
     
   
   
 # ----------------------------------------------------------------  # ----------------------------------------------------------------
Line 127  print "$rm removed... ok.\n"; Line 127  print "$rm removed... ok.\n";
   
   
 print "Synchronization:\n";  print "Synchronization:\n";
   my $quotwarn=0;
 foreach my $fn (<*.pm>) {  foreach my $fn (<*.pm>) {
     if (&ignorefile($fn)) { next }      if (&ignorefile($fn)) { next }
     print "  Synching '".$fn."'... ";      print "  Synching '".$fn."'... ";
Line 141  foreach my $fn (<*.pm>) { Line 142  foreach my $fn (<*.pm>) {
     open(OUT,'>'.$fn) or die;      open(OUT,'>'.$fn) or die;
     my $found=0;      my $found=0;
     while (<IN>) {      while (<IN>) {
  if ($_=~/\#\s*SYNCMARKER/) { $found=1; last; }    if ($_=~/\#\s*SYNCMARKER/) { $found=1; last; }
  print OUT $_;   print OUT $_;
     }      }
     # Append missing phrases to new version of current translation file      # Append missing phrases to new version of current translation file
Line 174  foreach my $fn (<*.pm>) { Line 175  foreach my $fn (<*.pm>) {
     $num='';      $num='';
  }   }
                 # Find delimiter for key and value                  # Find delimiter for key and value
    if (($key=~/\'/) & ($key=~/\"/)) {
       $quotwarn++;
       print " Warning: Both, ' and \",occur!" if $debug;
    }
    # if (($key=~/[^\\]\'/) | ($key=~/\\\"/)) {
  if ($key=~/\'/) {   if ($key=~/\'/) {
     $dlm='"';      $dlm='"';
  } else {   } else {
Line 202  ENDNEW Line 208  ENDNEW
     print "\n" if $debug;      print "\n" if $debug;
     print"$i added... ok.\n";      print"$i added... ok.\n";
 }  }
   if ($quotwarn) {
       print "Warning: Issues expected due to occurrence of ' and \" in $quotwarn new key(s).\n";
   }
 print "Synchronization completed.\n";  print "Synchronization completed.\n";
   

Removed from v.1.11  
changed lines
  Added in v.1.12


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>