Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man1 / mkmsgs.1
blobdba369e8ec60b66b17713b71e4ef18296fae7830
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 1994, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH MKMSGS 1 "Jul 26, 1994"
7 .SH NAME
8 mkmsgs \- create message files for use by gettxt
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBmkmsgs\fR [\fB-o\fR] [\fB-i\fR \fIlocale\fR] \fIinputstrings\fR \fImsgfile\fR
13 .fi
15 .SH DESCRIPTION
16 .sp
17 .LP
18 The \fBmkmsgs\fR utility is used to create a file of text strings that can be
19 accessed using the text retrieval tools (see \fBgettxt\fR(1), \fBsrchtxt\fR(1),
20 \fBexstr\fR(1), and \fBgettxt\fR(3C)). It will take as input a file of text
21 strings for a particular geographic locale (see \fBsetlocale\fR(3C)) and create
22 a file of text strings in a format that can be retrieved by both
23 \fBgettxt\fR(1) and \fBgettxt\fR(3C). By using the \fB-i\fR option, you can
24 install the created file under the
25 \fB/usr/lib/\fIlocale\fR/\fR\fIlocale\fR/\fBLC_MESSAGES\fR  directory
26 (\fBlocale\fR corresponds to the language in which the text strings are
27 written).
28 .sp
29 .LP
30 \fIinputstrings\fR is the name of the file that contains the original text
31 strings. \fImsgfile\fR is the name of the output file where \fBmkmsgs\fR writes
32 the strings in a format that is readable by \fBgettxt\fR(1) and
33 \fBgettxt\fR(3C). The name of \fImsgfile\fR can be up to 14 characters in
34 length, but may not contain either \e\fB0\fR (null) or the \fBASCII\fR code for
35 \fB/\fR (slash) or \fB:\fR (colon).
36 .sp
37 .LP
38 The input file contains a set of text strings for the particular geographic
39 locale. Text strings are separated by a newline character. Nongraphic
40 characters must be represented as alphabetic escape sequences. Messages are
41 transformed and copied sequentially from \fIinputstrings\fR to \fImsgfile\fR.
42 To generate an empty message in \fImsgfile\fR, leave an empty line at the
43 correct place in \fIinputstrings\fR.
44 .sp
45 .LP
46 Strings can be changed simply by editing the file \fIinputstrings\fR. New
47 strings must be added only at the end of the file; then a new \fImsgfile\fR
48 file must be created and installed in the correct place. If this procedure is
49 not followed, the retrieval function will retrieve the wrong string and
50 software compatibility will be broken.
51 .SH OPTIONS
52 .sp
53 .LP
54 The following options are supported:
55 .sp
56 .ne 2
57 .na
58 \fB\fB-o\fR \fR
59 .ad
60 .RS 14n
61 Overwrite \fImsgfile\fR, if it exists.
62 .RE
64 .sp
65 .ne 2
66 .na
67 \fB\fB-i\fR\fI locale\fR \fR
68 .ad
69 .RS 14n
70 Install \fImsgfile\fR in the
71 \fB/usr/lib/\fIlocale\fR/\fR\fIlocale\fR/\fBLC_MESSAGES\fR  directory. Only
72 someone who is super user or a member of group \fBbin\fR can create or
73 overwrite files in this directory. Directories under
74 \fB/usr/lib/\fIlocale\fR\fR will be created if they do not exist.
75 .RE
77 .SH EXAMPLES
78 .LP
79 \fBExample 1 \fRUsing the \fBmkmsgs\fR command.
80 .sp
81 .LP
82 The following example shows an input message source file \fBC.str\fR:
84 .sp
85 .in +2
86 .nf
87 File %s:\et cannot be opened\en
88 %s: Bad directory\en
89         .
90         .
91         .
92 write error\en
93         .
94         .
95 .fi
96 .in -2
97 .sp
99 .LP
100 \fBExample 2 \fRUsing Input Strings From \fBC.str\fR to Create Text Strings in
101 a File
104 The following command uses the input strings from \fBC.str\fR to create text
105 strings in the appropriate format in the file \fB\fR\fBUX\fR in the current
106 directory:
109 .in +2
111 example% mkmsgs C.str UX
113 .in -2
117 \fBExample 3 \fRUsing Input Strings From \fBFR.str\fR to Create Text Strings in
118 a File
121 The following command uses the input strings from \fBFR.str\fR to create text
122 strings in the appropriate format in the file \fBUX\fR in the directory
123 /usr/lib/locale/fr/\fBLC_MESSAGES\fR:
126 .in +2
128 example% mkmsgs -i fr FR.str UX
130 .in -2
135 These text strings would be accessed if you had set the environment variable
136 \fBLC_MESSAGES\fR=fr and then invoked one of the text retrieval tools listed at
137 the beginning of the \fBDESCRIPTION\fR section.
139 .SH FILES
141 .ne 2
143 \fB\fB/usr/lib/locale/\fR\fBlocale\fR\fB/\fR\fBLC_MESSAGES\fR\fB/*  \fR\fR
145 .sp .6
146 .RS 4n
147 message files created by \fBmkmsgs\fR
150 .SH SEE ALSO
153 \fBexstr\fR(1), \fBgettxt\fR(1), \fBsrchtxt\fR(1), \fBgettxt\fR(3C),
154 \fBsetlocale\fR(3C), \fBattributes\fR(5)