1@pindex msgmerge
2@cindex @code{msgmerge} program, usage
3@example
4msgmerge [@var{option}] @var{def}.po @var{ref}.pot
5@end example
6
7The @code{msgmerge} program merges two Uniforum style .po files together.
8The @var{def}.po file is an existing PO file with translations which will
9be taken over to the newly created file as long as they still match;
10comments will be preserved, but extracted comments and file positions will
11be discarded.  The @var{ref}.pot file is the last created PO file with
12up-to-date source references but old translations, or a PO Template file
13(generally created by @code{xgettext}); any translations or comments
14in the file will be discarded, however dot comments and file positions
15will be preserved.  Where an exact match cannot be found, fuzzy matching
16is used to produce better results.
17
18@subsection Input file location
19
20@table @samp
21@item @var{def}.po
22Translations referring to old sources.
23
24@item @var{ref}.pot
25References to the new sources.
26
27@item -D @var{directory}
28@itemx --directory=@var{directory}
29@opindex -D@r{, @code{msgmerge} option}
30@opindex --directory@r{, @code{msgmerge} option}
31Add @var{directory} to the list of directories.  Source files are
32searched relative to this list of directories.  The resulting @file{.po}
33file will be written relative to the current directory, though.
34
35@item -C @var{file}
36@itemx --compendium=@var{file}
37@opindex -C@r{, @code{msgmerge} option}
38@opindex --compendium@r{, @code{msgmerge} option}
39Specify an additional library of message translations.  @xref{Compendium}.
40This option may be specified more than once.
41
42@end table
43
44@subsection Operation mode
45
46@table @samp
47@item -U
48@itemx --update
49@opindex -U@r{, @code{msgmerge} option}
50@opindex --update@r{, @code{msgmerge} option}
51Update @var{def}.po.  Do nothing if @var{def}.po is already up to date.
52
53@end table
54
55@subsection Output file location
56
57@table @samp
58@item -o @var{file}
59@itemx --output-file=@var{file}
60@opindex -o@r{, @code{msgmerge} option}
61@opindex --output-file@r{, @code{msgmerge} option}
62Write output to specified file.
63
64@end table
65
66@cindex standard output, and @code{msgmerge} program
67The results are written to standard output if no output file is specified
68or if it is @samp{-}.
69
70@subsection Output file location in update mode
71
72The result is written back to @var{def}.po.
73
74@table @samp
75@item --backup=@var{control}
76@opindex --backup@r{, @code{msgmerge} option}
77@cindex backup old file, and @code{msgmerge} program
78Make a backup of @var{def}.po
79
80@item --suffix=@var{suffix}
81@opindex --suffix@r{, @code{msgmerge} option}
82Override the usual backup suffix.
83
84@end table
85
86@cindex version control for backup files, @code{msgmerge}
87The version control method may be selected via the @code{--backup} option
88or through the @code{VERSION_CONTROL} environment variable.  Here are the
89values:
90
91@table @samp
92@item none
93@itemx off
94Never make backups (even if @code{--backup} is given).
95
96@item numbered
97@itemx t
98Make numbered backups.
99
100@item existing
101@itemx nil
102Make numbered backups if numbered backups for this file already exist,
103otherwise make simple backups.
104
105@item simple
106@itemx never
107Always make simple backups.
108
109@end table
110
111The backup suffix is @samp{~}, unless set with @code{--suffix} or the
112@code{SIMPLE_BACKUP_SUFFIX} environment variable.
113
114@subsection Operation modifiers
115
116@table @samp
117@item -m
118@itemx --multi-domain
119@opindex -m@r{, @code{msgmerge} option}
120@opindex --multi-domain@r{, @code{msgmerge} option}
121Apply @var{ref}.pot to each of the domains in @var{def}.po.
122
123@item -N
124@itemx --no-fuzzy-matching
125@opindex -N@r{, @code{msgmerge} option}
126@opindex --no-fuzzy-matching@r{, @code{msgmerge} option}
127Do not use fuzzy matching when an exact match is not found.  This may speed
128up the operation considerably.
129
130@item --previous
131@opindex --previous@r{, @code{msgmerge} option}
132Keep the previous msgids of translated messages, marked with @samp{#|}, when
133adding the fuzzy marker to such messages.
134@end table
135
136@subsection Input file syntax
137
138@table @samp
139@item -P
140@itemx --properties-input
141@opindex -P@r{, @code{msgmerge} option}
142@opindex --properties-input@r{, @code{msgmerge} option}
143Assume the input files are Java ResourceBundles in Java @code{.properties}
144syntax, not in PO file syntax.
145
146@item --stringtable-input
147@opindex --stringtable-input@r{, @code{msgmerge} option}
148Assume the input files are NeXTstep/GNUstep localized resource files in
149@code{.strings} syntax, not in PO file syntax.
150
151@end table
152
153@subsection Output details
154
155@c --no-escape and --escape omitted on purpose.  They are not useful.
156
157@table @samp
158@item --force-po
159@opindex --force-po@r{, @code{msgmerge} option}
160Always write an output file even if it contains no message.
161
162@item -i
163@itemx --indent
164@opindex -i@r{, @code{msgmerge} option}
165@opindex --indent@r{, @code{msgmerge} option}
166Write the .po file using indented style.
167
168@item --no-location
169@opindex --no-location@r{, @code{msgmerge} option}
170Do not write @samp{#: @var{filename}:@var{line}} lines.
171
172@item --add-location
173@opindex --add-location@r{, @code{msgmerge} option}
174Generate @samp{#: @var{filename}:@var{line}} lines (default).
175
176@item --strict
177@opindex --strict@r{, @code{msgmerge} option}
178Write out a strict Uniforum conforming PO file.  Note that this
179Uniforum format should be avoided because it doesn't support the
180GNU extensions.
181
182@item -p
183@itemx --properties-output
184@opindex -p@r{, @code{msgmerge} option}
185@opindex --properties-output@r{, @code{msgmerge} option}
186Write out a Java ResourceBundle in Java @code{.properties} syntax.  Note
187that this file format doesn't support plural forms and silently drops
188obsolete messages.
189
190@item --stringtable-output
191@opindex --stringtable-output@r{, @code{msgmerge} option}
192Write out a NeXTstep/GNUstep localized resource file in @code{.strings} syntax.
193Note that this file format doesn't support plural forms.
194
195@item -w @var{number}
196@itemx --width=@var{number}
197@opindex -w@r{, @code{msgmerge} option}
198@opindex --width@r{, @code{msgmerge} option}
199Set the output page width.  Long strings in the output files will be
200split across multiple lines in order to ensure that each line's width
201(= number of screen columns) is less or equal to the given @var{number}.
202
203@item --no-wrap
204@opindex --no-wrap@r{, @code{msgmerge} option}
205Do not break long message lines.  Message lines whose width exceeds the
206output page width will not be split into several lines.  Only file reference
207lines which are wider than the output page width will be split.
208
209@item -s
210@itemx --sort-output
211@opindex -s@r{, @code{msgmerge} option}
212@opindex --sort-output@r{, @code{msgmerge} option}
213@cindex sorting @code{msgmerge} output
214Generate sorted output.  Note that using this option makes it much harder
215for the translator to understand each message's context.
216
217@item -F
218@itemx --sort-by-file
219@opindex -F@r{, @code{msgmerge} option}
220@opindex --sort-by-file@r{, @code{msgmerge} option}
221Sort output by file location.
222
223@end table
224
225@subsection Informative output
226
227@table @samp
228@item -h
229@itemx --help
230@opindex -h@r{, @code{msgmerge} option}
231@opindex --help@r{, @code{msgmerge} option}
232Display this help and exit.
233
234@item -V
235@itemx --version
236@opindex -V@r{, @code{msgmerge} option}
237@opindex --version@r{, @code{msgmerge} option}
238Output version information and exit.
239
240@item -v
241@itemx --verbose
242@opindex -v@r{, @code{msgmerge} option}
243@opindex --verbose@r{, @code{msgmerge} option}
244Increase verbosity level.
245
246@item -q
247@itemx --quiet
248@itemx --silent
249@opindex -q@r{, @code{msgmerge} option}
250@opindex --quiet@r{, @code{msgmerge} option}
251@opindex --silent@r{, @code{msgmerge} option}
252Suppress progress indicators.
253
254@end table
255