lint: Ban trailing spaces in Handlebars translation tags.

This commit is contained in:
Yago González 2017-06-10 12:11:33 +02:00 committed by Tim Abbott
parent aa5f57fda9
commit 3a4c6f83fc
1 changed files with 4 additions and 0 deletions

View File

@ -397,6 +397,10 @@ def build_custom_checkers(by_lang):
'description': "Period should be part of the translatable string."},
{'pattern': '{{t ("|\') ',
'description': 'Translatable strings should not have leading spaces.'},
{'pattern': "{{t '[^']+ ' }}",
'description': 'Translatable strings should not have trailing spaces.'},
{'pattern': '{{t "[^"]+ " }}',
'description': 'Translatable strings should not have trailing spaces.'},
]
jinja2_rules = html_rules + [
{'pattern': "{% endtrans %}[\.\?!]",