I try django-admin.py makemessages -l zh_CN
but has error :
CommandError: Can't find msguniq. Make sure you have GNU gettext tools 0.15 or newer installed.
after I use brew install gettext,it still get wrong.
Do I need to do something? here is my terminal screenshot
Please guide me thank you.
In Ubuntu:
$ sudo apt-get install gettext
For Mac users, after installing Homebrew and gettext as @Louis Barranqueiro says (steps 1 and 2):
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install gettext
You shouldn't use brew link gettext --force
in step 3, because it is risky (as Brew advises if you try). A better workaround is to set a new PATH variable
for your virtual environment. So, in the postactivate
file, which is located in the bin folder of your virtual environment folder, type:
export TEMP_PATH=$PATH
export PATH=$PATH:/usr/local/Cellar/gettext/0.19.7/bin
Note that you have to replace 0.19.7
by the version that is installed in your machine.
And in your predeactivate
file, which is located in the same folder of postactivate
file, type:
export PATH=$TEMP_PATH
unset TEMP_PATH
Now you can use the python manage.py makemessages -l <desired_language>
without worries. :)
Cheers.
This procedure worked for me (OSX 10.11.2 - python v3.5 and Django 1.8) It should work with your configuration.
Install gettext GNU tools with Homebrew using Terminal
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install gettext
brew link gettext --force
This solution worked for me ( win. 7, 8 and 10 )
You need to download two folders:
You can find them here.
After you download them, unzip them and add the directory of the bin file of the both folders to the system variables PATH
of your pc.
You will also need a file named libstdc++-6.dll download it from here and place it in your system directory. You will find adequate details on system directory here.
And that’s it. Hope it is useful for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With