在Django模板中插入翻译标签的工具? [英] Tool for insertion of translation tags in Django template?

查看:153
本文介绍了在Django模板中插入翻译标签的工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

像许多Django开发者一样,今天我发现自己在通过模板放入 trans blocktrans



有没有工具可以帮助我识别翻译标签候选人的文本块,并加快此过程?

解决方案

我试过使用 Django Template i18n lint ,这是我在这个答案中提到的。



找到不包含在 {%trans%}
{%blocktrans%} 标签。



尝试一下。它肯定会加快你的事情。


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?

解决方案

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.

这篇关于在Django模板中插入翻译标签的工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆