(gettext) msggrep Invocation
Info Catalog
(gettext) msgconv Invocation
(gettext) Manipulating
(gettext) msgfilter Invocation
9.3 Invoking the `msggrep' Program
==================================
msggrep [OPTION] [INPUTFILE]
The `msggrep' program extracts all messages of a translation catalog
that match a given pattern or belong to some given source files.
9.3.1 Input file location
-------------------------
`INPUTFILE'
Input PO file.
`-D DIRECTORY'
`--directory=DIRECTORY'
Add DIRECTORY to the list of directories. Source files are
searched relative to this list of directories. The resulting `.po'
file will be written relative to the current directory, though.
If no INPUTFILE is given or if it is `-', standard input is read.
9.3.2 Output file location
--------------------------
`-o FILE'
`--output-file=FILE'
Write output to specified file.
The results are written to standard output if no output file is
specified or if it is `-'.
9.3.3 Message selection
-----------------------
[-N SOURCEFILE]... [-M DOMAINNAME]...
[-J MSGCTXT-PATTERN [-K MSGID-PATTERN] [-T MSGSTR-PATTERN]
[-C COMMENT-PATTERN]
A message is selected if
* it comes from one of the specified source files,
* or if it comes from one of the specified domains,
* or if `-J' is given and its context (msgctxt) matches
MSGCTXT-PATTERN,
* or if `-K' is given and its key (msgid or msgid_plural) matches
MSGID-PATTERN,
* or if `-T' is given and its translation (msgstr) matches
MSGSTR-PATTERN,
* or if `-C' is given and the translator's comment matches
COMMENT-PATTERN.
When more than one selection criterion is specified, the set of
selected messages is the union of the selected messages of each
criterion.
MSGID-PATTERN or MSGSTR-PATTERN syntax:
[-E | -F] [-e PATTERN | -f FILE]...
PATTERNs are basic regular expressions by default, or extended
regular expressions if -E is given, or fixed strings if -F is given.
`-N SOURCEFILE'
`--location=SOURCEFILE'
Select messages extracted from SOURCEFILE. SOURCEFILE can be
either a literal file name or a wildcard pattern.
`-M DOMAINNAME'
`--domain=DOMAINNAME'
Select messages belonging to domain DOMAINNAME.
`-J'
`--msgctxt'
Start of patterns for the msgctxt.
`-K'
`--msgid'
Start of patterns for the msgid.
`-T'
`--msgstr'
Start of patterns for the msgstr.
`-C'
`--comment'
Start of patterns for the translator's comment.
`-X'
`--extracted-comment'
Start of patterns for the extracted comments.
`-E'
`--extended-regexp'
Specify that PATTERN is an extended regular expression.
`-F'
`--fixed-strings'
Specify that PATTERN is a set of newline-separated strings.
`-e PATTERN'
`--regexp=PATTERN'
Use PATTERN as a regular expression.
`-f FILE'
`--file=FILE'
Obtain PATTERN from FILE.
`-i'
`--ignore-case'
Ignore case distinctions.
`-v'
`--invert-match'
Output only the messages that do not match any selection
criterion, instead of the messages that match a selection
criterion.
9.3.4 Input file syntax
-----------------------
`-P'
`--properties-input'
Assume the input file is a Java ResourceBundle in Java
`.properties' syntax, not in PO file syntax.
`--stringtable-input'
Assume the input file is a NeXTstep/GNUstep localized resource
file in `.strings' syntax, not in PO file syntax.
9.3.5 Output details
--------------------
`--force-po'
Always write an output file even if it contains no message.
`--indent'
Write the .po file using indented style.
`--no-location'
Do not write `#: FILENAME:LINE' lines.
`--add-location'
Generate `#: FILENAME:LINE' lines (default).
`--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.
`-p'
`--properties-output'
Write out a Java ResourceBundle in Java `.properties' syntax. Note
that this file format doesn't support plural forms and silently
drops obsolete messages.
`--stringtable-output'
Write out a NeXTstep/GNUstep localized resource file in `.strings'
syntax. Note that this file format doesn't support plural forms.
`-w NUMBER'
`--width=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
NUMBER.
`--no-wrap'
Do not break long message lines. Message lines whose width
exceeds the output page width will not be split into several
lines. Only file reference lines which are wider than the output
page width will be split.
`--sort-output'
Generate sorted output. Note that using this option makes it much
harder for the translator to understand each message's context.
`--sort-by-file'
Sort output by file location.
9.3.6 Informative output
------------------------
`-h'
`--help'
Display this help and exit.
`-V'
`--version'
Output version information and exit.
Info Catalog
(gettext) msgconv Invocation
(gettext) Manipulating
(gettext) msgfilter Invocation
automatically generated byinfo2html