1@pindex msgcomm
2@cindex @code{msgcomm} program, usage
3@example
4msgcomm [@var{option}] [@var{inputfile}]...
5@end example
6
7@cindex find common messages
8The @code{msgcomm} program finds messages which are common to two or more
9of the specified PO files.
10By using the @code{--more-than} option, greater commonality may be requested
11before messages are printed.  Conversely, the @code{--less-than} option may be
12used to specify less commonality before messages are printed (i.e.@:
13@samp{--less-than=2} will only print the unique messages).  Translations,
14comments and extract comments will be preserved, but only from the first
15PO file to define them.  File positions from all PO files will be
16cumulated.
17
18@subsection Input file location
19
20@table @samp
21@item @var{inputfile} @dots{}
22Input files.
23
24@item -f @var{file}
25@itemx --files-from=@var{file}
26@opindex -f@r{, @code{msgcomm} option}
27@opindex --files-from@r{, @code{msgcomm} option}
28Read the names of the input files from @var{file} instead of getting
29them from the command line.
30
31@item -D @var{directory}
32@itemx --directory=@var{directory}
33@opindex -D@r{, @code{msgcomm} option}
34@opindex --directory@r{, @code{msgcomm} option}
35Add @var{directory} to the list of directories.  Source files are
36searched relative to this list of directories.  The resulting @file{.po}
37file will be written relative to the current directory, though.
38
39@end table
40
41If @var{inputfile} is @samp{-}, standard input is read.
42
43@subsection Output file location
44
45@table @samp
46@item -o @var{file}
47@itemx --output-file=@var{file}
48@opindex -o@r{, @code{msgcomm} option}
49@opindex --output-file@r{, @code{msgcomm} option}
50Write output to specified file.
51
52@end table
53
54The results are written to standard output if no output file is specified
55or if it is @samp{-}.
56
57@subsection Message selection
58
59@table @samp
60@item -< @var{number}
61@itemx --less-than=@var{number}
62@opindex -<@r{, @code{msgcomm} option}
63@opindex --less-than@r{, @code{msgcomm} option}
64Print messages with less than @var{number} definitions, defaults to infinite
65if not set.
66
67@item -> @var{number}
68@itemx --more-than=@var{number}
69@opindex ->@r{, @code{msgcomm} option}
70@opindex --more-than@r{, @code{msgcomm} option}
71Print messages with more than @var{number} definitions, defaults to 1 if not
72set.
73
74@item -u
75@itemx --unique
76@opindex -u@r{, @code{msgcomm} option}
77@opindex --unique@r{, @code{msgcomm} option}
78Shorthand for @samp{--less-than=2}.  Requests that only unique messages be
79printed.
80
81@end table
82
83@subsection Input file syntax
84
85@table @samp
86@item -P
87@itemx --properties-input
88@opindex -P@r{, @code{msgcomm} option}
89@opindex --properties-input@r{, @code{msgcomm} option}
90Assume the input files are Java ResourceBundles in Java @code{.properties}
91syntax, not in PO file syntax.
92
93@item --stringtable-input
94@opindex --stringtable-input@r{, @code{msgcomm} option}
95Assume the input files are NeXTstep/GNUstep localized resource files in
96@code{.strings} syntax, not in PO file syntax.
97
98@end table
99
100@subsection Output details
101
102@c --no-escape and --escape omitted on purpose.  They are not useful.
103
104@table @samp
105@item --force-po
106@opindex --force-po@r{, @code{msgcomm} option}
107Always write an output file even if it contains no message.
108
109@item -i
110@itemx --indent
111@opindex -i@r{, @code{msgcomm} option}
112@opindex --indent@r{, @code{msgcomm} option}
113Write the .po file using indented style.
114
115@item --no-location
116@opindex --no-location@r{, @code{msgcomm} option}
117Do not write @samp{#: @var{filename}:@var{line}} lines.
118
119@item -n
120@itemx --add-location
121@opindex -n@r{, @code{msgcomm} option}
122@opindex --add-location@r{, @code{msgcomm} option}
123Generate @samp{#: @var{filename}:@var{line}} lines (default).
124
125@item --strict
126@opindex --strict@r{, @code{msgcomm} option}
127Write out a strict Uniforum conforming PO file.  Note that this
128Uniforum format should be avoided because it doesn't support the
129GNU extensions.
130
131@item -p
132@itemx --properties-output
133@opindex -p@r{, @code{msgcomm} option}
134@opindex --properties-output@r{, @code{msgcomm} option}
135Write out a Java ResourceBundle in Java @code{.properties} syntax.  Note
136that this file format doesn't support plural forms and silently drops
137obsolete messages.
138
139@item --stringtable-output
140@opindex --stringtable-output@r{, @code{msgcomm} option}
141Write out a NeXTstep/GNUstep localized resource file in @code{.strings} syntax.
142Note that this file format doesn't support plural forms.
143
144@item -w @var{number}
145@itemx --width=@var{number}
146@opindex -w@r{, @code{msgcomm} option}
147@opindex --width@r{, @code{msgcomm} option}
148Set the output page width.  Long strings in the output files will be
149split across multiple lines in order to ensure that each line's width
150(= number of screen columns) is less or equal to the given @var{number}.
151
152@item --no-wrap
153@opindex --no-wrap@r{, @code{msgcomm} option}
154Do not break long message lines.  Message lines whose width exceeds the
155output page width will not be split into several lines.  Only file reference
156lines which are wider than the output page width will be split.
157
158@item -s
159@itemx --sort-output
160@opindex -s@r{, @code{msgcomm} option}
161@opindex --sort-output@r{, @code{msgcomm} option}
162Generate sorted output.  Note that using this option makes it much harder
163for the translator to understand each message's context.
164
165@item -F
166@itemx --sort-by-file
167@opindex -F@r{, @code{msgcomm} option}
168@opindex --sort-by-file@r{, @code{msgcomm} option}
169Sort output by file location.
170
171@item --omit-header
172@opindex --omit-header@r{, @code{msgcomm} option}
173Don't write header with @samp{msgid ""} entry.
174
175@end table
176
177@subsection Informative output
178
179@table @samp
180@item -h
181@itemx --help
182@opindex -h@r{, @code{msgcomm} option}
183@opindex --help@r{, @code{msgcomm} option}
184Display this help and exit.
185
186@item -V
187@itemx --version
188@opindex -V@r{, @code{msgcomm} option}
189@opindex --version@r{, @code{msgcomm} option}
190Output version information and exit.
191
192@end table
193