General
RB Manager
RB Reporter

 

Resource Bundle Reporter

What is RBReporter?

Frequently, managers and developers working on an inernationalized product request the ability to quickly view the status and progress of the translation efforts in their project. RBReporter generates such reports on a periodic basis and stores them to a specified location in a variety of formats. The information included in the reports includes the names and meta data associated with each of the resource files, the number or resources held in each file, the number of untranslated resources in each file, and, if the detail level is set to 'High,' a list of all of the untranslated resource keys for each file.

How is RBReporter started?

From the command line, RBReporter is run by typing in the following command:

java com.ibm.rbm.RBReporter

This will bring up the window seen above. Alternatively, Windows users can run the batch file RBReporter.bat. RBReporter will also take command line arguments that will run the program in a variety of modes. An equivalent command line argument to the one above is:

java com.ibm.rbm.RBReporter -gui

This argument works the same as the first, bringing up the Graphical User Interface. This is the only way to set the properties of the reporter, such as the bundle to report on, the types of reports generated, and the interval between report generation.

Another option is to run the reporter with the following argument:

java com.ibm.rbm.RBReporter -now

When the -now option is used, the interval setting between reports is ignored, and the reports are generated immediately according to the other saved settings. This option does not bring up the window for changing settings. Using this option is helpful if you would like to use you operating system instead of RBReporter to schedule the generation of reports.

The last option is the following:

java com.ibm.rbm.RBReporter -line

When this option is used, the reporter is run through the command line only. None of the settings will be accessible for changing. Whenever it is time for a report to be generated, a message will appear on the command line. Another message will appear when the reports have been successfully written. This last message will include the date and time of the next report generation.

What do the settings mean?

When the graphical user interface is initially brought up, the reporter may not be active. An indication at the top of the window indicates whether or not the reporter will report at the time that has been specified. The 'Started' message does not indicate that report generation has started; it merely indicates that the reporter has started and will generate reports according to the other settings. To toggle whether or not the reporter is running press the 'Start' or 'Stop' button near the top of the window. To generate a report immediately, press the 'Update Now' button.

The report interval determines when a report is generated. There are two main options for determining the interval. Either an amount of time is specified that must pass in between reports, or a specific time during the week or day is specified at which time the report is generated irregardless of when the last report was generated.

The Resource Bundle setting is an indication of the base file from concerning which the report is generated. To change the base file, either type in the new file path to a resource bundle, or select the 'Choose' button immediately to the right to bring up the graphical file chooser. The output directory is the file directory into which the reports are saved. Note that the reports are overwritten each time they are newly generated.

The output format has three options. Any combination of these options is permissible, though it makes little sense to turn them all off. The 'Text' format produces a simple text file in English reporting on the status of each of the resource files. The 'HTML' format produces a page that is viewable in a web browser. The 'XML' format produces a well formed XML report that can be imported into a database, transformed into another format, or used in a variety of other ways.

Each output format has associated with it a file name. This name can be chosen as appropriate for the project to which the bundle belongs. Also, these file names can be modified in order to place the files in a directory other than the one specified in the output directory. For instance, a UNIX user might change the text file name to '../../log/report.txt'. A detail level is also associated with each report. The 'High' detail level merely includes each of the resource keys that are untranslated or duplicated instead of just reporting the number of such resources.

The last button saves the settings currently being displayed to a preferences file so that these settings will be in place the next time the program is run. If the settings are not meant to be saved as such, do not click this button. The reporter will still run according to the displayed settings as long as the RBReporter program is running.

What is the code scan?

Starting with version 0.3a, the reporter included a function that can scan text files looking for instances of resource bundle usage and compare those instances with the selected resource bundle. This scan can then report on any resource keys called on by a program but not existing in a resource bundle, as well as point out resources in the bundle that are potentially not used at all by the code.

The reporter is turned on by selecting the check box next to the text 'Scan Code File' and pointing the scan to a properly specified scan XML file. The report generated is appended to the normal reports generated in text, HTML, or XML. The report is also sensitive to the detail level selected for each of these three output formats.

The scan XML file provides the configuration information for the code scan. In it rules for what directories and files to scan are set as well as what type of text is looked for to find a resource key. More detailed information on setting up a scan XML file can be found by following the link.

 

Copyright 2000-2001 International Business Machines, All Rights Reserved