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

version 1.12, 2009/01/16 15:20:29 version 1.13, 2009/06/03 16:33:15
Line 21  my $helper=0; Line 21  my $helper=0;
 # 1: display, 0: don't display  # 1: display, 0: don't display
 my $debug=0;  my $debug=0;
   
 # List of files to be ignored when synching  # List of files to be accepted as translation files for synching
 # These files don't contain actual translation phrases  # These files contain actual translation phrases.
 my @ignorefiles=(  # If you want to exclude translation files from being included
        "x_chef.pm"  # in the synching process, remove their file names from this list.
       ,"en.pm"  my @listoffiles=(
          'ar.pm'
         ,'de.pm'
         ,'es.pm'
         ,'fa.pm'
         ,'fr.pm'
         ,'he.pm'
         ,'ja.pm'
         ,'pt.pm'
         ,'ru.pm'
         ,'tr.pm'
         ,'zh.pm'
    );     );
   
 # ----------------------------------------------------------------  # ----------------------------------------------------------------
Line 74  sub readnew { Line 85  sub readnew {
     return %lexicon;      return %lexicon;
 }  }
   
 sub ignorefile {  sub takethisfile {
     my $file = shift;      my $file = shift;
     foreach my $ignfile (@ignorefiles) {      foreach my $listfile (@listoffiles) {
         if ($ignfile eq $file) { return 1 }          if ($listfile eq $file) { return 1 }
     }      }
     return 0;      return 0;
 }  }
Line 104  print "ok.\n"; Line 115  print "ok.\n";
   
 # Add all the different phrases of all translation files to master hash  # Add all the different phrases of all translation files to master hash
 foreach (<*.pm>) {  foreach (<*.pm>) {
     if (&ignorefile($_)) { next }      if (&takethisfile($_)) {
     print "  Reading '".$_."'... ";          print "  Reading '".$_."'... ";
     %master=(%master,&readlexicon($_));          %master=(%master,&readlexicon($_));
    print "ok.\n";         print "ok.\n";
       }
 }  }
   
 # Ignore all phrases found in removephrases.txt for current synchronization.  # Ignore all phrases found in removephrases.txt for current synchronization.
Line 129  print "$rm removed... ok.\n"; Line 141  print "$rm removed... ok.\n";
 print "Synchronization:\n";  print "Synchronization:\n";
 my $quotwarn=0;  my $quotwarn=0;
 foreach my $fn (<*.pm>) {  foreach my $fn (<*.pm>) {
     if (&ignorefile($fn)) { next }      if (!&takethisfile($fn)) { next }
     print "  Synching '".$fn."'... ";      print "  Synching '".$fn."'... ";
     # Build hash with all translations of current translation file      # Build hash with all translations of current translation file
     my %lang=&readlexicon($fn);      my %lang=&readlexicon($fn);

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


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