LIB-47: I18n of error messages
http://tickets.musicbrainz.org/browse/LIB-47
This is work in progress. A bit of testing code was included so a string is printed on discid_new() invocation. That string is translated using gettext. (needs more work).
Building itself works fine on Linux with cmake and autotools. Autotools already includes near full gettext support. implementing --disable-nls and a fallback when libintl.h is not found is still missing. .pot/.po are updated with "make update-po" in po/ or with make dist.
CMake builds don't have any support for .mo generation/installation, but the binary is able to use these (when installed through other means). Shouldn't be too difficult to create targets manually though.
Not testing on other platforms was done yet.
In general this compiles on every platform now. I only had a real problem on Solaris. Autotools works, but cmake doesn't compile for me without disabling NLS manually cmake -DDISABLE_NLS=1 .. Probably because there are different versions of libc and libintl installed on the machine.
NLS can be disabled in autotools and Cmake. Libdiscid compiles just like before then. GNU/Linux has built-in libintl support so it works without additional libraries. An external Libintl and a matching iconv (possibly also external) are needed on other platforms (as dependencies). However, NLS is optional. The problem on Windows and Mac OS X is, that libintl and iconv binaries should be included in the binary distributions. Possibly with sources and license (LGPL for both, so this should be fine). We also might want to provide a build with and without NLS?
I am also not sure how it works with the locale directory. The directory is set at compile time, so this can't work with binary distributions (unless they are installed in the same location?). Possibly this can be fixed for/with Picard?
Still only autotools includes a target to update the pot/po files.
Currently "gettext" is not installed on the build server so "autopoint" is not found there.
autopoint installed on jenkins
jenkins: retest this please.
EDIT: Looks like the previous didn't work somehow. Trying again in the next comment.
retest this please