summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2001-03-09 16:33:22 +0000
committerBruno Haible <bruno@clisp.org>2001-03-09 16:33:22 +0000
commitec140302a45f68583d6b2719da701de7e83e563c (patch)
treed88763270610fbeacd9111f1e5d21836626bfc9d /doc
parentedf63307ecd52b1177274ee579502e7f4655ecd0 (diff)
downloadexternal_gettext-ec140302a45f68583d6b2719da701de7e83e563c.zip
external_gettext-ec140302a45f68583d6b2719da701de7e83e563c.tar.gz
external_gettext-ec140302a45f68583d6b2719da701de7e83e563c.tar.bz2
A few doc tweaks.
Diffstat (limited to 'doc')
-rw-r--r--doc/ChangeLog9
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/gettext.texi30
3 files changed, 29 insertions, 12 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index fe8c3c2..b0a84a4 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,12 @@
+2001-03-09 Bruno Haible <haible@clisp.cons.org>
+
+ * 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 <haible@clisp.cons.org>
* nls.texi (Using This Package): Rewrite paragraph about LANGUAGE.
diff --git a/doc/Makefile.am b/doc/Makefile.am
index d8c23e8..f1f0a3c 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 20b28f2..3709b1c 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 <libintl.h>
+#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