HP 9000 User Manual page 128

Computers
Hide thumbs Also See for 9000:
Table of Contents

Advertisement

Testing a Message Catalog
Once you have an executable program and a message catalog, you can test the
program to be sure that it retrieves messages from the correct message catalog.
If you used the "standard" message initialization, the use of
NLSPATH
makes
testing easy. For the following example, we assume:
• The executable program is named
prog.
• The catalog is opened by
catopen ("prog" ,0) .
• The original messages are in
prog.msg.
• The default value for
LANG
is null, i.e., unset.
The following script prepares test directories and catalogs:
Make a directory
mkdir ./french
Make a copy of the message text source file
cp prog.msg french.msg
Modify the messages to distinguish default messages from catalog messages
vi
~rench.msg
Generate a message catalog with the modified messages
gencat french/prog.cat french.msg
The catalog in directory
./french
is now ready for testing.
The following script tests the program for default messages and "french"
messages.
Set
NLSPATH:
NLSPATH=./YeL/YaN.cat
echo $NLSPATH
Test the default messages:
echo LANG = $LANG
export NLSPATH
The Message Catalog System 7·21
7

Advertisement

Table of Contents
loading

Table of Contents