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