How to make PoEdit correctly parse custom “ngettext” implementation?

冷暖自知 提交于 2019-11-29 04:51:09

I've found the solution, the keyword has to be defined with the following expression:

_e:1,2

Source: http://osdir.com/ml/editors.poedit.user/2008-05/msg00012.html

Actually you need to do both things above.

  • Define the keyword like '_e:1,2' AND
  • Add the plural form nplurals=2; plural=n != 1;

to the catalogue settings

Here is another solution, it is very easy to setup. Just follow the steps below:

Menu: Catalog -> Settings will open the Settings dialog. On the Project Info tab you will find "Plural Forms" at the bottom. Just copy & paste the following line in this field:

nplurals=2; plural=n != 1;

That will fix the problem perfectly. I didn't even had to rescan the sources; the correct lines automatically appeared in the PoEditer.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!