Bruno Haible via Gnulib discussion list <bug-gnulib@gnu.org> writes:

> This patch adds a module that defines GNULIB_LOCALEDIR.
> So that a user can e.g. configure with options
>   --prefix=$HOME --with-gnulib-prefix=/usr

I'm finally testing this, now that gnulib-l10n is in Debian and libidn2
is coming closer to a release that could make use of it.  I'm happy to
say it is working!  This is a nice improvement, it gets the version-etc
translations from the gnulib domain:

jas@kaka:~/src/libidn2$ LANG=sv_SE.UTF-8 src/idn2 --version|tail -1
Skrivet av Simon Josefsson, Tim Ruehsen.
jas@kaka:~/src/libidn2$ 

However I wonder if the automatic value of GNULIB_LOCALEDIR is the right
one.  It seems to prefer $prefix which results in

#define GNULIB_LOCALEDIR "/usr/local/share/locale"

by default, unless I specify --prefix and/or --with-gnulib-prefix.  But
I don't think gnulib.mo would never be in $prefix as /usr/local, which
means gnulib translations doesn't work without --with-gnulib-prefix.

Wouldn't it make more sense for GNULIB_LOCALEDIR to default to the
system-wide locale dir rather than the one under prefix?  I'm not sure
how to best find that, though.  'gettext --help' prints the search path,
but it is not a common tool.

This is a really small nit, and it only matters for testing.
Distributions will --prefix when building libidn2 so it will use the
same system-wide locale dir.  So I'm fine not solving this, but thought
I'd mention it for future reference anyway.

/Simon

Attachment: signature.asc
Description: PGP signature

Reply via email to