Translating %% with gettext and jinja2 and pyramid
问题 Doing i18n work with Python using Jinja2 and Pyramid. Seems to have a problem knowing how it should translate %%. I'm beginning to suspect the bug is in Jinja2. So I've done some more investigation and it appears the problem is more with gettext than with jinja2 as illustrated with the repl >>>gettext.gettext("98%% off %s sale") % ('holiday') '98% off holiday sale' >>>gettext.gettext("98%% off sale") '98%% off sale' >>>gettext.gettext("98% off %s sale") % ('holiday') Traceback (most recent