10 ATA Localization

This chapter provides information on localizing the Active Topology Automator (ATA) user interface (UI). The localization is a process of translating a UI from the original language in which it was written into a different language for use in a specific country or region.

The supported languages for ATA localization are: fr-ca, fr, es, en.

The localization process works as follows:

  • If a regional variant of one of the above languages is selected but is not available, the system rolls back to its appropriate parent language (for example: es-ar → es, en-in → en). A message appears as follows:
    The page is displayed in <parentLanguage> because <parentLanguage-regionalVariant> is not supported.
  • If a different language is selected that is not one of the above mentioned languages and has no parent language included among them, the system rolls back to English (en). A message appears as follows:
    The page is displayed in English because <selected-language> is not supported.

Localizing ATA involves modifying a specific set of files that ATA uses to display text in the UI. It requires the following files:

  • The ATA app bundle
  • The properties files in ATA API
  • The UIM app bundle

About App Bundles in ATA

The Ata app bundles are a set of .js files that contain text strings that can be localized, that define labels and messages in ATA UI. You can find the app bundles at the following location within ata-ui.jar: $BUILDER_HOME/staging/downloads/ata-ui/ataAppBundle/nls. The /root/appBundle-strings.js is the default app bundle and it contains the strings in English language.

Localizing the ATA App Bundles

To localize the ATA app bundles:

  1. Add a folder at $BUILDER_HOME/staging/downloads/ata-ui/ataAppBundle/nls/ with locale code as the name of the folder.
  2. Copy $BUILDER_HOME/staging/downloads/ata-ui/ataAppBundle/nls/root/appBundle-strings.js to the newly created folder.
  3. The appBundle-strings.js contains the key-value pairs, where value is the label or message displayed in the UI.
  4. Edit the values in the copied appBundle-strings.js file with the required localized strings.
  5. In $BUILDER_HOME/staging/downloads/ata-ui/ataAppBundle/nls/appBundle-strings.js, add the locale code as label and true as the value. You can use the following sample:
    define({
        "root": true,
        "it": true,
        "fr": true,
        "sv": true
    });

    The sample app bundles for default root bundle (en) and the fr bundle are as follows:

    • root/appBundle-strings.js
      define({
          "outofText" : "out of",
          "@outofText": {
            "description": ""
          },
          "uploaded": "uploaded",
          "@uploaded": {
            "description": ""
          },
          "all": "All",
          "@all": {
            "description": ""
          }
       })
    • fr/appBundle-strings.js
      define({
          "outofText": "hors de",
          "@outofText": {
              "description": ""
          },
          "uploaded": "téléchargé",
          "@uploaded": {
              "description": ""
          },
          "all": "All",
          "@all": {
              "description": ""
          }
      })

    Note:

    Modify the labels (key) values as shown in the samples and not in the appBundle-strings.js.

About Properties in ATA API

ATA API generates messages in the API response that are displayed in ATA UI in certain flows. These messages are a part of the properties files and located at $BUILDER_HOME/staging/downloads/ata-api/logging/resources/ui.properties. The format for ui.properties file is as follows:

ui.{key}.id={id}
ui.{key}={value or message to be displayed}

Localizing Properties in ATA API

To localize the properties in ATA API:

  1. Create a file using the following naming convention at $BUILDER_HOME/staging/downloads/ata-api/logging/resources/:
    ui_{locale_code}.properties
    # example: ui_fr.properties for french
  2. Copy the contents of ui.properties to ui_<locale>.properties.
  3. Modify the values in ui_<locale>.properties to the required locale (For example: fr).
  4. Build the ATA API application and run to update the application with the locale changes.

The sample ui.properties and ui_fr.properties properties are as follows:

  • ui.properties
    ui.invalidSearch.id=5000
    ui.invalidSearch=A valid auto suggest search term is required : {0}
     
    ui.query.id=5001
    ui.query=Following query is prepared to run : {0}
     
    ui.invalidSearchName.id=5002
    ui.invalidSearchName=Search Name is required.
  • ui_fr.properties
    ui.invalidSearch.id=5000
    ui.invalidSearch=Un terme de recherche de suggestion automatique valide est requis : {0}
     
    ui.query.id=5001
    ui.query=La requête suivante est prête à être exécutée : {0}
     
    ui.invalidSearchName.id=5002
    ui.invalidSearchName=Le nom de recherche est obligatoire.

Note:

Modify the values as shown in the samples and not in the id or keys.

About UIM App Bundle in ATA

You can localize the specification names in ATA UI by exporting the specification bundle from UIM and building the image with customization.

Before you localize the specification name, make sure that the specification display names are provided in Design Studio and deployed to UIM.

Localizing Specification Names in ATA UI

To localize the specification names in ATA UI:

  1. Export the UIM App bundle:
    1. In the UIM left navigation pane, go to Execute Rule under the Administration section.
    2. Select EXPORT_SPECIFICATION_DISPLAY_NAMES_AS_JSON from the dropdown, ignore the file upload option, and click Process.

      Note:

      For this option to appear, the ora_uim_baserulesets should be deployed.
    3. Download uimAppBundle.tar.gz.
  2. Add the builder for image building by adding uimAppBundle.tar.gz in $BUILDER_HOME/staging/downloads/ata-ui/uimAppBundle/.
  3. Customize and build the image.