Reputation: 45088
Is there way to find untranslated strings in the HTML templates of my Django application i.e. blocks of text that are not wrapped in trans
and blocktrans
tags.
Since we have many templates, it would be a very time-consuming process to go through them manually and check but if there isn't an option, I guess it has to be done the long and tedious way.
Thanks
Upvotes: 4
Views: 1013
Reputation: 1026
Found this recently, but have not tried it yet.
Doc: http://www.technomancy.org/python/django-template-i18n-lint/
Code: https://github.com/rory/django-template-i18n-lint
Looks like it hasn't been updated in a year but it might provide a good starting spot.
Upvotes: 3
Reputation: 11888
You can use the builtin template parser to parse your templates, and recurse into all tags that are not instances of BlockTransTag
Upvotes: 0