]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Add some examples.
authorBruno Haible <bruno@clisp.org>
Sun, 2 Sep 2007 10:42:12 +0000 (10:42 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:03 +0000 (12:15 +0200)
gettext-tools/doc/ChangeLog
gettext-tools/doc/msgfilter.texi
gettext-tools/doc/msggrep.texi

index 82d6e0b73af513053abdaeee4a0fd238148e6560..a251ebf2461f2b66770d002d067110f9f3220de6 100644 (file)
@@ -1,3 +1,9 @@
+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.
index 1e2b3b37eafe3e742fbb4dfeef60ddc2ea2738d3..daa9d47efb31e0929ead254982854807e05e58de 100644 (file)
@@ -219,3 +219,17 @@ Display this help and exit.
 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
index 8c21a492cc6fd119babc670f233929006f762c02..34df18622c7810d1e765142499fe98c8c07d1719 100644 (file)
@@ -44,7 +44,7 @@ or if it is @samp{-}.
 
 @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
 
@@ -65,7 +65,7 @@ A message is selected if
 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
@@ -253,3 +253,33 @@ Display this help and exit.
 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