wmllint: backported better fix for bug #23217

This commit is contained in:
Elvish_Hunter 2015-04-08 22:47:10 +02:00
parent b8a55aa15b
commit a886387ad1

View file

@ -821,7 +821,6 @@ translatables = re.compile( \
"^tooltip$|" \
"^translator_comment$|" \
"^user_team_name$|" \
"^variation_name$|" \
"^type_.[a-z]*$|" \
"^range_[a-z]*$")
@ -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)' \