summaryrefslogtreecommitdiffstats
path: root/gettext-tools/doc/xgettext.texi
diff options
context:
space:
mode:
Diffstat (limited to 'gettext-tools/doc/xgettext.texi')
-rw-r--r--gettext-tools/doc/xgettext.texi54
1 files changed, 54 insertions, 0 deletions
diff --git a/gettext-tools/doc/xgettext.texi b/gettext-tools/doc/xgettext.texi
index 451e25f..f01c9d2 100644
--- a/gettext-tools/doc/xgettext.texi
+++ b/gettext-tools/doc/xgettext.texi
@@ -144,6 +144,60 @@ gettext (
The second comment line will not be extracted, because there is one
blank line between the comment line and the keyword.
+@item --check[=@var{CHECK}]
+@opindex --check@r{, @code{xgettext} option}
+@cindex supported syntax checks, @code{xgettext}
+Perform a syntax check on msgid and msgid_plural. The supported checks
+are:
+
+@table @samp
+@item ellipsis-unicode
+Prefer Unicode ellipsis character over ASCII @code{...}
+
+@item space-ellipsis
+Prohibit whitespace before an ellipsis character
+
+@item quote-unicode
+Prefer Unicode quotation marks over ASCII @code{"'`}
+
+@end table
+
+The option has an effect on all input files. To enable or disable
+checks for a certain string, you can mark it with an @code{xgettext:}
+special comment in the source file. For example, if you specify the
+@code{--check=space-ellipsis} option, but want to suppress the check on
+a particular string, add the following comment:
+
+@example
+/* xgettext: no-space-ellipsis-check */
+gettext ("We really want a space before ellipsis here ...");
+@end example
+
+The @code{xgettext:} comment can be followed by flags separated with a
+comma. The possible flags are of the form @samp{[no-]@var{name}-check},
+where @var{name} is the name of a valid syntax check. If a flag is
+prefixed by @code{no-}, the meaning is negated.
+
+Some tests apply the checks to each sentence within the msgid, rather
+than the whole string. xgettext detects the end of sentence by
+performing a pattern match, which usually looks for a period followed by
+a certain number of spaces. The number is specified with the
+@code{--sentence-end} option.
+
+@item --sentence-end[=@var{TYPE}]
+@opindex --sentence-end@r{, @code{xgettext} option}
+@cindex sentence end markers, @code{xgettext}
+The supported values are:
+
+@table @samp
+@item single-space
+Expect at least one whitespace after a period
+
+@item double-space
+Expect at least two whitespaces after a period
+
+@end table
+
@end table
@subsection Language specific options