Find untranslated strings in HTML templates

后端 未结 2 1872
说谎
说谎 2021-01-06 10:04

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<

相关标签:
2条回答
  • 2021-01-06 10:41

    You can use the builtin template parser to parse your templates, and recurse into all tags that are not instances of BlockTransTag

    0 讨论(0)
  • 2021-01-06 10:54

    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.

    0 讨论(0)
提交回复
热议问题