Ozibug - web based bug tracking


  1. Introduction
  2. Language Packs and Locales
  3. Installing a Language Pack
  4. Locale Resources
  5. Setting your Browser Locale
  6. Creating your own Locale
  7. Running with Multiple Locales
Back to index
 

Ozibug is a fully internationalized application and can be configured to use a single locale (or language) or multiple locales.

When a single locale is installed, this will be used for all users and the system audit trails.

When multiple locales are installed, the locale that Ozibug uses for a particular user is defined by the locales installed and locale that the users' browser is configured for (see Setting your Browser Locale for more details.)

The system audit trails are written in the default locale which is configured in the main configuration file, ozibug.properties.

Back to top
 

A locale is defined by the 2 character language code followed by the optional 2 character (upper case) country code. So for example the German locale may be defined as just de or de_DE when the optional country code is added.

Each locale is defined by a language pack, and when the language pack contents have been added to Ozibug the locale will become available to the users that have set their browser language preference to this locale.

The following listing shows the contents of the German (de) language pack.

$ unzip -l de-2.0.2.zip

Archive:  de-2.0.2.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  12-29-03 16:15   de/
    11272  12-29-03 16:15   de/de.jar
     1425  12-29-03 16:15   de/reference.xml
     3708  12-17-03 15:58   de/index_de.html
     2305  12-29-03 16:15   de/readme.txt
 --------                   -------
    18710                   5 files

The individual contents of the language pack are described below.

  • locale jar (de.jar)

    This jar contains three property files which define the strings which are to be displayed in the locales language. This file is searched for by Ozibug and must be in a directory contained in the CLASSPATH.

  • reference data (/doc/howto/reference.xml)

    The locales definition of system reference data.

  • index page (index_de.html)

    The locales definition of the index page.

  • installation instructions (readme.txt)

    Installation instructions (see next section.)

Back to top
 

The following instructions assume that the Ozibug servlet has been installed according to the installation guide and the expanded servlet directory is OZIBUG_HOME.

  1. Copy the locale jar (xx.jar) file into the OZIBUG_HOME/WEB-INF/lib directory.
  2. Copy the reference data (/doc/howto/reference.xml) file to the OZIBUG_HOME/WEB-INF directory (see Installation Notes below.)
  3. Copy and rename the index page (index_xx.html) file to the OZIBUG_HOME/index.html directory.

If you require ozibug to run with this locale as the default, then change the property settings in the file OZIBUG_HOME/WEB-INF/ozibug.properties to reflect this.

An example of configuration for the German locale is shown below.

default.language=de
default.country=
Installation Notes

If the Ozibug instance has been customized (used) then the reference data definitions contained in the file OZIBUG_HOME/WEB-INF/reference.xml must be copied across to the new file. Unless these files are synchronized before copying, data could be lost from the display of bugs and modules.

If you wish to replace the default locale (English)

  1. Remove the default properties files from the OZIBUG_HOME/WEB-INF/classes directory. These are the files that do not have a locale suffix.
  2. Unzip the locale jar to the OZIBUG_HOME/WEB-INF/classes directory.
  3. Rename the locale property file names to the default property file names, eg. messages_locale.properties -> messages.properties
Back to top
 

The locale jar file contains three property files which define the locale dependent strings which Ozibug uses. Note: that the main part of the property filenames is suffixed with the locale as in messages_locale.properties.

The following listing shows the contents of the German (de) locale jar.

$ unzip -l de.jar

Archive:  de.jar
  Length     Date   Time    Name
 --------    ----   ----    ----
    24925  12-29-03 16:15   messages_de.properties
     2518  12-29-03 16:15   audit_de.properties
     8179  12-29-03 16:15   exceptions_de.properties
 --------                   -------
    35675                   3 files

The individual contents of the locale jar are described below.

  • messages.properties

    Contains the main set of strings that are used by Ozibug.

  • audit.properties

    Contains the strings which are used in the audit trail text.

  • exceptions.properties

    Contains the strings used in Ozibug exceptions.

When a web page is requested from Ozibug it will search the set of property files that it has access to, looking for the ones which match the requested locale as closely as possible. If none are found then the default files will be used, these are the files that do not contain a suffix (a set of files with no suffixes should always be present.)

Back to top
 

This section shows you where you can set your language preference in your favourite browser.

  • Netscape/Mozilla

    Select Edit -> Preferences from the top Netscape menu bar and the Preferences dialog box will be displayed. Select Navigator -> Languages from the menu on the left side. On the right side you can now add/change/edit the languages (or locales) that your browser will request when you ask for a web page.

  • Internet Explorer

    Select Tools -> Internet Options from the top menu bar and the Internet Options dialog box will be displayed. Click the Languages button from the bottom of the dialog box. The Language Preference dialog box is now displayed where you can now add/change/edit the languages (or locales) that your browser will request when you ask for a web page.

  • Opera

    Select File -> Preferences from the top menu bar and the Preferences dialog box will be displayed. Click the Languages button from the left side of the dialog box. On the right side you can now add/change/edit the languages (or locales) that your browser will request when you ask for a web page.

Back to top
 

This section contains useful information on how to create your own locale resources for use in Ozibug.

  1. Create the properties files

    Take the default set of property files from the OZIBUG_HOME/WEB-INF/classes directory, messages.properties, audit.properties and exceptions.properties and copy these files to the their respective locales (messages_xx.properties, audit_xx.properties and exceptions_xx.properties where xx defines the locale. Note: see the notes at the end of this section if you are using a multi-byte character set.

    Now translate the contents to your desired locale, each property definition has the following format where the key is not changed while the value is translated.

    key = value

    The following example shows the sames properties for different locales.

    #
    # File: messages_en.properties
    #
    GoodBye  = Goodbye
    ThankYou = Thanks for using {0} !
    ...
    
    #
    # File: messages_de.properties
    #
    GoodBye  = Auf Wiedersehen !
    ThankYou = Danke für die Verwendung von {0} !
    ...
    Translation Notes

    Values such as {0} are parameters used at runtime and should not be changed (although the location in the string can be altered.)

    If you are using a multi-byte character set then you must follow this step for your files to work correctly in Ozibug.

    • Create your files in your local character set which perhaps might be Shift JIS SJIS if your creating Japanese resources.
    • Convert the files to a standard Unicode representation using the Java tool native2ascii.
      $ JAVA_HOME/bin/native2ascii \
        -encoding SJIS messages_native_ja.properties messages_ja.properties
      This tool converts the character set specific multi-byte characters to a standard ascii representation, for the Japanese language the translated file will look similar to the following example.
      #
      # File: messages_ja.properties
      #
      ThankYou = {0}\u306e\u3054\u5229\u7528\u3042\u308a\u304c\u3068...
      GoodBye  = \u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e...

    The converted property files can be placed in the OZIBUG_HOME/WEB-INF/classes directory or they can be put in a jar which can be placed in the OZIBUG_HOME/WEB-INF/lib directory.

    Note: the Ozibug servlet will need to be restarted for the new locale resources to be found and become available.

  2. Update the reference data file

    This can be done from the Ozibug administration screen which directly acts on this file. Login as an administrative user, select the reference data items (Module, Status and Priority) from the selector in the top right of the screen, and update each display name to your desired value.

  3. Update your index page

    This is the static Ozibug index page which can be customized to your preference. If you only require to operate in one locale then change this page to include your desired text. If you are supporting multiple locales then you should update the index page to include a translation of your text for each locale.

Back to top
 

When running with multiple locales there are some additional (optional) tasks that can be done to truly localize your system.

As there is only one set of reference data (contained in the reference.xml file) this is what will always be used for every locale. To override this behaviour you must add the resources to each of the messages_xx.properties files to override each of the reference data values defined.

In the messages_xx.properties file the section towards the end entitled Reference I18N resources contains the default reference data resource values.

Uncomment these resources to override the values from reference.xml for the locale of the property file.

Warning: when these values are uncommented they will override those seen when modifying the values from the Ozibug administration screen. This can be confusing.

################################################################################
#
# Reference I18N resources
#
# To internationalize the reference data that can be created, the name
# is inserted as a key in the i18n files (this is one of them.)  Individual
# attributes of the reference data can be internationalized by including
# them with a key of "name.id"
#
# The following are examples only and represent the well known reference data
# (predefined) that is shipped with Ozibug.  These SHOULD NOT be uncommented
# unless you intend to support MULTIPLE locales.  When supporting a single
# locale you can (and should) alter the displayed values from the
# administration gui.
#
################################################################################
# module = Module
#
# priority = Priority
# priority.1 = info
# priority.2 = low
# priority.3 = medium
# priority.4 = high
# priority.5 = critical
# priority.6 = pending
#
# status = Status
# status.1 = new
# status.2 = open
# status.3 = closed

To localize any custom fields that have been added you can find the name of the custom field from the reference.xml data file (once the field and attributes have been added) and then add the key = value for each attribute.

Warning: when these values are added they will override those seen when modifying the values from the Ozibug administration screen. This can be confusing.

################################################################################
#
# Reference data that is defined by you the customer, can also be
# internationalized in this way.  The values to use in this file start with
# the name "custom" and can be found in the data file "/doc/howto/reference.xml" after
# the reference data has been created in Ozibug by the admin user. This
# file is usually found behind the servlet context in the directory
# OZIBUG_HOME/WEB-INF
#
################################################################################
#custom2 = Versione d\u00e9 J\u00e1v\u00e6
#custom2.1 = 1.2.2
#custom2.2 = 1.3.0
#custom2.3 = 1.4
Back to top
 
Back to index