From d85e85c9eb34c8c4c96c1e9eb4aa093b7b83761a Mon Sep 17 00:00:00 2001 From: Umair Khan Date: Thu, 15 Dec 2016 12:33:10 +0500 Subject: [PATCH] linter: Add rule to check title attribute for i18n. Fixes #2698 --- tools/lint-all | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/lint-all b/tools/lint-all index 55eee08854..0208b4d93a 100755 --- a/tools/lint-all +++ b/tools/lint-all @@ -366,6 +366,14 @@ def build_custom_checkers(by_lang): "static/templates/settings/realm-filter-settings-admin.handlebars"])}, {'pattern': "placeholder='[^{]", 'description': "`placeholder` value should be translatable."}, + {'pattern': "title='[^{]", + 'description': "`title` value should be translatable."}, + {'pattern': 'title="[^{]', + 'exclude_line': set([ + ('templates/zerver/markdown_help.html', + ':heart:') + ]), + 'description': "`title` value should be translatable."}, ] # type: RuleList handlebars_rules = html_rules json_rules = [] # type: RuleList # fix newlines at ends of files