/usr/etc/gencat catfile msgfile...
installtxt converts each source-message-file into a binary format message archive. At the same time, if necessary, installtxt maintains groups of files (member files) combined into a single message archive. installtxt is normally used to create and update message archives used by the run-time message handling facility gettext.3
gencat performs the same function as installtxt, but supports the X/Open catalog source format.
installtxt creates the message archive in message-archive. If the message archive does not exist, it is created by the -c option. source-message-file contains source versions of the target strings. On successful completion of an update operation of installtxt, the message archive will have been updated with details of the formatted version of each source-message-file. If message-archive does not contain the full pathname of the run-time location of the message catalog, it will have to be moved to the appropriate locale directory before applications using the archive are activated.
gencat merges the message text source files ( msgfile...) into a formatted message catalog catfile. catfile is created if it does not already exist. If catfile does exist, its messages are included in the new catfile. If set and message numbers collide, the new message-text defined in msgfile will replace the old message text currently contained in catfile. The output formats of both message_archive and catfile are the same. However it should be noted that on a per-application basis, it is not intended that the output forms of these two utilities should be mixed, and the consequence of doing so is undefined.
The following options and modifiers apply to installtxt only. For installtxt you must indicate only one of: c, d, r, t, or, x, which may be followed by one or more Modifiers, o, u, or , v.
The options are:
source-message-file consists of one or more lines of text, with each line containing either a comment, a directive or a text line. The format of a comment line is:
"$ %s", comment
A line beginning with a dollar sign ($), followed by a blank character streated as a comment line. The format of directives is:
"$%s %s", control-type, value
Directives should be directly preceded by a dollar sign ($), and followed by an optional value. There is one blank character between the directive and its value. The following directives are recognized:
$separator : 12345:Bonjour: Mon ami
would declare the message identifier to be 12345, the target string would contain the second ":".
The format of the text line is:
"%s%s%s", message_identifier, separator_character, message_string
Each line defines a message identifier and a target string pair.
Empty lines in a source text file are ignored.
If a
message_identifier
starts with a dollar ($) character, then that dollar character must be
escaped with a backslash (\$).
Any other form of input line syntax is illegal and will cause
installtxt
to exit with the error value.
Message strings and message identifiers can contain the special characters and escape sequences as defined in the following table:
Description Symbol newline \n tab \t vertical-tab \v backspace \b carriage-return \r form-feed \f backslash \\ bit pattern \ddd
The escape sequence \ddd consists of backslash followed by 1, 2 or 3 octal digits, which are used to specify the value of the desired character. If message_identifier contains the separator character then it must be escaped with a backslash (\) character. If the character following a backslash is not one of those specified, the effect is unspecified.
Backslash, \, followed by a NEWLINE character is used to continue an individual string on the following line. Both message_identifier and message_string may be continued over lines in this way. message_string is stored in object_file in an implementation specific way. If message_string is empty, and separator is present, a null string is stored in object_file.
msgfile must be in the X/Open gencat format.
# /bin/sh script # The following creates a message archive in the file messages.general installtxt -cv messages.general input #
X/Open Portability Guide Issue 2
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97