mirror of https://github.com/zulip/zulip.git
lint-all: Check for untranslated placeholders in handlebars templates.
This commit is contained in:
parent
aa7fd9a07c
commit
df617225fd
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue