问题
Like many Django devs, today I find myself scouring through templates putting in trans
and blocktrans
as I internationalise a site.
Is there a tool that will help me identify blocks of text that are candidates for translation tags and speed this process up?
回答1:
I have tried using "Django Template i18n lint", which I found mentioned in this answer.
It does a pretty good job of finding strings which are not wrapped in {% trans %}
or
{% blocktrans %}
tags.
Try it out. It should definitely speed up things for you.
来源:https://stackoverflow.com/questions/6857293/tool-for-insertion-of-translation-tags-in-django-template