diff options
Diffstat (limited to 'doc/msggrep.texi')
-rw-r--r-- | doc/msggrep.texi | 149 |
1 files changed, 149 insertions, 0 deletions
diff --git a/doc/msggrep.texi b/doc/msggrep.texi new file mode 100644 index 0000000..a9c48b2 --- /dev/null +++ b/doc/msggrep.texi @@ -0,0 +1,149 @@ +@example +msggrep [@var{option}] [@var{inputfile}] +@end example + +The @code{msggrep} program extracts all messages of a translation catalog +that match a given pattern or belong to some given source files. + +@subsection Input file location + +@table @samp +@item @var{inputfile} +Input PO file. + +@item -D @var{directory} +@itemx --directory=@var{directory} +Add @var{directory} to the list of directories. Source files are +searched relative to this list of directories. The resulting @file{.po} +file will be written relative to the current directory, though. + +@end table + +If no @var{inputfile} is given or if it is @samp{-}, standard input is read. + +@subsection Output file location + +@table @samp +@item -o @var{file} +@itemx --output-file=@var{file} +Write output to specified file. + +@end table + +The results are written to standard output if no output file is specified +or if it is @samp{-}. + +@subsection Message selection + +@example + [-N @var{sourcefile}]... [-M @var{domainname}]... [-K @var{msgid-pattern}] [-T @var{msgstr-pattern}] +@end example + +A message is selected if +@itemize @bullet +@item it comes from one of the specified source files, +@item or if it comes from one of the specified domains, +@item or if @samp{-K} is given and its key (msgid or msgid_plural) matches + @var{msgid-pattern}, +@item or if @samp{-T} is given and its translation (msgstr) matches + @var{msgstr-pattern}. +@end itemize + +When more than one selection criterion is specified, the set of selected +messages is the union of the selected messages of each criterion. + +@var{msgid-pattern} or @var{msgstr-pattern} syntax: +@example + [-E | -F] [-e @var{pattern} | -f @var{file}]... +@end example +@var{pattern}s are basic regular expressions by default, or extended regular +expressions if -E is given, or fixed strings if -F is given. + +@table @samp +@item -N @var{sourcefile} +@itemx --location=@var{sourcefile} +Select messages extracted from @var{sourcefile}. + +@item -M @var{domainname} +@itemx --domain=@var{domainname} +Select messages belonging to domain @var{domainname}. + +@item -K +@itemx --msgid +Start of patterns for the msgid. + +@item -T +@itemx --msgstr +Start of patterns for the msgstr. + +@item -E +@itemx --extended-regexp +Specify that @var{pattern} is an extended regular expression. + +@item -F +@itemx --fixed-strings +Specify that @var{pattern} is a set of newline-separated strings. + +@item -e @var{pattern} +@itemx --regexp=@var{pattern} +Use @var{pattern} as a regular expression. + +@item -f @var{file} +@itemx --file=@var{file} +Obtain @var{pattern} from @var{file}. + +@item -i +@itemx --ignore-case +Ignore case distinctions. + +@end table + +@subsection Output details + +@c --no-escape and --escape omitted on purpose. They are not useful. + +@table @samp +@item --force-po +Always write an output file even if it contains no message. + +@item --indent +Write the .po file using indented style. + +@item --no-location +Do not write @samp{#: @var{filename}:@var{line}} lines. + +@item --add-location +Generate @samp{#: @var{filename}:@var{line}} lines (default). + +@item --strict +Write out a strict Uniforum conforming PO file. Note that this +Uniforum format should be avoided because it doesn't support the +GNU extensions. + +@item -w @var{number} +@itemx --width=@var{number} +Set the output page width. Long strings in the output files will be +split across multiple lines in order to ensure that each line's width +(= number of screen columns) is less or equal to the given @var{number}. + +@item --sort-output +Generate sorted output. Note that using this option makes it much harder +for the translator to understand each message's context. + +@item --sort-by-file +Sort output by file location. + +@end table + +@subsection Informative output + +@table @samp +@item -h +@itemx --help +Display this help and exit. + +@item -V +@itemx --version +Output version information and exit. + +@end table |