--- loncom/localize/localize/synch.pl 2003/10/14 17:34:04 1.6 +++ loncom/localize/localize/synch.pl 2003/11/28 02:12:05 1.7 @@ -1,4 +1,4 @@ - +#$numbered=1; sub readlexicon { my $fn=shift; @@ -57,6 +57,7 @@ foreach my $fn (<*.pm>) { print OUT $_; } if ($found) { + $i=0; print OUT "\n\#SYNC ".localtime()."\n"; foreach my $key (sort keys %master) { unless ($key) { next; } @@ -69,9 +70,20 @@ foreach my $fn (<*.pm>) { if (lc($copytrans) ne lc($key)) { $comment='# '.$copytrans; } + if ($numbered) { + $i++; + $num=' ('.$i.')'; + } else { + $num=''; + } + if ($key=~/\'/) { + $del='"'; + } else { + $del="'"; + } print OUT (< '$key', + $del$key$del +=> $del$key$num$del, $comment ENDNEW }