Author: esr
Date: Wed Oct 15 00:46:24 2008
New Revision: 30172

URL: http://svn.gna.org/viewcvs/wesnoth?rev=30172&view=rev
Log:
Various tweaks for wmllint hygiene.

Modified:
    trunk/data/campaigns/Descent_Into_Darkness/utils/journey.cfg
    trunk/data/campaigns/Legend_of_Wesmere/scenarios/07_Elves_last_stand.cfg
    trunk/data/campaigns/Legend_of_Wesmere/utils/ai_controller.cfg
    trunk/data/campaigns/Liberty/utils/journey.cfg
    trunk/data/tools/trackplacer
    trunk/data/tools/wmllint

Modified: trunk/data/campaigns/Descent_Into_Darkness/utils/journey.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Descent_Into_Darkness/utils/journey.cfg?rev=30172&r1=30171&r2=30172&view=diff
==============================================================================
--- trunk/data/campaigns/Descent_Into_Darkness/utils/journey.cfg (original)
+++ trunk/data/campaigns/Descent_Into_Darkness/utils/journey.cfg Wed Oct 15 
00:46:24 2008
@@ -2,6 +2,7 @@
 # Hand-hack strictly at your own risk
 #
 # trackplacer: 
map=data/campaigns/Descent_Into_Darkness/images/misc/descent-into-darkness.png
+# wmllint: no translatables
 #
 #define JOURNEY_STAGE_1
     {NEW_BATTLE 800 425}

Modified: 
trunk/data/campaigns/Legend_of_Wesmere/scenarios/07_Elves_last_stand.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Legend_of_Wesmere/scenarios/07_Elves_last_stand.cfg?rev=30172&r1=30171&r2=30172&view=diff
==============================================================================
--- trunk/data/campaigns/Legend_of_Wesmere/scenarios/07_Elves_last_stand.cfg 
(original)
+++ trunk/data/campaigns/Legend_of_Wesmere/scenarios/07_Elves_last_stand.cfg 
Wed Oct 15 00:46:24 2008
@@ -234,7 +234,7 @@
     [event]
         name=start
 
-        {SET_LABEL 33 2 (_ River Telfar)}
+        {SET_LABEL 33 2 (_ "River Telfar")}
 
         #Set locations known to the ai_controller
         #{AI_LOCATION ID NAME RANGE X Y}

Modified: trunk/data/campaigns/Legend_of_Wesmere/utils/ai_controller.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Legend_of_Wesmere/utils/ai_controller.cfg?rev=30172&r1=30171&r2=30172&view=diff
==============================================================================
--- trunk/data/campaigns/Legend_of_Wesmere/utils/ai_controller.cfg (original)
+++ trunk/data/campaigns/Legend_of_Wesmere/utils/ai_controller.cfg Wed Oct 15 
00:46:24 2008
@@ -1,10 +1,11 @@
 ## ai_controller
 #version 0.9
+# wmllint: no translatables
 
 #please use in a post prestart event (for example: start)
-#define AI_LOCATION ID NAME RANGE X Y
+#define AI_LOCATION ID NAME_STRING RADIUS X Y
     [label]
-        text={NAME}
+        text={NAME_STRING}
         x,y={X},{Y}
     [/label]
     [set_variables]
@@ -13,9 +14,9 @@
         [value]
             x={X}
             y={Y}
-            name={NAME}
+            name={NAME_STRING}
             id={ID}
-            range={RANGE}
+            range={RADIUS}
         [/value]
     [/set_variables]
 #enddef

Modified: trunk/data/campaigns/Liberty/utils/journey.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Liberty/utils/journey.cfg?rev=30172&r1=30171&r2=30172&view=diff
==============================================================================
--- trunk/data/campaigns/Liberty/utils/journey.cfg (original)
+++ trunk/data/campaigns/Liberty/utils/journey.cfg Wed Oct 15 00:46:24 2008
@@ -3,6 +3,7 @@
 # and then regenerate this instead.
 #
 # trackplacer: map=data/campaigns/Liberty/images/maps/wesnoth-liberty.png
+# wmllint: no translatables
 
 #define JOURNEY_STAGE_1
     {NEW_BATTLE 252 252}

Modified: trunk/data/tools/trackplacer
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/trackplacer?rev=30172&r1=30171&r2=30172&view=diff
==============================================================================
--- trunk/data/tools/trackplacer (original)
+++ trunk/data/tools/trackplacer Wed Oct 15 00:46:24 2008
@@ -111,6 +111,7 @@
             fp.write("# Hand-hack strictly at your own risk\n")
             fp.write("#\n")
             fp.write("# trackplacer: map=%s\n" % self.mapfile)
+            fp.write("# wmllint: no text\n")
             fp.write("#\n")
             index_tuples = zip(range(len(self.track)), self.track)
             index_tuples = filter(lambda (i, (a, x, y)): a in segmenters,

Modified: trunk/data/tools/wmllint
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wmllint?rev=30172&r1=30171&r2=30172&view=diff
==============================================================================
--- trunk/data/tools/wmllint (original)
+++ trunk/data/tools/wmllint Wed Oct 15 00:46:24 2008
@@ -79,6 +79,10 @@
 #
 # You can prevent file conversions with a comment containing
 # "wmllint: noconvert" on the same line as the filename.
+#
+# You can suppress complaints about files without an initial textdoman line
+# by embedding the magic comment "# wmllint: no translatables" in the file.
+# of course, it's a good idea to be sure this assertion is actually true.
 #
 # You can skip checks on unbalanced WML (e.g. in a macro definition) by
 # bracketing it with "wmllint: unbalanced-on" and "wmllint: unbalanced-off".
@@ -606,10 +610,13 @@
             pass
     # Check for textdomain strings; should be exactly one, on line 1
     textdomains = []
+    no_text = False
     for i in range(len(lines)):
         if "#textdomain" in lines[i]:
             textdomains.append(i+1)
-    if not textdomains:
+        elif "wmllint: no translatables":
+            no_text = True
+    if not textdomains and not no_text:
         print '"%s", line 1: no textdomain string' % filename
     elif textdomains[0] == 1:  # Multiples are OK if first is on line 1
         pass


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to