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