GMOMERGE(1)
NAME
gmomerge − merge a GIL file with a Message Object file and translated Help Text to produce a localized GIL file (one with translated labels and help text).
SYNOPSIS
gmomerge [ −o outputfile ] [ −l locale ] GIL_filename message_object_file
DESCRIPTION
gmomerge reads a Graphical Interface Language (GIL) file created by OpenWindows Developer’s Guide, a user interface design editor. As it reads, gmomerge replaces all user interface element labels with their translated counterparts by querying the Message Object (.mo) file using the gettext() mechanism. gmomerge also replaces all user interface help text with translated versions if the translated help text is accessible to the command. Finally, gmomerge writes out a new (translated) GIL file. By default, a new file is generated with the same name as the interface file. The original file is saved in a file by the same name but with ".original" appended to it. You can specify an alternate name for the output file by using the −o option.
message_object_file is a file generated by running $OPENWINHOME/bin/msgfmt on a Portable Object (.po) file. The message object (.mo) file must reside in ./<locale>/LC_MESSAGES where <locale> is the locale that the application is being translated to. This can be set with the -l option or with the LANG environment variable. The -l option overrides $LANG.
gmomerge will incorporate the translated help text (.info) file if the file resides in the ./<locale> directory.
Note that GIL files all end with a .G extension and message object files end with a .mo extension. gmomerge allows you to specify the GIL file, the outputfile, and the message object file with or without their respective extensions.
OPTIONS
−o outputfile
Name the output file outputfile.
−l locale
Specify which locale you are translating to. This option overrides the LANG environment variable.
EXAMPLES
To merge a base-language GIL file (my_tool.G containing english text) with its associated message object file (my_tool_labels.mo, a translated and compiled .po file) and help text file (my_tool.info) to produce a GIL file containing Japanese strings:
Create a subdirectory in the directory where the GIL files are located and the merging will take place. Use the locale that you are translating to as the name of the directory, for example, Japanese:
example% mkdir japanese
Make a subdirectory under that directory called LC_MESSAGES:
example% mkdir japanese/LC_MESSAGES
Move the message object file and help text file to their respective directories:
example% mv my_tool_labels.mo japanese/LC_MESSAGES
example% mv my_tool.info japanese
Make sure that the locale you are translating from is set using either the LANG environment variable or the -l option on the command line.
Run gmomerge:
example% $GUIDEHOME/bin/gmomerge -l japanese my_tool my_tool_labels
The result of running gmomerge is a new file called my_tool_.G which will have all of its labels and help text changed from English to Kanji. The original my_tool.G is saved in my_tool.G.original.
SEE ALSO
gettext(3), textdomain(3)
The OpenWindows Developer’s Guide User’s Manual
The Internationalized XView Programmer’s Guide
DIAGNOSTICS
gmomerge: LANG environment variable not set
gmomerge expects the LANG environment variable to be set to the locale that the GIL file is being translated to.
gmomerge: interface filename must be a valic C identifier
gmomerge encounters a filename that is an illegal identifier in C. Only Roman character filenames are valid.
gmomerge: ./LANG/LC_MESSAGES/message_object_file.mo not found
gmomerge could not find the Message Object file specified on the command line in the directory specified by the error message.
gmomerge: ./LANG/interface.info not found. Continuing to process file
gmomerge will incorporate translated text if the Help Text file is found in the specified directory. If gmomerge does not find the file, it continues to process the GIL file but it will not include any translated help text.
gmomerge: Help key KEYNAME not found in file interface.info
gmomerge encounters a KEYNAME in the GIL file that is not in the Help Text (.info) file. The .info file is corrupt.
gmomerge: Cannot find help text for help key KEYNAME in file interface.info
gmomerge finds a given help text key, but there is no help text associated with the key. The .info file is corrupt.
gmomerge: object NAME: attribute ATTRIBUTE: cannot find string
gmomerge can’t find a string it expects to describe an attribute of a user interface element described in the GIL file.
gmomerge: object NAME: attribute ATTRIBUTE: cannot find integer
gmomerge can’t find an integer it expects to describe an attribute of a user interface element described in the GIL file.
gmomerge: object NAME: attribute ATTRIBUTE: cannot find boolean
gmomerge can’t find a Boolean setting it expects to describe an attribute of a user interface element described in the GIL file.
gmomerge: object NAME: attribute ATTRIBUTE: cannot find keyword
gmomerge can’t find a keyword it expects to describe an attribute of a user interface element described in the GIL file.
gmomerge: object NAME: attribute ATTRIBUTE: cannot find start of list
gmomerge can’t find the beginning of a list it expects to describe an attribute of a user interface element described in the GIL file.
gmomerge: object NAME: attribute ATTRIBUTE: cannot find start of name
gmomerge can’t find the beginning of a name it expects to describe an attribute of a user interface element described in the GIL file.
gmomerge: object NAME: attribute ATTRIBUTE: cannot find start of object
gmomerge doesn’t find an open parenthesis at the beginning of an object definition in the GIL file.
gmomerge: object NAME: attribute ATTRIBUTE: unexpected end-of-file
gmomerge encounters a truncated GIL file or a GIL file that doesn’t end with the proper file structure.
gmomerge: object NAME: attribute ATTRIBUTE: unknown file format
gmomerge encounters a GIL file missing the file header information that identifies it as a GIL file.
gmomerge: object NAME: attribute ATTRIBUTE: unknown value
gmomerge finds an attribute in a GIL file that it doesn’t recognize, or encounters an attribute value that is not appropriate for that attribute.
gmomerge: object NAME: attribute ATTRIBUTE: unknown object
gmomerge encounters an element that specifies an owner that doesn’t exist.
gmomerge: object NAME: attribute ATTRIBUTE: not a valid C identifier
gmomerge encounters an object name that is an illegal identifier in C.
gmomerge: object NAME: attribute ATTRIBUTE: WARNING, not a C identifier, ignored
gmomerge encounters a special handler in quotes and ignores it.
BUGS
None known
SunOS — Last change: 27 May 1991