lint: Expand lint check for use of .text() without i18n.

Fixes #3705.
This commit is contained in:
Tim Abbott
2017-02-28 20:36:51 -08:00
parent d9ef6281fa
commit 7fb406b889
8 changed files with 49 additions and 49 deletions

View File

@@ -282,10 +282,8 @@ def build_custom_checkers(by_lang):
'frontend_tests/node_tests',
'static/js/debug.js']),
'description': 'console.log and similar should not be used in webapp'},
{'pattern': 'button\.text\(["\']',
'exclude': set(['tools/lint-all',
'frontend_tests/node_tests/templates.js']),
'description': 'Argument to button.text should be a literal string enclosed by i18n.t()'},
{'pattern': '[.]text\(["\'][a-zA-Z]',
'description': 'Strings passed to $().text should be wrapped in i18n.t() for internationalization'},
{'pattern': 'compose_error\(["\']',
'exclude': set(['tools/lint-all']),
'description': 'Argument to compose_error should be a literal string enclosed '