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