How to install gnu gettext (>0.15) on windows? So I can produce .po/.mo files in Django

后端 未结 6 918
天命终不由人
天命终不由人 2020-12-19 02:17

When runing django make messages:

./manage.py makemessages -l pt

I get:

CommandError: Can\'t find msguniq. Mak         


        
6条回答
  •  感动是毒
    2020-12-19 02:36

    Thank you, for sharing your experience. The best answer is https://stackoverflow.com/a/45574890/3786145. Just after many efforts, it is good to mention that: if you want to use this tool in Pycharm IDE such that works in a different environment(wich python path and path variable are changed (eg: OSGeo)), it is necessary to make a batch file and add these two directories to the changed path:

    path %PATH%;C:\Program Files\gettext-iconv\bin
    path %path%;C:\Program Files\gettext-iconv\lib\gettext
    SET PYCHARM="D:\Program Files\JetBrains\PyCharm 2020.2.2\bin\pycharm64.exe"
    start "PyCharm aware of get text" /B %PYCHARM% %*
    

    After running Pycharm using this batch file, go to tools/Run manage.py Task. In the appeared window write your command like this: makemessages -l 'fa_IR' for more information refer to: [1] https://www.jetbrains.com/help/idea/creating-message-files.html [2] https://silverspringenergy.com/using-pycharm-as-an-ide-for-qgis-3-plugin-development-2/

提交回复
热议问题