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


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

Header


Content

Posted by strgaltent on January 20, 2012 - 22:37:
Author: anonymissimus
Date: Fri Jan 20 22:37:38 2012
New Revision: 52685

URL: http://svn.gna.org/viewcvs/wesnoth?rev=52685&view=rev
Log:
Make wmllint id checks respect comma-separated lists of ids.

Another bug which I found due to the previous fix. I had added that
feature in the engine's SUF some time after the check in wmllint did
already no longer work.

Modified:
    trunk/data/tools/wmllint

Modified: trunk/data/tools/wmllint
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wmllint?rev=52685&r1=52684&r2=52685&view=diff
==============================================================================
--- trunk/data/tools/wmllint (original)
+++ trunk/data/tools/wmllint Fri Jan 20 22:37:38 2012
@@ -1293,9 +1293,15 @@
                         present.append(value)
                     elif value in ('narrator', 'unit', 'second_unit') or 
(value and value[0] in ("$", "{")):
                         continue
-                    elif preamble_seen and subtag_depth > 0 and not 
ignore_id and not in_object and not in_cfg and not in_facet and not 
in_sound_source and not in_remove_sound_source and not in_stage and not 
in_goal and not in_set_menu_item and not value in present:
-                        print '"%s", line %d: unknown \'%s\' referred to by 
id' \
-                              % (filename, i+1, value)
+                    elif preamble_seen and subtag_depth > 0 and not 
ignore_id and not in_object and not in_cfg and not in_facet and not 
in_sound_source and not in_remove_sound_source and not in_stage and not 
in_goal and not in_set_menu_item:
+                        ids = value.split(",")
+                        for j in range(len(ids)):
+                            # removal of leading whitespace of items in 
comma-separated lists
+                            # is usually supported in the mainline wesnoth 
lua scripts
+                            # not sure about trailing one
+                            if ids[j].lstrip() not in present:
+                                print '"%s", line %d: unknown \'%s\' 
referred to by id' \
+                                    % (filename, i+1, ids[j])
                 if markcheck and has_tr_mark and not ("wmllint: ignore" in 
comment or "wmllint: noconvert" in comment):
                     print '"%s", line %d: %s should not have a translation 
mark' \
                               % (filename, i+1, key)




Related Messages


Powered by MHonArc, Updated Fri Jan 20 22:40:09 2012