最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

jinja2 - Django-admin makemessages does not detect ngettext strings from .html files (but it detects gettext strings) - Stack Ov

programmeradmin3浏览0评论

Django-admin makemessages does not detect ngettext strings from .html files (write in jinja2), but it is able to detect them in .py files. However, the same command normally detects gettext strings everywhere (including in .html files).

I tried

django-admin makemessages -l en --ignore="*/site-packages/*" --ignore="*/django/*"

and my code in .html is

{{ ngettext( '%(num)d lesson', '%(num)d lessons', 3) | format(num=3) }}

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论