Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pygettext.py and msgfmt.py on Mac OS X

I want to translate strings in my Python app on my Mac OS X 10.7. I can import the gettext module but i can't find the tools pygettext.py and msgfmt.py, which according to the Python docs should be somewhere in my Python installation.

Is the pre-installed Python version on Mac OS X 10.7 missing these tools and if yes, how can I get them?

Thanks.

like image 512
verbit Avatar asked Jul 12 '12 14:07

verbit


1 Answers

With python 3 and MacOS >= 10.9, installing gettext via homebrew won't link the libraries and this will produce the error Can't find msgfmt.

This helps:

$ brew install gettext  # if not already done
$ brew link gettext --force

Thanks to https://stackoverflow.com/a/8785138/621690

like image 164
Risadinha Avatar answered Sep 25 '22 14:09

Risadinha