veni vidi Scripsi

Installing Gettext on Mac OS X Lion

Just now I tried to use django-admin.py makemes­sages to create a language file and got the following error: /bin/sh: xgettext: command not found. After a search on my system it turns out I don't have gettext installed.

I did some searching and found mac-ports solutions, but I'm not a big fan of them. I tried compiling myself and got the following errors:

stpncpy.c:34: error: expected declaration specifiers or ‘…’ before numeric constant
stpncpy.c:34: error:    expected ‘)’ before ‘!=’ token

stpncpy.c:34: error: expected ‘)’ before ‘?’ token

make[3]: *** [stpncpy.lo] Error 1

make[2]: *** [install] Error 2

make[1]: *** [install-recursive] Error 1

make: *** [install-recursive] Error 1

I didn't give up though and eventually found this patch through this link: https://trac.macports.org/browser/trunk/dports/devel/gettext/files/stpncpy.patch. And this worked, hurray!

Note

I downloaded gettext from http://www.gnu.org/software/gettext/ and used version 0.18.1.1.

Oh no! I've Forgotten my Django Admin Password! » « PIL, JPEG and Freetype support on Mac OS X Lion when using Virtualenv