[Dwn-trans-commit] jeb-guest - r3 - /french/verification.pl
dwn-trans-commit at lists.alioth.debian.org
dwn-trans-commit at lists.alioth.debian.org
Sun Nov 23 02:20:36 UTC 2008
Author: jeb-guest
Date: Sun Nov 23 02:20:35 2008
New Revision: 3
URL: http://svn.debian.org/wsvn/dwn-trans/?sc=1&rev=3
Log:
Add common mistake verification script
Added:
french/verification.pl (with props)
Added: french/verification.pl
URL: http://svn.debian.org/wsvn/dwn-trans/french/verification.pl?rev=3&op=file
==============================================================================
--- french/verification.pl (added)
+++ french/verification.pl Sun Nov 23 02:20:35 2008
@@ -1,0 +1,34 @@
+#!env perl -w
+
+# This script check for syntax error on the DPN
+
+use Getopt::Std;
+
+getopts('f:');
+die "Usage: $0 -f <file>" if (!defined($opt_f));
+
+open(FILE, $opt_f) or die "Can't open file $opt_f : $!";
+print "The script will check for:\n";
+print "\tDouble space, notice with DS and highlighted with '__'\n";
+print "\tCase erors, notice with CE and highlighted with '__'\n";
+print "\tSpace in link, notice with SL and highlighted with '__'\n";
+print "\n";
+while(<FILE>) {
+ # Wrong space in link
+ if (/<a [^>]*?>(\s.*?|.*?\s)<\/a>/) {
+ s/(<a [^>]*?>)(\s.*?|.*?\s)(<\/a>)/$1__$2__$3/g;
+ print "SL : $_";
+ }
+ # Douple space check
+ if (/\S+ {2,}/) {
+ s/(\S+)( {2,})/$1__$2__/g;
+ print "DS : $_";
+ }
+ # Case check
+ if (/\. [a-z]/) {
+ s/\. ([a-z])/. __$1__/g;
+ print "CE : $_";
+ }
+}
+close(FILE);
+
Propchange: french/verification.pl
------------------------------------------------------------------------------
svn:executable = *
More information about the Dwn-trans-commit
mailing list