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

At startup django make messages:

./manage.py makemessages -l pt

I get:

CommandError: Can't find msguniq. Make sure you have GNU gettext tools 0.15 or newer installed.

I tried to install, but the latest version that I find using Instalation Setup is 0.14. Where can I find the latest version and how to install it?

+7
source share
3 answers

Django removed this explanation from the latest docs, and it took me a while to find it, so I pasted it here before this old documentation goes offline:

Source: Django 1.7 Documentation

Download the following zip files from GNOME servers

  • gettext-runtime-X.zip
  • gettext-tools-X.zip

X - ( 0,15 )

bin\ (, C:\Program Files\gettext-utils)

PATH:

Control Panel > System > Advanced > Environment Variables

"", "", "". C:\Program Files\gettext-utils\bin.

gettext, , , xgettext --version . Django gettext, xgettext --version, Windows, "xgettext.exe Windows".

./manage.py makemessages -l pt

+14

- . "" (32 64 ) .

PATH:

Control Panel > System > Advanced > Environment Variables

" " "", "", "". C:\Program Files\gettext-iconv\bin.

, , cmd,

"manage makemessages -l de".

, . dir "locale" settings.py

settings.py:

LOCALE_PATHS = (
    BASE_DIR + 'locale/', )
+5

I had the same problem too. After that I downloaded and installed it, and it worked. https://mlocati.imtqy.com/articles/gettext-iconv-windows.html .

+2
source

Source: https://habr.com/ru/post/1650414/


All Articles