From: Bruno Haible Date: Fri, 9 Mar 2001 16:33:22 +0000 (+0000) Subject: A few doc tweaks. X-Git-Tag: v0.10.36~115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec140302a45f68583d6b2719da701de7e83e563c;p=thirdparty%2Fgettext.git A few doc tweaks. --- diff --git a/doc/ChangeLog b/doc/ChangeLog index fe8c3c25d..b0a84a4d7 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,12 @@ +2001-03-09 Bruno Haible + + * Makefile.am (MAKEINFO): Add 'env', to avoid shell syntax error in + texi2dvi. + + * gettext.texi (Overview): Including libintl.h is not enough. Talk + about libintl.so as well. + (Comparison): gettext_noop is never defined in libintl.h. + 2001-03-03 Bruno Haible * nls.texi (Using This Package): Rewrite paragraph about LANGUAGE. diff --git a/doc/Makefile.am b/doc/Makefile.am index d8c23e8bf..f1f0a3cac 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -21,7 +21,7 @@ AUTOMAKE_OPTIONS = 1.2 gnits SED = sed -MAKEINFO = LANG= LANGUAGE= @MAKEINFO@ +MAKEINFO = env LANG= LANGUAGE= @MAKEINFO@ info_TEXINFOS = gettext.texi gettext_TEXINFOS = iso-apdx.texi diff --git a/doc/gettext.texi b/doc/gettext.texi index 20b28f256..3709b1c70 100644 --- a/doc/gettext.texi +++ b/doc/gettext.texi @@ -633,8 +633,21 @@ or in a central header file: @noindent Doing this allows you to prepare the sources for internationalization. Later when you feel ready for the step to use the @code{gettext} library -simply remove these definitions, include @file{libintl.h} and link -against @file{libintl.a}. That is all you have to change. +simply replace these definitions by the following: + +@example +@group +#include +#define _(String) gettext (String) +#define gettext_noop(String) (String) +#define N_(String) gettext_noop (String) +@end group +@end example + +and link against @file{libintl.a} or @file{libintl.so}. Note that on +GNU systems, you don't need to link with @code{libintl} because the +@code{gettext} library functions are already contained in GNU libc. +That is all you have to change. Once the C sources have been modified, the @code{xgettext} program is used to find and extract all translatable strings, and create an @@ -3899,17 +3912,12 @@ program which does not depend on translations to be available, but which can use any that becomes available. The same procedure can be done for the @code{gettext_noop} invocations -(@pxref{Special cases}). First you can define @code{gettext_noop} to a -no-op macro and later use the definition from @file{libintl.h}. Because -this name is not used in Suns implementation of @file{libintl.h}, -you should consider the following code for your project: +(@pxref{Special cases}). One usually defines @code{gettext_noop} as a +no-op macro. So you should consider the following code for your project: @example -#ifdef gettext_noop -# define N_(String) gettext_noop (String) -#else -# define N_(String) (String) -#endif +#define gettext_noop(String) (String) +#define N_(String) gettext_noop (String) @end example @code{N_} is a short form similar to @code{_}. The @file{Makefile} in