2 .\" Copyright (c) 2000-2007 AT&T Knowledge Ventures
3 .\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
4 .\" Portions Copyright (c) 2007, Sun Microsystems, Inc.
5 .TH MSGGEN 1 "Oct 9, 2007"
7 msggen \- generate a machine independent formatted message catalog
11 \fBmsggen\fR [\fB-fls\fR] \fIcatfile\fR [\fImsgfile\fR]
17 \fBmsggen\fR merges the message text source file \fImsgfile\fR into a machine
18 independent formatted message catalog \fIcatfile\fR. The file \fIcatfile\fR is
19 created if it does not already exist. If \fIcatfile\fR does exist, its messages
20 are included in the new \fIcatfile\fR. If set and message numbers collide, the
21 new message text defined in \fImsgfile\fR replaces the old message text
22 currently contained in \fIcatfile\fR.
25 Non-ASCII characters must be UTF-8 encoded. \fBiconv\fR(1) can be used to
26 convert to/from UTF-8.
30 The following options are supported:
41 List the \fBprintf\fR(3C) format signature for each message in \fIcatfile\fR. A
42 format signature is one line containing one character for each format
173 List \fIcatfile\fR in UTF-8 msgfile form.
186 Convert the \fIcatfile\fR to a message set number and print the number on the
193 The following operands are supported:
200 Machine independent formatted message catalog file.
209 Message text source file.
215 Message text source files are in \fBgencat\fR(1) format, defined as follows.
216 The fields of a message text source line are separated by a single blank
217 character. Any other blank characters are considered to be part of the
218 subsequent field. The \fBNL_*\fR constants are defined in one or both of
219 \fB<limits.h>\fR and \fB<nl_types.h>\fR\&.
223 \fB\fB$\fR \fIcomment\fR\fR
227 A line beginning with a \fB$\fR followed by a blank character is treated as a
234 \fB\fB$delset\fR \fIn comment\fR\fR
238 This line deletes message set \fIn\fR from an existing message catalog. \fIn\fR
239 denotes the set number \fB[1, NL_SETMAX]\fR. Any text following the set number
240 is treated as a comment.
246 \fB\fB$quote\fR \fIc\fR\fR
250 This line specifies an optional quote character \fIc\fR, which can be used to
251 surround message-text so that trailing spaces or empty messages are visible in
252 a message source line. By default, or if an empty \fB$quote\fR directive is
253 supplied, no quoting of message-text is recognized.
259 \fB\fB$set\fR \fIn comment\fR\fR
263 This line specifies the set identifier of the following messages until the next
264 \fB$set\fR or end-of-file (\fBEOF\fR) appears. \fIn\fR denotes the set
265 identifier, which is defined as a number in the range \fB[1, NL_SETMAX]\fR. Set
266 numbers need not be contiguous. Any text following the set identifier is
267 treated as a comment. If no \fB$set\fR directive is specified in a message text
268 source file, all messages are located in message set 1.
274 \fB\fB$translation\fR \fIidentification YYYY-MM-DD\fR\fB[,...]\fR\fR
278 Append translation information to the message catalog header. Only the newest
279 date for a given identification is retained in the catalog. Multiple
280 translation lines are combined into a single, comma-separated list.
286 \fB\fBm\fR \fImessage-text\fR\fR
290 \fBm\fR denotes the message identifier, which is defined as a number in the
291 range \fB[1, NL_MSGMAX]\fR. The message-text is stored in the message catalogue
292 with the set identifier specified by the last \fB$set\fR directive, and with
293 message identifier \fBm\fR. If the message-text is empty, and a blank character
294 field separator is present, an empty string is stored in the message catalogue.
295 If a message source line has a message number, but neither a field separator
296 nor message-text, the existing message with that number (if any) is deleted
297 from the catalogue. Message identifiers need not be contiguous. There are no
298 \fImessage-text\fR length restrictions.
308 Successful completion.
317 One or more specified jobs does not exist.
322 \fBExample 1 \fRUsing \fBmsggen\fR
325 The following example generates a message catalog \fBxxx\fR from the message
331 example% msggen xxx xxx.msg
339 Glenn Fowler, \fBgsf@research.att.com\fR
343 See \fBattributes\fR(5) for descriptions of the following attributes:
351 ATTRIBUTE TYPE ATTRIBUTE VALUE
353 Interface Stability Volatile
359 \fBgencat\fR(1), \fBiconv\fR(1), \fBmsgcc\fR(1), \fBprintf\fR(3C),