skip to main content
OpenEdge Development: Translation Manager
Preparing Data for Translation : Generating resource procedures
 
Generating resource procedures
You can create resource procedures if you want the translator to translate text in the visual context of the user interface. A resource procedure is the user‑interface shell of an original source procedure. When you create a resource procedure, the Translation Manager removes all database-access and logic information so that the resource procedure does not function like a source procedure. For example, if the translator presses a delete button on a resource procedure interface, the Visual Translator tool does not delete anything. Instead, the Visual Translator displays the Properties window that allows the translator to translate “delete” into the target language.
Note: The Translation Manager creates the layout of the resource procedure files based upon the compile-time layout of the corresponding source procedure. The resource procedures layout does not reflect any layout modifications that occur when the source procedure is run.
To create a resource procedure, the Translation Manager creates a copy of the source procedure and makes the following changes:
*Adds the code from any called include (.i) files to the main procedure. That is, the Translation Manager does not create a separate resource file for an include file. It copies the contents of the include file into every procedure that calls the include file.
*Maps DISPLAY statements to DEFINE FRAME statements.
*Changes internal text in FORM, DISPLAY, and DEFINE FRAME statements to fill‑in field widgets with VIEW-AS TEXT properties.
*Removes all the 4GL logic. For example, the Translation Manager removes all
IF . . . THEN statements.
*Removes all bindings to databases.
*Removes all triggers and internal procedures and replaces them with its own triggers and procedures.
*Replaces the file’s .p or .w extension with a .rc extension.
Before you generate resource procedures you must connect to the application databases that the source procedures use.
To create resource procedures from the source procedures listed in the procedures tab folder:
1. From the Data tab folder, choose Resources. The Resources dialog box appears:
2. Choose either the Environment File radio-set button or the Registry radio-set button. This option determines how Translation Manager stores and how you maintain font and color settings for the target language. For example:
If you choose the Environment File radio-set button, enter the pathname of the environment (.ini) file that specifies the font and color settings for the target language or choose the Registry. For example, you might specify an environment file that is similar to the files included in install-path\dlc\prolang\.
Note: If you do not enter a filename or you enter the wrong filename, the translator can view resource procedures, but the Visual Translator might display the resource procedures with the wrong font and color mapping, thereby giving the wrong feedback to the translator. For example, if the Visual Translator cannot find the proper font file, it uses the default 10‑point font, no matter what the font should be.
If you choose the Registry radio-set button (the default), enter the Windows registry basekey or subkey and the pathname for the environment (.ini) file. Instead of using a .ini file that already exists, the Windows registry creates a .ini file. If the basekey is not specified, OpenEdge searches the registry.
Translation Manager sends an environment (.ini) file to the translator whether you specify an existing environment (.ini) file or you specify the registry to create a .ini file.
For more information on environment (.ini) files and the Windows registry, see Chapter 3, “Getting Started,” and OpenEdge Getting Started: Installation and Configuration.
3. Specify whether you want to display the resource procedures as character or graphical interfaces.
4. Activate the Use Image Files option if you want the Translation Manager to display any image files when it generates the resource procedures. The Translation Manager will also include the image files in the kits you send to the translators.
5. Choose OK.
The Translation Manager deletes any existing resource procedures and generates new resource procedures in the project directory. The Translation Manager displays an alert box stating how many resource procedures it attempted to process and how many it actually processed.