Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

At its heart, the mechanism uses Java Resource Bundles backed by properties files (see Java Tutorial) to provide each text snippet with a "key" that is used for lookup of the text in the language of the configured Locale.

...

A primary goal of the implementation was is to keep translation work down to the a minimum required. This means that words and phrases that are used in multiple places in the UI should be "re-used" from a single source in the resource bundles, where possible. Using this approach will reduce reduces duplication of language translations, or and prevents subtly different translations for the same phrase in different places.

...

The resource bundles are maintained in the onos web_gui module, under the ~/src/main/resources tree, in the org/onosproject/ui/lion directory.

Note in the image above that the "Resource Bundle 'X'" elements are synthetic containers created by IntelliJ (IDE) to group together bundles of the same text in the different languages. 

A "top level" directory -- core -- contains three directories:

...

It is expected that a second top level directory – apps -- will be created in the future, for bundles relating to the ONOS Apps that are included in the distribution.

Note in the image above that the "Resource Bundle 'X'" elements are synthetic containers created by IntelliJ (IDE) to group together bundles of the same text in the different languages. 

Looking at the (expanded) 'Action' bundle, it can be seen that there is a default bundle (Action.properties) which has text in English, along with translations into Spanish (es), Italian (it), Korean (ko), Traditional Chinese (zh_CN) and Taiwanese (zh_TW).

...