mail[Wesnoth-commits] r20131 - /trunk/data/tools/wmllint


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by esr on September 05, 2007 - 20:30:
Author: esr
Date: Wed Sep  5 20:29:40 2007
New Revision: 20131

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20131&view=rev
Log:
Explanatory comments for Sapient.

Modified:
    trunk/data/tools/wmllint

Modified: trunk/data/tools/wmllint
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wmllint?rev=20131&r1=20130&r2=20131&view=diff
==============================================================================
--- trunk/data/tools/wmllint (original)
+++ trunk/data/tools/wmllint Wed Sep  5 20:29:40 2007
@@ -482,6 +482,10 @@
         return s
 
 def hack_syntax(filename, lines):
+    # Syntax transformations go here.  This gets called once per WML file;
+    # the name of the file is passed as filename, text of the file as the
+    # array of strings in lines.  Modify lines in place as needed, and
+    # set modcount to nonzero when you actually change any.
     modcount = 0
     # Ensure that every attack has a translatable description."
     for i in range(len(lines)):
@@ -673,7 +677,8 @@
                     nullattack = True
                     break
             if nullattack:
-                lines = lines[:i] + lines[i+2:] 
+                lines = lines[:i] + lines[i+2:]
+    # More syntax transformations would go here.
     return (lines, modcount)
 
 # Generic machinery starts here




Related Messages


Powered by MHonArc, Updated Wed Sep 05 21:20:18 2007