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