擅长:python、mysql、java
<p>问题似乎源于gettext包查找翻译的方式。对于gettext和ugettext调用,它只需在目录内查找_catalog['TEST'],而不搜索_catalog[(“TEST”,0)]。在</p>
<p>我不相信这是正确的行为,因为xgettext决定合并这两个字符串,但是我在文档中找不到任何东西来证明这种或那种方式。在</p>
<p>为了解决这个问题,我在gettext和ugettext的两个替换方法中进行monkey修补,如果简单查找失败,这将回退到(message,0)目录查找。在</p>