MKMSGS(1) RISC/os Reference Manual MKMSGS(1)
NAME
mkmsgs - create message files for use by gettxt
SYNOPSIS
/usr/bin/mkmsgs [ -systype systype_name ] [ -o ] inputfile
createfile
/usr/bin/mkmsgs [ -systype systype_name ] [ -o ] -i input-
file createfile locale
/bsd43/bin/mkmsgs [ -systype systype_name ] [ -o ] inputfile
createfile
/bsd43/bin/mkmsgs [ -systype systype_name ] [ -o ] -i input-
file createfile locale
DESCRIPTION
The mkmsgs utility is used to create a file of text strings
that can be accessed using the text retrieval tools (see
gettxt(1), srchtxt(1), exstr(1), and gettxt(3C)). It will
take as input a file of text strings for a particular geo-
graphic locale (see setlocale(3C)) and create a file of text
strings in a format that can be retrieved by both gettxt(1)
and gettxt(3C). A locale is a term used by the American
National Standard for Information System (ANSI) to group
information that provides behavior dependent on local con-
ventions of nationality, culture and language. In addition,
mkmsgs allows for placing the created file in the
/systypelib/locale/locale/LC_MESSAGES directory.
The directory locale can be viewed as the language in which
the text strings are written. mkmsgs must be used with the
following arguments:
inputlile the name of the file that contains the
original text strings
locale the locale the text strings belong in.
It can be viewed as the language in
which the text strings are written.
createfile the name of the file that will contain
the strings in the format that is acces-
sible to the message retrieval function.
-i indicates that the createfile should be
installed in the directory
/systype_name/lib/locale/locale/LC_MESSAGES.
-o indicates that the createfile should be
overwritten if it exists.
-systype systype_name
specifies the the root directory of the
message locale data base files.
Printed 11/19/92 Page 1
MKMSGS(1) RISC/os Reference Manual MKMSGS(1)
/usr/bin/gettxt uses the NULL string for the systype_name
default. /bsd43/bin/gettxt uses the string, "bsd43" for the
systype_name default.
The input file contains a set of text strings for the par-
ticular geographic locale. The new line character is use to
separate the text strings. Nongraphic characters must be
included as alphabetic escape sequences. Messages are
transformed and copied sequentially from inputfile to
createfile; to omit a message in createfile, an empty line
must be provided at the correct place in inputfile.
If the -i option is specified, createfile is interpreted as
a message file name in /systype/lib/locale. In this case
the locale argument is required and specifies the appropri-
ate directory in /systype/lib/locale.
New strings must be added at the end of the file and a new
file (createfile) must be created and installed in the
correct place. If this procedure is not followed, the
retrieval function may retrieve the wrong string and
software compatibility cannot be maintained.
The messages in the original file (inputfile) can be in the
following form:
string1
string2
.
.
.
stringn
Strings up to 509 bytes are supported. A string may be
changed by simply editing the file. Translating strings may
be accomplished by making a copy of the file. and editing
the list. The order of strings in the file cannot be
changed.
EXAMPLES
The following example shows an input message source file:
File %s:\t cannot be opened\n
%s: Bad directory\n
.
.
.
write error\n
Page 2 Printed 11/19/92
MKMSGS(1) RISC/os Reference Manual MKMSGS(1)
The following examples show uses of mkmsgs:
$ mkmsgs C.str UX
A file UX will be created and installed in the current
directory. The C.str file contains the original text
strings.
The command:
$ mkmsgs -i C.str UX french
will create a message file based on the message source file
C.str and write it in
/systype/lib/locale/french/LC_MESSAGES/UX. (Directories
under /lib will be created if they don't exist).
FILES
/usr/bin/mkmsgs
/bsd43/bin/mkmsgs
/systype_name/lib/locale/locale/LC_MESSAGES/* message
files created by mkmsgs
SEE ALSO
exstr(1), gettxt(1), srchtxt(1) in the RISC/os User's Refer-
ence Manual.
gettxt(3C), setlocale(3C) in the RISC/os Programmer's Refer-
ence Manual .
Printed 11/19/92 Page 3