Handling percent-sign (%) in Django blocktrans tags

后端 未结 3 457
星月不相逢
星月不相逢 2021-01-12 23:55

I\'m currently localizing my Django app. All other translations work fine except percent-sign inside blocktrans tags.

In my template I have {% blocktrans %}Ori

3条回答
  •  死守一世寂寞
    2021-01-13 00:10

    Couldn't find a real solution to the problem, so I used a workaround: create a constant PERCENT_SIGN = u'%' and use that as {{ PERCENT_SIGN }} inside blocktrans-blocks.

提交回复
热议问题