Labels

1) Explanation of labels
Labels are generic pieces of text that are stored by language in a central label file. Because of the use of labels for every text element in menus, forms, and reports, the layouts of these software components become language-independent. As a result, menu, form, and report layouts do not need to be stored and maintained for each language separately.
Also, all prompts and other text elements are maintained and translated in a central label file so as to be able to use and re-use these labels in the label fields of different layouts. There are a number of advantages to the labeling concept, not only in the initial software development stage, but especially in software maintenance, customization, and translation. 
These advantages are a direct result of the general objectives for the use of labels, namely:
  • to reduce the number of language-dependent software components
  • to reduce text volumes
  • to increase the consistency in terminology

1.1) Label types and label codes
Three different types of labels can be distinguished, namely:
Type 1 labels
Type 1 labels are labels with a label description that is uniquely related to a table field.
The following characteristics apply:
  • they serve as the basic label for a specific term
  • they are coded by package, module, and table field
  • the label length equals the length of the text in the development language
Type 2 labels
Type 2 labels are labels that are specific to one or more sessions.
The following characteristics apply:
  • they are coded by package, module, session, and sequence number
  • the label length equals the label field length
Type 3 labels
Type 3 labels are labels used for general terms.
The following characteristics apply:
  • they are self-explanatory, logical codes
  • the label length equals the length of the text in the development language

2) Customizing and developing labels
Labels itself are language-dependent software components and are, therefore, maintained by language. The label code itself, however, is the same for all languages. Labels are used to make language-independent forms, menus, and reports and can be linked to table fields. In addition, labels can be used in help viewer texts or as pop-up help texts.
When software is being developed or customized, labels are maintained in the development language. Once development or customization has finished and the software needs to be made available in other languages, only the label descriptions need to be translated.
Since all labels are stored by language in a central label file, it is very easy to copy this file to another language and start translating the label descriptions. The advantage is that the labels are translated in the right context. 
Once the labels have been changed, only the software components that use these labels must be converted to the runtime data dictionary to activate the changes.
The language of the user determines by which label texts the label codes will be replaced. For example, for a British user, all forms, reports, and menus will be generated by replacing the label codes with texts corresponding to English labels whereas for a French user, the label codes will be replaced by text corresponding to French labels.
The alignment (left or right) of labels on multi-occurrence forms and reports can be linked to the alignment of the associated table field. For example, if the alignment of the Item Code field changes from right to left, the alignment of the associated multi-occurrence labels will change accordingly.
2.1) Prerequisites
To be able to develop or customize labels, a number of prerequisites must be met, namely:
  • a working environment consisting of a user, company, package combination, and a current package VRC must be set up
  • a developer must be defined
Label fields can be defined for forms, reports, and menus. However, the labels used by the session generator must be defined prior to the creation of forms and reports in the Generate Sessions (ttadv2290m000) session. This is done in the Maintain Session Generator Parameters (ttadv1135m000) session.
The Maintain Label Length Conversion Factors (ttadv4124m000) session is used to define the conversion factor regarding the length of labels. This is done for all languages to be able to use the labels in languages other than the development language.
2.2) Defining labels

There are three different ways to define a label: 
1 as table field descriptions
2 as label fields on forms, reports, and menus
3 as generic terms
When table definitions and the corresponding table fields are being maintained, it is necessary to enter the table field descriptions. Once the label fields have been defined, the label field descriptions will automatically be defined as labels and stored in the label file.
When forms, reports, or menus are being maintained, label fields are defined to handle all language dependent texts on these software components. Once the label fields have been defined, the label field descriptions will automatically be defined as labels and stored in the label file.
It is also possible to define labels manually in the Maintain Labels (ttadv1140m000) session or the Maintain Labels by Package VRC (ttadv1141m000) session.

3) Maintain Labels (ttadv1140m000)
The Maintain Labels (ttadv1140m000) session is activated from the labels menu and is used to define the labels that are used for the label fields in forms, reports, menus, and table fields. For each label code, several length/height combinations are available regarding the label description. Depending on the number of available label field positions, the form, report, or menu editor will select the longest label.
Labels are also used in texts, for example the help info texts that are linked to software components. Labels are incorporated in texts by specifying a %LB variable in the text file.
Documentation and/or help information is linked to labels by means of the [H] option. To use this label help in a text, for example as pop-up help using the help viewer, a %LH variable must be defined in the text file. This option can also be activated by selecting the corresponding option in the Application drop-down menu.
The documentation and help information is stored by language, package VRC, and label code. Labels with the same language, package VRC, and label code, but with different heights and lengths share the same documentation and help information.
If the label height is more than one line, the description must be split by means of the % sign, to indicate the line break, for example:
label code tiitm001.item
height 2
length 4
description item%code
Note Type [%%] to produce % as a character.
To activate the changes that were made in the labels, a conversion to the runtime data dictionary must take place for all the components in which the labels are used.

People who read this post also read :



8 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More