Internationalizing Web Administration Tools

The Data Catalog, the Design Studio and the administration tool of Scheduler provide a way for the administrators of these modules to translate their user interface to the language of their users. For this, the installation of Denodo provides a file for each application with key-value pairs. For example:

login.signIn=Sign in

The administrator has to translate the value of the pair. That is, translate “Sign in” to the appropriate language.

This page explains how to:

  • Do the translation and rules you need to follow.

  • The process you need to follow after installing an update of Denodo, to check if there are new messages that have to be translated.

How to Configure Custom Messages for the Web Administration Tools

Follow these steps to translate the user interface of each application. You can do this only for the applications you want to translate, you do not need to do it for all of them.

Data Catalog

  1. Copy <DENODO_HOME>/resources/data-catalog/messages/customLang.properties.template file to <DENODO_HOME>/work/data-catalog/customLang.properties.

  2. Edit <DENODO_HOME>/work/data-catalog/customLang.properties and translate the messages, following the considerations below.

Design Studio

To localize the Design Studio do this,

  1. Copy the file <DENODO_HOME>/resources/design-studio/messages/customLang.properties.template to <DENODO_HOME>/work/design-studio/customLang.properties.

  2. Edit <DENODO_HOME>/work/design-studio/customLang.properties and translate the messages, following the considerations below.

Scheduler Administration Tool

  1. Copy the file <DENODO_HOME>/resources/scheduler-webadmintool/messages/customLang.properties.template to <DENODO_HOME>/work/scheduler-webadmintool/customization/customLang.properties.

  2. Edit <DENODO_HOME>/work/scheduler-webadmintool/customization/customLang.properties and translate the messages, following the considerations below.

You have to restart the application if you create or modify its customLang.properties file.

Considerations When Translating

The customLang.properties files store the translation of the messages in key-value pairs. You have to translate the value. For example, if you are translating the user interface to Spanish, replace this:

common.daysOfWeek.monday=Monday

with this:

common.daysOfWeek.monday=Lunes

That is, translate the text on the right side of the “=” sign.

When modifying these files, follow these rules:

  • The customLang.properties files are encoded in UTF-8. Make sure you do not change the encoding. Otherwise, the applications will display garbled text.

  • Do not translate words surrounded by curly braces (e.g. {name}). These words represent a pattern and the applications will replace with context-related information.

    For example, for this messages:

    login.welcome=Welcome {username}!
    

    leave {username} as is:

    login.welcome=¡Bienvenido {username}!
    

    Note that {username} remains in the translated message. When the application displays this message to a user, it will replace {username} with the value of this pattern.

  • Be careful with complex patterns. Those expressions contain both tokens and values to be translated. For example, if you see this:

    element.usage.times.queries=Query executed {times, plural, one {once} =2 {twice} other {# times}}
    

    you have to translate it like this:

    Consulta ejecutada {times, plural, one {una vez} =2 {dos veces} other {# veces}}
    

    Note that the nested patterns within curly braces have been translated to Spanish.

    The documentation of ICU MessageFormat explains this in more detail.

How to Refresh Custom Messages After Installing an Update

If you already have customLang.properties defined and plan to install an update or you already installed it, your customLang.properties will not be updated automatically. The new update may include a new customLang.properties.template for each Web Administration Tool with modifications that might include new messages, modifications of previous messages and deleted messages.

When an updated is installed, if a previous customLang.properties.template file exists the update will replace the template with the new version. Also, the update will create a back up of the current template file (adding a suffix such as customLang.properties.template.back.202107152200 where the numbers at the end represent the update version where the template was added). Do not remove the backup versions because they will help you identify changes in the upcoming updates.

In order to keep your custom customLang.properties files updated, the script custom_lang_util.sh (custom_lang_util.bat for Windows) in <DENODO_HOME>/setup/common/ folder, will help identify all the differences and update your customLang.properties files. You can manually update your custom file checking the differences between the previous template and the new template, or generate a new customLang.properties using your current customLang.properties as a starting point.

custom_lang_util script options:

  • -diff: receives as argument the template of the previous version and the template of the last version and shows de differences between both files categorized (removed properties, new properties and modified properties). You may use this option if you want to manually update you current customLang.properties. Usage:

    -diff <lastPropertiesTemplateFile> <updatedPropertiesTemplateFile>
    
  • -gen: creates a custom properties file using as a starting point your current customLang.properties and applies the differences between the template you used to generate your current file and de new template. At the end of the generated file, you will find two sections showing new and modified properties. Each modified property will have a comment with the previous value and the new value and will not replace the custom defined message. The properties that do not longer exist in the new template are automatically removed. Usage:

    -gen <lastPropertiesTemplateFile> <updatedPropertiesTemplateFile> <currentCustomPropertiesFile> <newCustomPropertiesFile>
    

Example of updating the customLang.properties of the Design Studio manually:

  1. Identify the new and the old templates. First check you current update version and your previous update in the control center. Lets say that XXXXXXXX is our previous update and YYYYYYYY is the version of the latest update installed. Open the template folder <DENODO_HOME>/resources/design-studio/messages/. You may find a template file for each update installed. Identify the ones which version matches with your current and previous version respectively, in our example customLang.properties.template.back.XXXXXXXX and customLang.properties.template.back.YYYYYYYY.

  2. Using the script custom_lang_util.sh identify the differences by executing the following commands (replace ‘XXXXXXXX’ and ‘YYYYYYYY’ with the version of your template files):

cd <DENODO_HOME>/setup/common
custom_lang_util.sh -diff ../../resources/design-studio/messages/customLang.properties.template.back.XXXXXXXX ../../resources/design-studio/messages/customLang.properties.template.back.YYYYYYYY
  1. Open your current <DENODO_HOME>/work/design-studio/customLang.properties and update its value with the information obtained in step 2

  2. Restart the Web Administration Tools in order to load the new configuration.

Example of generating a customLang.properties for the Design Studio with the help of the script custom_lang_util.sh:

  1. Identify the new and the old templates. First check you current update version and your previous update in the control center. Lets say that XXXXXXXX is our previous update and YYYYYYYY is the version of the latest update installed. Open the template folder <DENODO_HOME>/resources/design-studio/messages/. You may find a template file for each update installed. Identify the ones which version matches with your current and previous version respectively, in our example customLang.properties.template.back.XXXXXXXX and customLang.properties.template.back.YYYYYYYY.

  2. Using the script custom_lang_util.sh generate the new file executing the following commands (replace ‘XXXXXXXX’ and ‘YYYYYYYY’ with the version of your template files):

cd <DENODO_HOME>/setup/common
custom_lang_util.sh -gen ../../resources/design-studio/messages/customLang.properties.template.back.XXXXXXXX ../../resources/design-studio/messages/customLang.properties.template.back.YYYYYYYY ../../work/design-studio/customLang.properties ../../work/design-studio/new_customLang.properties
  1. Open your new file <DENODO_HOME>/work/design-studio/new_customLang.properties, go to the end of the file and update the values of the new and modified properties.

  2. Replace <DENODO_HOME>/work/design-studio/customLang.properties with your new properties file <DENODO_HOME>/work/design-studio/new_customLang.properties.

  3. Restart the Web Administration Tools in order to load the new configuration.