Translations

The Translation application allows to customize messages and labels of the overall INETAPP server. The server comes with resources localized in English and German which may not cover the needs of all users. The application also allows to modify the existing resources to reflect a more end-user-specific language in the Remote Interface. Only users with the Configuration permission are allowed to modify language resources.

The application allows to modify translations on the fly. It displays status information relevant to the current state of the UI.

  • the list of plugins to the left displays either:
    • the overall translation progress if no language is selected
    • the progress of a selected language otherwise
  • the main view displays:
    • the overall translation progress of the server for individual languages if no plugin or language is selected
    • the progress of a selected language if one is selected
    • the list of translations for a given language in a plugin if one is selected

The translation progress in the main view is represented by progress indicators with different colors. The progress bar changes into:

  • Red if the language is localized less than 25 percent
  • Yellow if the language is localized less than 70 percent
  • Green if the language is localized for more than 70 percent

The UI acts in an intuitive way to ease the translation effort.

Note: If a plugin is missing from the list, please check the Configuration application / section Plugins.

Modifying translations

To edit a given translation - or to create a new one - a plugin and a language have to be selected. The list of translations will show the systems core translation (English) on the left side and the current localized value on the right.

If there is no text yet, the core translation will be used by the system. If the entry is in a light color then there is a default translation delivered with the plugin. Custom translations are displayed in the usual text color.

Modifying a translation (edit + leave the text field) will save the modified value to the server. An indicator to the upper right will show how many translation still need to be saved to the persistence - and are therefore not yet available in other modules. Saving a set of translations usually takes up to a minute.

To aid the localisation effort there is an option menu on each translatable entry with useful options such as "Translate with Google".

There is another option menu on the top of the list of translation entries, which also holds a translate button. It allows to modify all currently visible entries below.

Filters

Plugins consist of many translated texts which are structured into bundles (see below). A bundle can be selected to only show the translations of this bundle.

The options menu holds another option to filter already translated entries. This way only entries without a text (either delivered by default or custom) will be displayed.

An important filter option is the global search bar. It can be used to find a specific translation.

Placeholder Syntax

Some of the messages contain the notation {0} or {0,choice,...} with numbers ranging between zero and nine. These are special placeholders filled by system logic. When localizing messages with placeholders it must be checked that the same placeholders are being used in the translated message.

Note: The placeholders will be checked when submitting the modified resource. If a syntactical error occurs the user will be notified in the Translation application and the resource is not saved.

Note: placeholders in quotes (e.g. '{0}') will be treated as literals and are not replaced properly. Please use either double quotes or two single quotes (e.g. "{0}" or ''{0}'').

Localization Structure

The INETAPP server supports plugin localizations by adding a proper <plugin_name>.translation.zip to the <persistence directory>/plugins/translation directory of the server.

The localization resources are based upon Java *_<language>.properties files which are key=value coded using the ISO-8859-1 code page. Which means that special characters like umlauts have to be encoded properly. The base language is English which does not require the _<language> part of the filename.

All localized resources have to be stored in the correct location. The edit panel has section headlines with the package/name of the resource, e.g. com.inet.plugin.structure.i18n.ConfigStructure. That means that the ConfigStructure_<language>.properties resource has to be stored in the com/inet/plugin/structure/i18n directory of the <plugin_name>.translation.zip file. For example:

# myPlugin.localization.zip
 
 __ com
  |__ inet
    |__ plugin
    | |__ structure
    |   |__ i18n
    |     |_ ConfigStructure.properties
    |     |_ ConfigStructure_de.properties
    |     |_ ConfigStructure_es.properties
    |
    |__ client
      |__ resources
        |__ i18n
          |_ LanguageResource.properties
          |_ LanguageResource_de.properties
          |_ LanguageResource_es.properties

Testing modified Translations

Due to several cache restrictions it may sometimes be difficult to force the browser to load the newly translated texts. However, the caches can be tricked into sending the new texts by giving the request a custom locale with an imaginary country code. Most server side caches have a timeout of about 15 minutes of inactivity before they will newly load the localized texts.

https://<server>:<port>/<path>?locale=es_AA
https://<server>:<port>/<path>?locale=es_AB
...
https://<server>:<port>/<path>?locale=es_ZZ