Skip to content

Commit

Permalink
wmllint: backported better fix for bug #23217
Browse files Browse the repository at this point in the history
  • Loading branch information
Elvish-Hunter committed Apr 8, 2015
1 parent b8a55aa commit a886387
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion data/tools/wmllint
Expand Up @@ -821,7 +821,6 @@ translatables = re.compile( \
"^tooltip$|" \
"^translator_comment$|" \
"^user_team_name$|" \
"^variation_name$|" \
"^type_.[a-z]*$|" \
"^range_[a-z]*$")

Expand Down Expand Up @@ -1666,6 +1665,10 @@ def global_sanity_check(filename, lines):
pass
elif key in ('name', 'male_name', 'female_name', 'value'): # FIXME: check this someday
pass
elif key == "variation_name":
if markcheck and not has_tr_mark:
print '"%s", line %d: %s should be renamed as variation_id and/or marked as translatable' \
% (filename, i+1, key)
elif translatables.search(key):
if markcheck and has_tr_mark and lines[i].find("\"\"")>-1:
print '"%s", line %d: %s doesn`t need translation mark (translatable string is empty)' \
Expand Down

0 comments on commit a886387

Please sign in to comment.