Internationalizing Web Administration Tools

Denodo Web Administration Tools (Data Catalog, Design Studio and Scheduler) provide a convenient way to translate all the messages of the user interface to other languages.

How to configure custom messages for the Web Administration Tools

In the Denodo Platform installation, you may find a customLang.properties.template for each Web Administration Tool installed. Those templates contain all the messages displayed in the user interface.

Follow these steps to customize the Web Administration Tools messages:

  1. Copy the customLang.properties.template file to each work location:

    • For Data Catalog: copy <DENODO_HOME>/resources/data-catalog/messages/customLang.properties.template file to <DENODO_HOME>/work/data-catalog/customLang.properties.

    • For Design Studio: copy <DENODO_HOME>/resources/design-studio/messages/customLang.properties.template file to <DENODO_HOME>/work/design-studio/customLang.properties.

    • For Scheduler: copy <DENODO_HOME>/resources/scheduler-webadmintool/messages/customLang.properties.template file to <DENODO_HOME>/work/scheduler/customLang.properties.

  2. Open the customLang.properties of the “work” directory and change the value for the properties with the translated value. While doing the translation, take into account the following considerations:

    • The customLang.properties.template files distributed are UTF-8 encoded and the Web Administration Tools expect UTF-8 encoded customLang.properties. Make sure you generate the translated files with the correct encoding.

    • Do not translate words surrounded by braces. Those words are tokens that will be replaced by the Web Administration Tools with context-related information to provide a better user experience. Eg. the token name surrounded by braces on the following message "Data source '{name}' created successfully" should not be translated. For instance, a possible translation into Spanish for that message would be "La fuente de datos '{name}' se creó correctamente" keeping {name} intact. The modification of those tokens may lead to unexpected behavior.

    • Be careful with complex expressions surrounded by braces. Those expressions contain both tokens and values to be translated. This is an example of a message with a complex expression "Query executed {times, plural, one {once} =2 {twice} other {# times}}". For instance, a possible translation into Spanish for that message would be "Consulta ejecutada {times, plural, one {una vez} =2 {dos veces} other {# veces}}". Check the documentation of ICU MessageFormat for specific information about the syntax.

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

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.202105202200 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.

cusmon_lang_util.sh 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.