diff options
author | Brendan O'Dea <bod@debian.org> | 2009-11-14 17:45:49 +1100 |
---|---|---|
committer | Brendan O'Dea <bod@debian.org> | 2009-11-14 17:45:49 +1100 |
commit | 00803360fdd9853123747fd2c7e30d5fab20b2f0 (patch) | |
tree | 07f4b0ca7594446d1e7d11d51a313695b89dd173 /help2man.texi | |
parent | 9ec2e29043f013bc7af84847acca78015fd100a3 (diff) | |
download | help2man-00803360fdd9853123747fd2c7e30d5fab20b2f0.tar.gz |
revise preload mechanism to not require preloadable libintl
Diffstat (limited to 'help2man.texi')
-rw-r--r-- | help2man.texi | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/help2man.texi b/help2man.texi index 8d3189b..3b15237 100644 --- a/help2man.texi +++ b/help2man.texi @@ -392,20 +392,24 @@ will not be (if installed at all) correct for the version of the program being built. A preloadable library is provided with @command{help2man} which will -intercept @code{open(2)} calls for message catalogs for the domain -given by @env{$TEXTDOMAIN} and re-map the requests to the appropriate -file under @code{./po} (or @env{$LOCALEDIR} if given). +intercept @code{gettext} calls configuring the location of message +catalogs for the domain given by @env{$TEXTDOMAIN} and override the +location to the path given by @env{$LOCALEDIR}. So for example: @example -LD_PRELOAD="hacklocaledir.so preloadable_libintl.so" TEXTDOMAIN=@var{prog} \ +mkdir -p tmp/fr/LC_MESSAGES +cp po/fr.gmo tmp/fr/LC_MESSAGES/@var{prog}.mo +LD_PRELOAD="/usr/lib/help2man/bindtextdomain.so" \ + LOCALEDIR=tmp \ + TEXTDOMAIN=@var{prog} \ help2man -L fr_FR@@euro -i @var{prog}.fr.h2m -o @var{prog}.fr.1 @var{prog} +rm -rf tmp @end example -will translate requests by @var{prog} for -@samp{/usr/share/locale/fr/LC_MESSGAES/@var{PROG}.mo} to -@samp{po/fr.gmo}. +will cause @var{prog} to load the message catalog from @samp{tmp} +rather than @samp{/usr/share/locale}. Notes: @itemize @bullet |