]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Document the default keywords.
authorBruno Haible <bruno@clisp.org>
Mon, 3 Apr 2006 11:20:33 +0000 (11:20 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:13:05 +0000 (12:13 +0200)
16 files changed:
gettext-tools/doc/ChangeLog
gettext-tools/doc/xgettext.texi
gettext-tools/src/x-awk.c
gettext-tools/src/x-c.c
gettext-tools/src/x-csharp.c
gettext-tools/src/x-elisp.c
gettext-tools/src/x-glade.c
gettext-tools/src/x-java.c
gettext-tools/src/x-librep.c
gettext-tools/src/x-lisp.c
gettext-tools/src/x-perl.c
gettext-tools/src/x-php.c
gettext-tools/src/x-python.c
gettext-tools/src/x-scheme.c
gettext-tools/src/x-sh.c
gettext-tools/src/x-tcl.c

index f816739f2ada961d82b018f9474db4d77a6010a7..2ebf28b6dc6920db0c255e394f63c37d45c7560f 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-01  Bruno Haible  <bruno@clisp.org>
+
+       * xgettext.texi (--keyword): Document the default keywords.
+       Suggested by Bjoern Voigt <bjoern@cs.tu-berlin.de>.
+
 2006-03-28  Bruno Haible  <bruno@clisp.org>
 
        * msgfilter.texi: Explain built-in filters and recode-sr-latin.
index e8e2b00ed5c242ee9c6266f6fdc7c09674557358..f5eeccbc198fa135b77dcf5bcb365f8302c887a0 100644 (file)
@@ -176,17 +176,77 @@ extracting a message from the specified argument strings, adds an extracted
 comment @var{xcomment} to the message.  Note that when used through a normal
 shell command line, the double-quotes around the @var{xcomment} need to be
 escaped.
-@*
+
+This option has an effect with most languages, namely C, C++, ObjectiveC,
+Shell, Python, Lisp, EmacsLisp, librep, Java, C#, awk, Tcl, Perl, PHP,
+GCC-source, Glade.
+
 The default keyword specifications, which are always looked for if not
-explicitly disabled, are @code{gettext}, @code{dgettext:2},
+explicitly disabled, are language dependent.  They are:
+
+@itemize
+@item
+For C, C++, and GCC-source: @code{gettext}, @code{dgettext:2},
 @code{dcgettext:2}, @code{ngettext:1,2}, @code{dngettext:2,3},
 @code{dcngettext:2,3}, @code{gettext_noop}, and @code{pgettext:1c,2},
 @code{dpgettext:2c,3}, @code{dcpgettext:2c,3}, @code{npgettext:1c,2,3},
 @code{dnpgettext:2c,3,4}, @code{dcnpgettext:2c,3,4}.
-@*
-This option has an effect with most languages, namely C, C++, ObjectiveC,
-Shell, Python, Lisp, EmacsLisp, librep, Java, C#, awk, Tcl, Perl, PHP,
-GCC-source, Glade.
+
+@item
+For Objective C: Like for C, and also @code{NSLocalizedString}, @code{_},
+@code{NSLocalizedStaticString}, @code{__}.
+
+@item
+For Shell scripts: @code{gettext}, @code{ngettext:1,2}, @code{eval_gettext},
+@code{eval_ngettext:1,2}.
+
+@item
+For Python: @code{gettext}, @code{ugettext}, @code{dgettext:2},
+@code{ngettext:1,2}, @code{ungettext:1,2}, @code{dngettext:2,3}, @code{_}.
+
+@item
+For Lisp: @code{gettext}, @code{ngettext:1,2}, @code{gettext-noop}.
+
+@item
+For EmacsLisp: @code{_}.
+
+@item
+For librep: @code{_}.
+
+@item
+For Scheme: @code{gettext}, @code{ngettext:1,2}, @code{gettext-noop}.
+
+@item
+For Java: @code{GettextResource.gettext:2},
+@code{GettextResource.ngettext:2,3}, @code{gettext}, @code{ngettext:1,2},
+@code{getString}.
+
+@item
+For C#: @code{GetString}, @code{GetPluralString:1,2}.
+
+@item
+For awk: @code{dcgettext}, @code{dcngettext:1,2}.
+
+@item
+For Tcl: @code{::msgcat::mc}.
+
+@item
+For Perl: @code{gettext}, @code{%gettext}, @code{$gettext}, @code{dgettext:2},
+@code{dcgettext:2}, @code{ngettext:1,2}, @code{dngettext:2,3},
+@code{dcngettext:2,3}, @code{gettext_noop}.
+
+@item
+For PHP: @code{_}, @code{gettext}, @code{dgettext:2}, @code{dcgettext:2},
+@code{ngettext:1,2}, @code{dngettext:2,3}, @code{dcngettext:2,3}.
+
+@item
+For Glade 1: @code{label}, @code{title}, @code{text}, @code{format},
+@code{copyright}, @code{comments}, @code{preview_text}, @code{tooltip}.
+@end itemize
+
+To disable the default keyword specifications, the option @samp{-k} or
+@samp{--keyword} or @samp{--keyword=}, without a @var{keywordspec}, can be
+used.
 
 @item --flag=@var{word}:@var{arg}:@var{flag}
 @opindex --flag@r{, @code{xgettext} option}
index ac0347cba8b921d61f90886ef19fdbea7220eb5c..50d74993d512e81625fa367f32e2beff8a2bbbfa 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext awk backend.
-   Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc.
 
    This file was written by Bruno Haible <haible@clisp.cons.org>, 2002.
 
@@ -90,6 +90,8 @@ init_keywords ()
 {
   if (default_keywords)
     {
+      /* When adding new keywords here, also update the documentation in
+        xgettext.texi!  */
       x_awk_keyword ("dcgettext");
       x_awk_keyword ("dcngettext:1,2");
       default_keywords = false;
index 31d48c6a724d8fa2002560e4fb1f888dbc805d47..4e1631209d9ad35901011a05ddbc707682262e97 100644 (file)
@@ -147,6 +147,8 @@ init_keywords ()
 {
   if (default_keywords)
     {
+      /* When adding new keywords here, also update the documentation in
+        xgettext.texi!  */
       x_c_keyword ("gettext");
       x_c_keyword ("dgettext:2");
       x_c_keyword ("dcgettext:2");
index cbdb199502f64d95d3740975964034cf11a43c6f..4d87cb9972dff7bf1ab8a9b2040589d02d71e6c6 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext C# backend.
-   Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -99,6 +99,8 @@ init_keywords ()
 {
   if (default_keywords)
     {
+      /* When adding new keywords here, also update the documentation in
+        xgettext.texi!  */
       x_csharp_keyword ("GetString");  /* Resource{Manager,Set}.GetString */
       x_csharp_keyword ("GetPluralString:1,2");        /* GettextResource{Manager,Set}.GetPluralString */
       default_keywords = false;
index c93854aa9b2b4030cd5df66bd56277132688b8df..df00643fa7d63010eb6521cdb0821494c1a5a38b 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext Emacs Lisp backend.
-   Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2005-2006 Free Software Foundation, Inc.
 
    This file was written by Bruno Haible <haible@clisp.cons.org>, 2001-2002.
 
@@ -105,6 +105,8 @@ init_keywords ()
 {
   if (default_keywords)
     {
+      /* When adding new keywords here, also update the documentation in
+        xgettext.texi!  */
       x_elisp_keyword ("_");
       default_keywords = false;
     }
index cf6bc615b45340b639b80ce6db198f71aa9fa6ba..7754ec758db449fbe940af1e3912a2b9934fb917 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext glade backend.
-   Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc.
 
    This file was written by Bruno Haible <haible@clisp.cons.org>, 2002.
 
@@ -91,6 +91,8 @@ init_keywords ()
 {
   if (default_keywords)
     {
+      /* When adding new keywords here, also update the documentation in
+        xgettext.texi!  */
       x_glade_keyword ("label");
       x_glade_keyword ("title");
       x_glade_keyword ("text");
index c113928706d8dde2489ab4fbf30b049a7396a75e..34064d498e60d03c5d2e7eb90c1fe9b022a4291b 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext Java backend.
-   Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -97,6 +97,8 @@ init_keywords ()
 {
   if (default_keywords)
     {
+      /* When adding new keywords here, also update the documentation in
+        xgettext.texi!  */
       x_java_keyword ("GettextResource.gettext:2");    /* static method */
       x_java_keyword ("GettextResource.ngettext:2,3"); /* static method */
       x_java_keyword ("gettext");
index 1a88998bc7eabab2a2a6971f934e6212def405ac..6705ced3c6c404d838c3e6a088eaf44027aa6457 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext librep backend.
-   Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2005-2006 Free Software Foundation, Inc.
 
    This file was written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
@@ -107,6 +107,8 @@ init_keywords ()
 {
   if (default_keywords)
     {
+      /* When adding new keywords here, also update the documentation in
+        xgettext.texi!  */
       x_librep_keyword ("_");
       default_keywords = false;
     }
index 19f3073618f8e6602745b25a79a6e39c007898e9..35416ee780ade7d5cdb735b00a0827dec151935d 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext Lisp backend.
-   Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2005-2006 Free Software Foundation, Inc.
 
    This file was written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
@@ -167,6 +167,8 @@ init_keywords ()
 {
   if (default_keywords)
     {
+      /* When adding new keywords here, also update the documentation in
+        xgettext.texi!  */
       x_lisp_keyword ("gettext");      /* I18N:GETTEXT */
       x_lisp_keyword ("ngettext:1,2"); /* I18N:NGETTEXT */
       x_lisp_keyword ("gettext-noop");
index 10b9337291c25c9db35a17f4de6b6f47caf3f945..3dfea728e6d4a9fe0cc04eab9a02fb33b6058f47 100644 (file)
@@ -97,6 +97,8 @@ init_keywords ()
 {
   if (default_keywords)
     {
+      /* When adding new keywords here, also update the documentation in
+        xgettext.texi!  */
       x_perl_keyword ("gettext");
       x_perl_keyword ("%gettext");
       x_perl_keyword ("$gettext");
index 90a33606708045b4c9442860df21ffb78858f92d..77c2b67a8d22abd11ec2944031167cc04ebaa283 100644 (file)
@@ -94,6 +94,8 @@ init_keywords ()
 {
   if (default_keywords)
     {
+      /* When adding new keywords here, also update the documentation in
+        xgettext.texi!  */
       x_php_keyword ("_");
       x_php_keyword ("gettext");
       x_php_keyword ("dgettext:2");
index b256a6d76403a3c17f9fe5feaa5202443c20e27e..87b49db15c888b8798600c1f89e5714530ad3b3b 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext Python backend.
-   Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc.
 
    This file was written by Bruno Haible <haible@clisp.cons.org>, 2002.
 
@@ -107,6 +107,8 @@ init_keywords ()
 {
   if (default_keywords)
     {
+      /* When adding new keywords here, also update the documentation in
+        xgettext.texi!  */
       x_python_keyword ("gettext");
       x_python_keyword ("ugettext");
       x_python_keyword ("dgettext:2");
index d678b1f43775c6d3ade2619f0ec956275baa8b17..9b33efba0e2523a1ce68c455dee079f0efb4f546 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext Scheme backend.
-   Copyright (C) 2004-2005 Free Software Foundation, Inc.
+   Copyright (C) 2004-2006 Free Software Foundation, Inc.
 
    This file was written by Bruno Haible <bruno@clisp.org>, 2004-2005.
 
@@ -126,6 +126,8 @@ init_keywords ()
 {
   if (default_keywords)
     {
+      /* When adding new keywords here, also update the documentation in
+        xgettext.texi!  */
       x_scheme_keyword ("gettext");            /* libguile/i18n.c */
       x_scheme_keyword ("ngettext:1,2");       /* libguile/i18n.c */
       x_scheme_keyword ("gettext-noop");
index 07e5d9d268d055cc2523f563980556c70b50d618..45bef34b453ce42a7a8bd39931a3ae2630c50776 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext sh backend.
-   Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -108,6 +108,8 @@ init_keywords ()
 {
   if (default_keywords)
     {
+      /* When adding new keywords here, also update the documentation in
+        xgettext.texi!  */
       x_sh_keyword ("gettext");
       x_sh_keyword ("ngettext:1,2");
       x_sh_keyword ("eval_gettext");
index 3271fdcce67f8c4411bffe7affc453388790c047..301467b2fc0aedac78a50c2b8158e234e3e38589 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext Tcl backend.
-   Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc.
 
    This file was written by Bruno Haible <haible@clisp.cons.org>, 2002.
 
@@ -110,6 +110,8 @@ init_keywords ()
 {
   if (default_keywords)
     {
+      /* When adding new keywords here, also update the documentation in
+        xgettext.texi!  */
       x_tcl_keyword ("::msgcat::mc");
       default_keywords = false;
     }