lint-all: Check for untranslated placeholders in handlebars templates.

This commit is contained in:
Tim Abbott 2016-10-16 12:59:25 -07:00
parent aa7fd9a07c
commit df617225fd
1 changed files with 3 additions and 2 deletions

View File

@ -319,17 +319,18 @@ def build_custom_checkers(by_lang):
{'pattern': '{\w',
'description': "Missing whitespace after '{' in CSS (should be newline)."},
]) + whitespace_rules # type: RuleList
handlebars_rules = whitespace_rules
prose_style_rules = [
{'pattern': '[^\/\#\-\"]([jJ]avascript)', # exclude usage in hrefs/divs
'description': "javascript should be spelled JavaScript"},
] # type: RuleList
html_rules = whitespace_rules + prose_style_rules + [
{'pattern': 'placeholder="[^{]',
'description': "`placeholder` value should be translatable."},
'description': "`placeholder` value should be translatable.",
'exclude': "static/templates/settings/emoji-settings-admin.handlebars"},
{'pattern': "placeholder='[^{]",
'description': "`placeholder` value should be translatable."},
] # type: RuleList
handlebars_rules = html_rules
json_rules = [] # type: RuleList # fix newlines at ends of files
# It is okay that json_rules is empty, because the empty list
# ensures we'll still check JSON files for whitespace.