lint: Add rule for spacing inside Handlebars translation tags.

This commit also includes the fixes to make all Handlebars templates
compliant with the new rule.
This commit is contained in:
Yago González
2017-06-10 12:32:06 +02:00
committed by Tim Abbott
parent 3a4c6f83fc
commit 7d5d8ac61e
3 changed files with 4 additions and 2 deletions

View File

@@ -389,6 +389,8 @@ def build_custom_checkers(by_lang):
handlebars_rules = html_rules + [
{'pattern': "[<]script",
'description': "Do not use inline <script> tags here; put JavaScript in static/js instead."},
{'pattern': '{{ t ("|\')',
'description': 'There should be no spaces before the "t" in a translation tag.'},
{'pattern': "{{t '.*' }}[\.\?!]",
'description': "Period should be part of the translatable string."},
{'pattern': '{{t ".*" }}[\.\?!]',