1mkmsgs(1)                        User Commands                       mkmsgs(1)
2
3
4

NAME

6       mkmsgs - create message files for use by gettxt
7

SYNOPSIS

9       mkmsgs [-o] [-i locale] inputstrings msgfile
10
11

DESCRIPTION

13       The mkmsgs utility is used to create a file of text strings that can be
14       accessed using the text retrieval  tools  (see  gettxt(1),  srchtxt(1),
15       exstr(1), and gettxt(3C)). It will take as input a file of text strings
16       for a particular geographic locale (see  setlocale(3C))  and  create  a
17       file  of  text  strings  in a format that can be retrieved by both get‐
18       txt(1) and gettxt(3C). By using the -i option, you can install the cre‐
19       ated   file  under  the  /usr/lib/locale/locale/LC_MESSAGES   directory
20       (locale corresponds to the language in which the text strings are writ‐
21       ten).
22
23
24       inputstrings  is  the  name of the file that contains the original text
25       strings. msgfile is the name of the output file where mkmsgs writes the
26       strings  in  a format that is readable by gettxt(1) and gettxt(3C). The
27       name of msgfile can be up to 14 characters in length, but may not  con‐
28       tain either \0 (null) or the ASCII code for / (slash) or : (colon).
29
30
31       The  input  file contains a set of text strings for the particular geo‐
32       graphic locale. Text strings are separated by a newline character. Non‐
33       graphic  characters must be represented as alphabetic escape sequences.
34       Messages are transformed and copied sequentially from  inputstrings  to
35       msgfile.  To  generate an empty message in msgfile, leave an empty line
36       at the correct place in inputstrings.
37
38
39       Strings can be changed simply by editing  the  file  inputstrings.  New
40       strings  must  be added only at the end of the file; then a new msgfile
41       file must be created and installed in the correct place. If this proce‐
42       dure  is  not  followed, the retrieval function will retrieve the wrong
43       string and software compatibility will be broken.
44

OPTIONS

46       The following options are supported:
47
48       -o            Overwrite msgfile, if it exists.
49
50
51       -i locale     Install msgfile in the /usr/lib/locale/locale/LC_MESSAGES
52                     directory.  Only someone who is super user or a member of
53                     group bin can create or overwrite files  in  this  direc‐
54                     tory.  Directories  under /usr/lib/locale will be created
55                     if they do not exist.
56
57

EXAMPLES

59       Example 1 Using the mkmsgs command.
60
61
62       The following example shows an input message source file C.str:
63
64
65         File %s:\t cannot be opened\n
66         %s: Bad directory\n
67              .
68              .
69              .
70         write error\n
71              .
72              .
73
74
75
76       Example 2 Using Input Strings From C.str to Create Text  Strings  in  a
77       File
78
79
80       The  following command uses the input strings from C.str to create text
81       strings in the appropriate format in the file UX in the current  direc‐
82       tory:
83
84
85         example% mkmsgs C.str UX
86
87
88
89       Example  3  Using Input Strings From FR.str to Create Text Strings in a
90       File
91
92
93       The following command uses the input strings from FR.str to create text
94       strings  in  the  appropriate  format  in  the file UX in the directory
95       /usr/lib/locale/fr/LC_MESSAGES:
96
97
98         example% mkmsgs -i fr FR.str UX
99
100
101
102
103       These text strings would be accessed if you  had  set  the  environment
104       variable  LC_MESSAGES=fr  and  then  invoked  one of the text retrieval
105       tools listed at the beginning of the DESCRIPTION section.
106
107

FILES

109       /usr/lib/locale/locale/LC_MESSAGES/*
110
111           message files created by mkmsgs
112
113

ATTRIBUTES

115       See attributes(5) for descriptions of the following attributes:
116
117
118
119
120       ┌───────────────────────────────────────────────────────────┐
121ATTRIBUTE TYPE                ATTRIBUTE VALUE              
122       │Availability                  SUNWloc                      │
123       └───────────────────────────────────────────────────────────┘
124

SEE ALSO

126       exstr(1),    gettxt(1),    srchtxt(1),    gettxt(3C),    setlocale(3C),
127       attributes(5)
128
129
130
131SunOS 5.11                        26 Jul 1994                        mkmsgs(1)
Impressum