]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Explain the syntax that xgettext understands.
authorBruno Haible <bruno@clisp.org>
Fri, 20 Oct 2006 13:29:58 +0000 (13:29 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:11 +0000 (12:14 +0200)
gettext-tools/doc/ChangeLog
gettext-tools/doc/gettext.texi

index aee3b862555c818d4495e3ae8eb3c2570458ec90..42307c0dd376f520abea5f711d2f239b2d4e5150 100644 (file)
@@ -1,3 +1,8 @@
+2006-10-20  Bruno Haible  <bruno@clisp.org>
+
+       * gettext.texi (Mark Keywords): Explain the syntax that xgettext
+       understands. Fix example of a non-translatable string.
+
 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
 
        * gettext.texi (Mark Keywords): keyword are -> keyword is.
index 3091435378d810a1fb491b5d68c3229a0c75be24..69578511bbc9ea43b4bf400da8b67da22ee6b2e4 100644 (file)
@@ -1962,11 +1962,25 @@ it does not offer it officially.  The real, genuine keyword is truly
 @noindent
 instead of merely using @samp{#include <libintl.h>}.
 
+The marking keywords @samp{gettext} and @samp{_} take the translatable
+string as sole argument.  It is also possible to define marking functions
+that take it at another argument position.  It is even possible to make
+the marked argument position depend on the total number of arguments of
+the function call; this is useful in C++.  All this is achieved using
+@code{xgettext}'s @samp{--keyword} option.
+
+Note also that long strings can be split across lines, into multiple
+adjacent string tokens.  Automatic string concatenation is performed
+at compile time according to ISO C and ISO C++; @code{xgettext} also
+supports this syntax.
+
 Later on, the maintenance is relatively easy.  If, as a programmer,
 you add or modify a string, you will have to ask yourself if the
 new or altered string requires translation, and include it within
-@samp{_()} if you think it should be translated.  @samp{"%s: %d"} is
-an example of string @emph{not} requiring translation!
+@samp{_()} if you think it should be translated.  For example, @samp{"%s"}
+is an example of string @emph{not} requiring translation.  But
+@samp{"%s: %d"} @emph{does} require translation, because in French, unlike
+in English, it's customary to put a space before a colon.
 
 @node Marking, c-format Flag, Mark Keywords, Sources
 @section Marking Translatable Strings