Chapter 4. Customization

Table of Contents

4.1. Languages
4.1.1. Defining Language Files
4.2. Custom Quotes

Some parts of Klaros-Test­management may be customized by the user, including the display languages and the quote of the day file.

4.1. Languages

Klaros-Test­management supports the addition of custom languages. To add a language to Klaros-Test­management, a language file must first be added to the .klaros/resources/messages folder in the home directory of the user running Klaros-Test­management.

The available languages can be enabled/disabled using the Languages page in the system parameters section. The process of enabling and disabling available languages is described in Section 10.4.5.1, “Enabling and Disabling Languages”.

4.1.1. Defining Language Files

Adding a valid language file to the .klaros/resources/messages directory causes the language to become available in Klaros-Test­management. A valid language file has a name of the form messages_${language}_${COUNTRY}_${variation}.properties where ${language} is the two-letter ISO 639 code for the language in lower-case, ${COUNTRY} is the two-letter ISO 3166 code for the country in upper-case and ${variation} is an optional, user-definable code for the variation of the language (e.g. dialect).

[Tip] Language File Encoding

The language file must use ISO-8859-1 encoding with Unicode escapes ( \uXXXX).

If you prefer editing these files as UTF-8 please use a converter like native2ascii or iconv to translate them to a proper format.

After Klaros-Test­management is run for the first time, the American English, German and fallback language files will be copied to the .klaros/resources/messages folder. In order to create a new language file, the text should be copied out of one of these files into an appropriately named file. The contents of the file consist of key value pairs in the form: key=This sentence is the value. None of the keys should be altered. The values (the text after the '=') should be translated into the target language.

When Klaros-Test­management is started, the default language files ( messages.properties, messages_en_US.properties and messages_de_DE.properties) are copied to the .klaros/resources/messages folder, overwriting any changes made to these files. Therefore, it is advised that any user changes to the American English and German interfaces be made in a file with the variation in the filename set, e.g. messages_en_US_companyName.properties in order to persist changes.

As well as copying over the default files, Klaros-Test­management also merges any changes with user-defined files. If key-value pairs are added to the default files during an update, these will also be added to the end of any user-defined language files, along with a comment stating when the entries were added. These entries should be translated by the creator of the custom language file.

4.2. Custom Quotes

Klaros-Test­management allows the use of a custom quotes file. This allows the customization of the Quote of the Day field shown on the login screen. A custom quotes file can be uploaded to Klaros-Test­management using the form on the General Settings page can be placed directly in the .klaros/resources folder in the home directory of the user running Klaros-Test­management.

A custom quotes of the day file is simply a text document with the extension .txt which uses ISO-8859-1 encoding with Unicode escapes and contains one quote per line. The quote displayed changes each calendar day. The process of uploading a custom quotes file is described in Section 10.4, “System”.