Author: esr
Date: Wed Oct 15 00:59:46 2008
New Revision: 30173
URL: http://svn.gna.org/viewcvs/wesnoth?rev=30173&view=rev
Log:
Minor bug fix for wmllint.
Modified:
trunk/data/tools/wmllint
Modified: trunk/data/tools/wmllint
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wmllint?rev=30173&r1=30172&r2=30173&view=diff
==============================================================================
--- trunk/data/tools/wmllint (original)
+++ trunk/data/tools/wmllint Wed Oct 15 00:59:46 2008
@@ -616,18 +616,19 @@
textdomains.append(i+1)
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
- elif len(textdomains) > 1:
- print '"%s", line %d: multiple textdomain strings on lines %s' % \
- (filename, textdomains[0], ", ".join(map(str, textdomains)))
- else:
- w = textdomains[0]
- print '"%s", line %d: single textdomain declaration not on line 1.' % \
- (filename, w)
- lines = [lines[w-1].lstrip()] + lines[:w-1] + lines[w:]
+ if not no_text:
+ if not textdomains:
+ print '"%s", line 1: no textdomain string' % filename
+ elif textdomains[0] == 1: # Multiples are OK if first is on line 1
+ pass
+ elif len(textdomains) > 1:
+ print '"%s", line %d: multiple textdomain strings on lines %s' % \
+ (filename, textdomains[0], ", ".join(map(str, textdomains)))
+ else:
+ w = textdomains[0]
+ print '"%s", line %d: single textdomain declaration not on line
1.' % \
+ (filename, w)
+ lines = [lines[w-1].lstrip()] + lines[:w-1] + lines[w:]
return lines
def consistency_check():
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits