+2007-09-02 Bruno Haible <bruno@clisp.org>
+
+ * msggrep.texi: Add some examples.
+ * msgfilter.texi: Likewise.
+ Suggested by Guido at <https://savannah.gnu.org/bugs/?18293>.
+
2007-09-02 Bruno Haible <bruno@clisp.org>
Implement msgctxt for C# ResourceManagers.
Output version information and exit.
@end table
+
+@subsection Examples
+
+To convert German translations to Swiss orthography (in an UTF-8 locale):
+
+@smallexample
+msgconv -t UTF-8 de.po | msgfilter sed -e 's/@ss{}/ss/g'
+@end smallexample
+
+To convert Serbian translations in Cyrillic script to Latin script:
+
+@smallexample
+msgfilter recode-sr-latin sr.po
+@end smallexample
@example
[-N @var{sourcefile}]... [-M @var{domainname}]...
- [-J @var{msgctxt-pattern} [-K @var{msgid-pattern}] [-T @var{msgstr-pattern}]
+ [-J @var{msgctxt-pattern}] [-K @var{msgid-pattern}] [-T @var{msgstr-pattern}]
[-C @var{comment-pattern}]
@end example
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:
+@var{msgctxt-pattern} or @var{msgid-pattern} or @var{msgstr-pattern} syntax:
@example
[-E | -F] [-e @var{pattern} | -f @var{file}]...
@end example
Output version information and exit.
@end table
+
+@subsection Examples
+
+To extract the messages that come from the source files
+@code{gnulib-lib/error.c} and @code{gnulib-lib/getopt.c}:
+
+@smallexample
+msggrep -N gnulib-lib/error.c -N gnulib-lib/getopt.c input.po
+@end smallexample
+
+To extract the messages that contain the string ``Please specify'' in the
+original string:
+
+@smallexample
+msggrep --msgid -F -e 'Please specify' input.po
+@end smallexample
+
+To extract the messages that have a context specifier of either ``Menu>File''
+or ``Menu>Edit'' or a submenu of them:
+
+@smallexample
+msggrep --msgctxt -E -e '^Menu>(File|Edit)' input.po
+@end smallexample
+
+To extract the messages whose translation contains one of the strings in the
+file @code{wordlist.txt}:
+
+@smallexample
+msggrep --msgstr -F -f wordlist.txt input.po
+@end smallexample