Mridang Agarwalla
Mridang Agarwalla

Reputation: 45088

Find untranslated strings in HTML templates

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

Answers (2)

Dustin
Dustin

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

Thomas
Thomas

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

Related Questions