diff --git a/.gitattributes b/.gitattributes index 74e2ae285b4..323a3a227d6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -79,6 +79,59 @@ icu4j/src/com/ibm/icu/impl/data/ucadata.dat -text icu4j/src/com/ibm/icu/impl/data/unames.dat -text icu4j/src/com/ibm/icu/impl/data/unorm.dat -text icu4j/src/com/ibm/icu/impl/data/uprops.dat -text +tools/unicodetools/com/ibm/rbm/docs/images/TitleLogo_transparent.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/arrow_bullet.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/diamond_bullet.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/ibm_logo_small_white.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/RBReporter.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/basic_file.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/basic_group.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/basic_resource.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/basic_translation.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/basic_untranslated.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/create_group.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/empty_group.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/empty_resource.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/empty_screen.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/empty_with_preferences.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/laf_metal.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/laf_motif.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/laf_windows.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/lookup_resource.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/main_page.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/menu_file.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/menu_file_export.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/menu_file_import.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/menu_help.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/menu_options.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/menu_popup_tree.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/new_baseclass.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/new_bundle.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/preferences_dialog.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/view_groups_bundle.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/view_groups_file.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/view_search.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/view_stats_bundle.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/view_stats_file.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/view_tree_basic.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/view_untrans_bundle.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/view_untrans_dialog0.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/screenshots/view_untrans_file.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/spacer.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/template_l.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/template_line.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/template_ll.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/template_u.gif -text +tools/unicodetools/com/ibm/rbm/docs/images/template_ul.gif -text +tools/unicodetools/com/ibm/rbm/images/TitleLogo_transparent.gif -text +tools/unicodetools/com/ibm/rbm/images/tree_icon_bundle.gif -text +tools/unicodetools/com/ibm/rbm/images/tree_icon_country.gif -text +tools/unicodetools/com/ibm/rbm/images/tree_icon_file.gif -text +tools/unicodetools/com/ibm/rbm/images/tree_icon_group.gif -text +tools/unicodetools/com/ibm/rbm/images/tree_icon_item.gif -text +tools/unicodetools/com/ibm/rbm/images/tree_icon_language.gif -text +tools/unicodetools/com/ibm/rbm/images/tree_icon_project.gif -text +tools/unicodetools/com/ibm/rbm/images/tree_icon_variant.gif -text # The following file types are stored in Git-LFS. *.jar filter=lfs diff=lfs merge=lfs -text diff --git a/tools/unicodetools/com/ibm/rbm/docs/RBReporter.html b/tools/unicodetools/com/ibm/rbm/docs/RBReporter.html new file mode 100644 index 00000000000..ee6df52fca4 --- /dev/null +++ b/tools/unicodetools/com/ibm/rbm/docs/RBReporter.html @@ -0,0 +1,230 @@ + +
+ +![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+ 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: +
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: +
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: +
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: +
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. ++ |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+ Frequently Asked Questions+What is the advantage of using RB Manager when I can edit resource + bundle property files in a simple text editor? +Trying to manage internationalization efforts in anything but the smallest + of projects can be a difficult and time consuming task. In fact, RB Manager + as a project grew out of the frustrations and errors that developed as + the result of trying to maintain multiple language support in a moderately + large project. Relying on text editors and the like decreases the chance + that developers will properly comment each aspect of each translation, + increases the chance that errors such as duplicate key names and inconsistencies + across language files, and increases the amount of time developers and + translators have to spend tracking down inconsistencies and untranslated + resources. +RBManager offers the following features to correct these problems: ++
Will RB Manager work on my computer? + +RB Manager is written using only the Java API. It has been tested under + the Java 1.2.2 runtime environment and higher. If your computer has a + Java Virtual Machine (JVM) in this environment, RBManager should work + for you. Instructions for setting up and running the program are found + in Step 1 of the tutorial. + +Why doesn't RB Manager run in language X? + +RB Manager will allow you to edit language files for any language/country/variant + encoding. To demonstrate the usefulness of internationalization, RB Manager + has its own resource bundle. The application can currently be run in English, + German, Swedish, and Finnish. You are welcome to use the program to edit + its own resource bundle and add any other language. If you do so, you + may submit the new language file to the application's author via email + at jjared@almaden.ibm.com. + Each submission will be considered for future submissions, but the submittor + must give the rights to the translation to IBM if the file is to be included. +I found a bug. Where do I report it? +This is the first alpha version of RB Manager, and some bugs are expected. + You may email a description of the problem to the author at jjared@almaden.ibm.com. + I hope soon to create a page where known bugs are listed. +What can I expect from future versions of RB Manager? + + |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+ Future Features and Version History+Some of the features all ready in the works for future versions of RB + Manager: +
Features added in the latest version (0.4a) of RB Manager: ++ +
Features added in version 0.3a of RB Manager: +
Have another idea? Send any thoughts or comments to author Jared + Jackson. + + |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+
+
+ Welcome to Resource Bundle Manager (v0.4a)+These pages are meant to help you and your development + team get started with this translation management tool. +The tool was developed to be easy to use and intutitive. + If you all ready understand the process of internationalization and + just want to learn how this tool can be used to make your efforts more + efficient and less error prone go straight to the step-by-step + tutorial, functions and views, or + frequently asked questions. If you are new to + internationalization in development, you may want to first check out + this + introduction to internationalization. +If you have any comments or would like to report a bug, + feel free to contact the author. + |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+ Look and Feel+RB Manager is written purely in Java, and therefore is a cross-platform + application. Using the Preferences menu item, the look and feel of the + application can be changed to any one of the look and feels supported + by the virtual machine running on the system. +This page shows some examples of how the system looks under four common + look and feels: Windows, Metal, + Mac OSX (aqua), and Motif. + ++ + |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ ![]() |
+ |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+
+ |
+
+
+ RB Manager - Menu Items+
+ + + + + + + + + + + |
+ ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+ RBReporter Scan XML Configuration File+Introduction +The configuration file for RBReporter scans is a text file stored in + XML. The design on the format for this configuration file was kept simple + and so the general application of the scanner is not meant for complicated + analysis. The design works around three types of rules: Directory Rules, + File Rules, and Parse Rules. Each of these will be explained below. First, + here is an example file for reference. This file is the configuration + file used to scan the resource bundle associated with RBManager. +Sample Scan File (rbmanager_scan.xml) +
+Details +The root element of the XML file is named 'RBFILESCANNER'. This root + element has two optional attributes for naming the scan file in a human + readable manner and specifying the file name. These attributes are for + the developers reference; they mean nothing to RBReporter. Beneath the + root element are three required elements 'FILERULES', 'PARSERULES' and + 'SCAN'. +Beneath the FILERULES element are found FILERULE elements. Any number + of these rules can be specified, though each must have a unique name as + specified in the element's NAME attribute. Along with this name attribute, + the attributes STARTS_WITH, ENDS_WITH, and CONTAINS may be optionally + specified. These are the rules applied to each file in a directory to + determine whether or not they will be scanned. The attribute rules are + applied to the file names of each file in the directory and if each is + found to be true, that file is evaluated against the parse rules. +Beneath the PARSERULES element are found PARSERULE elements. Any number + of these rules can be specified, though each must have a uniques name + as specifiedn in the element's NAME attrinute. Along with this name attribute, + the attributes FOLLOWS and PRECEDES may optionally be specified. These + are the rules applied to each line of text in a selected file to determine + if that line of text contains one or more resource keys. +Beneath the SCAN element are found DIRECTORY elements. Any number of + these elements can be specified. The required LOCATION attribute specifies + in a machine dependent manner the location of a directory for which the + files are to be scanned for resource bundles. An optional RECURSE_DIRECTORIES + attribute may be specified. If the value of this attribute is set to 'true', + then all directories beneath the directory specified are also scanned. +Beneath each DIRECTORY element, exactly one RULES elements can be specified.Beneath + this element, any number of APPLY FILE RULE elements may be specified. + The required NAME attribute specifies which of the file rules defined + previously are to be applied. Beneath these element any number of APPLYPARSERULE + elements may be specified. The required NAME attribute specifies which + of the parse rules defined previously are to be applied to the files accepted + by the parent file rule. +The Example File Explained +Given the details of the file structure, we can now examine how the example + file specifies which files to scan, and then how it specifies how to find + the resource keys contained in those files. +RBReporter first begins by going through each of the directories specified. + In the example file case, there is only one directory. It then goes through + each of the files contained in that directory and its subdirectories looking + for files that pass the 'Java File' file test. The 'Java File' test simply + checks the file name to see if it ends in the extension '.java'. If the + file has such an extension the parse rule 'Java static resource' is applied + to every line of text within that file. +Thus if the following file, named Sample.java, were to be found in the + directory. The two resource keys 'Hello' and 'World' would be found. +
+
+ |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+ System Requirements+RB Manager will run on any platform supporting Java 1.2 or higher. It + has been tested on Windows NT, Windows 2000, Linux, and Mac OS X. It is + recommended that the machine running RB Manager have at least 64 MB of + memory. It is also recommended that RBManager be run on via Java 1.3 or + higher, as future support may not be offered for Java 1.2. + |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+
+
+ Step-by-step Tutorial+This tutorial takes you step by step through the process + of creating a resource bundle and managing the translations you need + for your application or web based interfaces. You may begin with the + first step, or select from any of the steps listed below. The tutorial + is not meant to give a comprehensive view of the features of RB Manager, + but it will help you familiarize with all of the basic features. +
+
+ Step 1. Setting Your Personal Prefences+Step 2. Creating a New Resource Bundle+Step 3. Creating Groups within the Bundle+Step 4. Populating the Bundle with Resources+Step 5. Adding Resource Files for New Languages+Step 6. Saving the Results+ |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+ Setting Your Personal Preferences+Getting Started +Before you can do anything with the program, of course, you have to get + it running. RB Manager is purely a Java application. The download does + not come with a Java runtime environment. In order to use RBManager, you + will need to hava a Java runtime environment installed on your machine. + The environment is available to most computing platforms at Sun's + internet site. RB Manager has been tested for Java versions 1.2.2 + and higher. It is recommended that you use Java version 1.3 if it is available + for your system. +To run the program from the command line, first go to the RBManager directory + on your system, then enter: +
Alternatively, Windows users can use the batch file, RBManager.bat to + accomplish the same thing. Linux and Unix users tend not to need their + hands held, and can probably figure out how to write a simple script or + alias to run the application without help. Mac OS X users can run the + program from the Terminal application with the above command line, substituting + a colon for the semi-colon in the classpath argument. +The Display +Once you get the application running, you will hopefully see something + like this: +The display may differ because of differences in the various Java Virtual + Machines and differences in Look and Feels. At the top is a menu bar and + a logo. Below the logo and to the left is a pane in which all of the various + language files will be listed in a tree view. Since no resource bundle + has been selected, this tree is currently empty. To the right is a tabbed + pane in which three views will be shown. The views will either present + information or provide an interface for editing the various data contained + across your resource bundle. +Customizing the Application for You +Go to the Options menu and select Preferences. The first time after opening + the application, it may take a few seconds to get to the preferences as + the application tries to get information from your virtual machine.A dialog + box should appear that looks similar to this: +The first thing to do is to change the user name to your own name. You + will only have to do this once unless someone else uses this application + and changes the name. Second, you should change the look and feel of the + application to your preference. All of the look and feels that your JVM + supports should be listed in the drop down box. (Note that changes will + not take affect until after you are done and have pressed the Update button). +The last thing to change is the locale you would like to use to work + with this application. When you download RBManager, it is set by default + to display in U.S. English. As of this writing, you can use the program + in Finnish, Swedish, and German as well. Three lists choices are possible + for selecting a locale. The first, called 'Machine Supported', lists all + of the locals supported by your JVM. The second, called 'Defined for RBManager', + analyzes the Resource Bundle for RBManager and lets you select from the + available translation files. The third option, called 'ISO Standards', + lists all of the language and country 2-letter codes defined by the ISO. + You may select any of the three options by use of the radio button on + the left and then select the encoding you would like to use. Of course + if the encoding you select is not supported by RBManager, the translations + in the base class of the bundle will be used, which are in English. Also + note, that the base class language may not appear in the 'Defined for + RBManager' section because the encoding is not always specified for that + file. +When you are done making your personalized selections, click on the Update + button. The preferences will be saved in a file called preferences.properties + stored in your RBManager directory. You will not need to make these selections + in the future, unless you want to change your defaul options. + + |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+ Step 2. Creating a New Resource Bundle+Things to Consider +A resource bundle in terms of this application is a group of property
+ files with the same base class name. For instance, the resource bundle
+ for RB Manager includes files: You can have as many Resource Bundles as you like for an application, + though most teams choose to work with just one. RB Manager allows you + to work on one resource bundle at a time, editing either individual translation + files or groups of translation files within the bundle. When you create + a resource bundle you will be creating the base class translation file + for that bundle. Other files can be added at any time later. The base + class translation file provides a default translation in case locales + are not specified or a resource translation file does not exist for the + locale that is specified. +You will have to choose a base class name for the resource bundle. That + name may have no white spaces and no underscores, and it should remind + you in some way of the project or function to which it is attached. You + will also have to enter a name for the person or people in charge of managing + the resource bundle. +Creating the Resource Bundle +From the File menu, select 'New Resource Bundle...' You will be prompted + to enter the base class name. If you enter a properly formatted name, + the tree display on the lower left will change to reflect the name you + entered. Click on the name of your resource bundle, and make sure the + 'Statistics' tab is selected. You should see something like the following: +The only resource file you have is that of the base class. Select the + '(Base Class)' node of the tree by clicking on it. You should now see + the following: +The fields represented here have no bearing on how the translations will + work in your application, but give RBManager some metadata to better organize + the file. Resource Title should be a short title that represents this + file, such as 'RBTutorial Base Class'. You can enter any comment and file + manager value you like. The language, country, and variant fields provide + a place for listing the full name of the language, country, and variant + so that you do not have to rely on two or three letter encodings. You + can also leave these fields blank if they are not relevant. Once you have + entered these values in, finalize them by pressing the 'Update' button. + + |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+
+
+ Creating Groups within the Bundle+What is a Group? +One of the fundamental problems with managing resource + bundles across large projects is that individual resources often got + lost in the vast number of translations. By creating groups within resources, + RBManager makes it much simpler to manage the daunting number of translations. + The resource bundle is like a tree with the files at the upper levels. + Beneath the file level is the group level, and beneath that, the individual + resources. +The only meta data that groups contain are name and comment. + The name is a way of identifying the group from a list of groups, and + the comment is a quick description about what the group contains. +Creating a Group +Like any other editing that affects the entire resource + bundle, the creation of a group can not be done from the individual + language file level. Two ways exist to create a group. The first is + to select the base class at the top of the resource bundle tree, select + the 'Groups' tab, and click the 'Create Group' button. The second way + is to go to the 'Options' menu and select 'Add New Group'. The second + method can be used no matter what your current view is on the lower + right panel. +Once you have followed one of these two methods, the following + dialog should appear: +Enter a name and comment for the group, and click on 'Create'. + Now you have a group. You can add more groups now or at any time. You + can also begin to create new resources under the new group as explained + in the next step. + + |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+ Step 4. Populating the Bundle with Resources+Working within a Group +In the tutorial file, following the process described in the previous + step, I created a group called 'Questions' and gave it a comment. To view + the group that you created, make sure that the base class at the top of + the file tree to the left is selected, press the 'Groups' tab on the right, + and select your group name from the drop down menu. With any luck, you + will see something like this: +From this view, there are several options that are to be found in the + six buttons to the lower right. We are now going to create a resource. + This can be accomplished by either pressing the button 'Create Resource' + or selecting 'Add New Resource...' from the 'Options' menu at the top + of the screen. +Filling in Resource Information +Once you follow one of the above two steps, you should see a dialog similar + to the following: +The group shown is the one currently being viewed when you clicked on + the 'Create Resource' button. If you used the menu to bring up this dialog, + it may be a different group. You may move the resource to any group you + wish by changing the value in this drop down box. Both the entry key and + the translation fields are required information. These make up the lookup + value and the translation value respectively stored in your bundle. The + comment field is there in order to aid those who will be translating your + work into other languages. This field provides a way for you to describe + the context of this particular resource. +There are a few ways to create the resource once the information is entered. + Pressing 'Create' will add the resource and close the dialog. If you wish + to continue creating resources after the current one, pressing 'Create + & Continue' will create the resource, clear the information you have + just entered, and allow you to enter in a new resource. Pressing 'Cancel' + will close the dialog box and ignore any information currently entered. + As a short cut, you can also hit enter from any of the text boxes but + 'Translation'. This will create the resource. Pressing enter from the + translation text box, creates a translation that spans multiple lines + of text. +A sample resource creation is show as follows: +Using 'Look-ups' +Resource bundles provide a way of translating contextual information + as well. For instance, what if I wanted a translation asking the user + how old they were, and I wanted to ask it with their name inserted into + the question. The placement of their name might be different in different + languages. This is the reason for 'look-ups'. The java.text package defines + a way for implementing these look-ups using numbers surrounded by curly + braces. Thus, I might want to create a resource like the one below: +Once you enter anything into your translation surrounded by curly braces + and change the focus away from the translation field, the dialog box will + update itself with areas for you to enter descriptions of the look-ups + you have entered. This feature of RBManager allows future translators + to understand the context of each look-up. +Editing the Resources +From the 'Groups' tab view, you can at any time edit the default values + for a resource. As you enter in new resources they will appear in the + group view as shown: +Double clicking on a resource will bring a dialog box up similar to the + one for creating a resource. Remember that it is only from this view that + you will be able to change the resource in a way that will effect the + entire bundle. Thus it is only in this view that you can change the resource's + group, key name, and default translation and comment. + + |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+ Step 5. Adding Resource Files for New Languages+Creating a New Language File +The only way by which to create a new language file is by selecting the + 'Add New Resource File...' option from the 'Options' menu. When you do + so a dialog box will appear similar to this: +The top three fields identify the file. The bottom three sections, Language,
+ Country, and Variant define the role of the resource file within the bundle.
+ The only required field is the encoding field for the language. The encoding
+ fields are inserted into the name of the resource file whenever the fields
+ are filled. The file name would following the pattern Since there may be instances where the language file being created may + have few differences from the base class property file, an option is given + for copying or not all of the resources from the base class file to the + new file. By default, this option is selected and each resource will be + copied from the base file and marked as untranslated in the new resource + file. +Working with the New Language File Once a language file has been created, there will be resources that need + to be translated. This can be done from two different views. First, go + to the tree on the lower left of the screen and select the file that you + have just created. In this case it will be under the language encoding + de node of the tree. Select the file by clicking on it once. Selecting + the 'Untranslated' tab on the right should result in a view similar to + this: +
This section displays all of the resources that are marked as untranslated + in the file. Alternatively, you could select the 'Groups' tab and see + all of the resources, one group at a time, whether or not they have been + marked as translated. Double clicking on a row in the the tables present + in either view will bring up a dialog box similar to one you have all + ready seen: +The top three editable components are all disabled. This is because changing + them would required editing files other than the one currently being viewed. + This type of editing can be accomplished only from the base class. To + change the translation value, alter the field labeled 'Translation:' with + the new translation. You may also change the resource comment and lookup + comments if you like, but this change will be visible only from RBManager. + You also may find that the resource requires no translation if this is + the case, just select the 'Translated' check box at the bottom of the + dialog and press 'Edit'. If you change the translation, the 'Translated' + check box will automatically check itself when you are finished. +Continue this process until you have completely translated this file, + or leave the file untranslated, but save your work so that you or someone + else can return to it later. To learn how to save your results, go to + the next step. + + |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+ Step 6. Saving the Results+Always Save Periodically +None of the work you do in managing the resource bundle is final until + you have saved the results. The first time you save the resource bundle, + you should select the 'Save Resource Bundle As...' option from the file + menu. Select a folder in which to save the file and enter in the base + class name or the base class name followed by the .properties suffix and + press save. +Once this has been done, it is sufficient to chose the 'Save Resource + Bundle' option from the file menu. If you are working with a versioning + tool such as Microsoft's Visual Source Safe, etc., be sure that you have + write priveleges to the entire bundle of files. Otherwise, you will recieve + warning from RBManager that it was unable to write to all of the files. +A way to get around this is to save the resource files individually. + In order to do this, right click on a resource file in the tree view and + select the 'Save Resource File' option. This is not recommended if you + have made changes to the entire resource bundle, but if you have only + been doing translation work for a particular file, or a few files, saving + in this manner can be useful. +If you ever want to change the location or base class name of the resource + bundle, you may do so by resaving with the 'Save Resource Bundle As...' + option. +Good Luck +You will find that using this tool will speed up the development process + for your international application or web service. As this is only an + alpha version release, be sure to check alphaworks frequently for updates + in functionality and bug fixes. + + |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+
+
+ Functionality and Views+RB Manager offers five different ways to look at and + manipulate resource bundles. Four of these views are found in the tabs + located in the right portion of the display. The fifth is the tree view + located to the left. In the following pages, the use of each of these + views is explained. +
+
+ View 1. The Resource Bundle Tree+View 2. The Statistics Tab+View 3. The Untranslated Tab+View 4. The Groups Tab+View 5. The Search Tab+ |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+ View 1. The Resource Bundle Tree+Located on the left of the RB Manager application is a section for displaying + a resource bundle in a tree view. Resource Bundles usually are made up + of text or class files in a flat directory structure. However, the locale + encodings given to each file makes a tree view a natural way to look at + the bundle. +When RB Manager is initially launched, this view is empty, since there + is no open resource bundle. Upon opening a valid resource bundle, the + tree is updated to reflect the opened bundle. In the following screen + shots, you will see the tree for the resource bundle associate with RB + Manager itself. +The top most element of the tree (the root of the tree) represents the + resource bundle as a whole. Below the root are resource files, which are + represented with the file icons with a letter in the middle, and language, + country, and variant branches. Language branches are represented by an + icon with a globe. Beneath these can be language branches represented + by an icon with a flag. Beneath these can be variant branches represented + by an icon with a cartoon dialog symbol. Beneath any of the branch nodes, + resource files can be found. +The name of the root of the tree is the base name of the resource bundle, + in the example above, the bundle is called RBManager. The name of the + file nodes in the tree will vary according to where in the tree they are. + Each language file will display the language, country, and variant information + that it knows about followed by the encoding of the file's locale in parenthesies. + The branch nodes will indicate whether they are language, country, or + variant branches, and will display the encoding associated with that branch. +RB Manager functions in two basic ways for everything it does, either + for the resource bundle as a whole or for an individual resource file. + To make changes and updates to the entire resource bundle, select the + root node notated by the 'RB' icon at the top of the tree. This will also + cause the statistics and search views to present results reflecting the + status of the entire bundle. To work with an individual resource file, + select a file from the tree by clicking on it. Now changes and views will + reflect only this selected resource file. +Note that selecting the various branch nodes does not have any meaning + in the current version of RBManager. In future versions the ability to + work on subtrees may be added, but for now either select the resource + bundle or an individual file. +Understanding the difference between working with the resource bundle + and working with a resource file is crucial to using RB Manager. Normally + developers adding resources or manager wishing to know the statuts of + translation efforts will work from the root level. Translators and managers + of individual resource files will more often work from the resource file + level. Once the difference is understood, the functionality of the views + in the tab will be easier to understand. + + |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+ View 2. The Statistics Tab+The first tab on the right panel of the RB Manager application is the + Statistics tab. As with all of the tab views, the statistics tab looks + and functions differently when working with the resource bundle as a whole + than when working with an individual resource file. For an overview of + this difference see View 1. +Working with a Resource Bundle +The screen shot below shows RB Manager and some statistics concerning + the resource bundle associated with the application. +Three basic areas are covered by this view, Resource Files, Resource + Groups, and Resource Items. +In the Resource Files section, the total number of individual files is + shown as well as the names of these files (made up of the language, country, + and variant information known about the files). New resource files can + be added to the bundle by pressing the 'Add a New Resource File' button + or using the accelerator key (in this case 'N') in the manner specified + by your operating system. New files can also be added through the Options + menu. +In the Resource Groups section, the total number of groups associated + with the bundle as well as an alphabetical list of the groups is displayed. + For more information on Resource Groups, see the Tutorial. + New groups can be created by pressing the 'Add a New Resourece Group' + button. This can also be done from the Options menu or the Groups tab + view. +In the Resource Items view, the total number of resources in the bundle + is displayed. This number represents the number of resources in the base + class file, as the other resource files are not required to posses all + of the resource items. In addition, the number of duplicated resource + keys is displayed. This number should be zero or the resource bundle may + not function the way it was intended to. The list box will display the + names of the duplicated keys, so that the errors can be removed. Note + that if you create your Resource Bundles through RB Manager, you should + never have duplicate keys. However, if you imported the bundles from another + source, this error can be a common one. +Working with a Resource File +The screen shot below shows the statistics view for an individual resource + file, in this case the German (Deutsch) file. For our example, I have + removed some of the translations from this file. +This view shows some meta data that is associated with the Resource File. + This meta data has absolutely no impact on the functioning of the resource + bundle within an application. It is there solely to aid development and + translation teams in managing their efforts. +The Resource Title is a way to identify this file and will show at the + top of most views when working with a resource file. The Comment can be + used to specify anything special about this file. The Resource File Manager + is the person in charge of translations in the locale associated with + the file. The Language, Country, and Variant represent the long names + (i.e. not the ISO encodings) of the language, country, and variant associate + with the file. These are the names that show up in the Resource Tree. +Also displayed for the selected file is the total number of translations + in this file. This number should be less than or equal to the number of + translations in the bundle. The number of untranslated resource items + is also shown. These statistics are useful in monitoring the progress + of translation. To work with the untranslated items, a convenient view + is given in the Untranslated tab view. + + |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+ View 3. The Untranslated Tab+The Untranslated tab view, like all tab views, looks and functions differently + when working with the resource bundle as a whole than when working with + an individual resource file. For an overview of this difference see View + 1. The Untranslated tab view is most often used when working with + individual resource files, and is probably the largest convenience that + RB Manager offers over other methods of working with resource bundles. +Working with a Resource Bundle +The screen shot below shows RB Manager and a view of untranslated items + for the entire resource bundle. +From this view, resource bundles can not be edited. To do this you either + have to go to the Groups tab view or select an individual resource file. + The view is useful though for getting a picture of the translation status + of the entire resource bundle. +In this view, each of the resource files is represented and the number + of untranslated items is displayed as well as the resource key for each + of those items. Scrolling up and down the view gives a complete look at + the various files. +Working with a Resource File +The next screen shot shows the Untranslated tab view when working with + an individual resource file. This is the view translators will probably + use the most. +Listed in the table is each of the resource currently marked as untranslated + (for more on the meta data associated with each resource, see the Tutorial). + The table shows the resource key and group of the resource, which can + not be edited from a resource file view, and the translation of the resource, + which can be edited here. +To translate a resource, simply double click the row containing the resource. + A dialog box will pop up allowing the resource file specific elements + of the resource to be edited. That dialog box is shown here. Its use can + be found in the Tutorial. +In some cases, you may want to leave the translation as it stands. This + is common for instance when working with variants of a language with little + change from the language parent (e.g. Canadian English and U.S. English + have relatively few differences). +There are two ways to handle this. One way is to select the resource + and mark it as translated. This can be done by pressing the 'Mark Resource + as Translated' button or double clicking the resource, checking the 'Translated' + check box and clicking the 'Edit' button. The other way is to remove the + resource from the resource file by selecting the resource and clicking + 'Delete Resource'. +Either way, the resource bundle should act the same when presenting translations + to the user. In the former case, the translation from the resource file + is used. In the latter case, the translation falls back to the one found + in an ancestor resource file. +Note that only one resource can be edited at a time in the current version + of RB Manager. Future versions will allow multiple selections of resources + in this view. + + |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+ View 4. The Groups Tab+The Groups tab view, like all tab views, looks and functions differently + when working with the resource bundle as a whole than when working with + an individual resource file. For an overview of this difference see View + 1. RB Manager adds a level of heirarchy not commonly found in resource + bundles. This addtional level is called Groups. For more information on + Resource Groups see the Tutorial. +Working with a Resource Bundle +The screen shot below shows RB Manager and a view of groups for the entire + resource bundle. +Unlike the Untranslated tab view, this view allows the editing of resources. + Editing or adding resources at this level affects the resource bundle + as a whole. Thus if a resource has all ready been translated in a resource + file, it will be marked as untranslated to reflect the change in the entire + bundle. +Editing a resource is as simple as selecting the group from the drop + down box at the top of the screen, double clicking a resource, making + the desired change, and clicking 'Edit' on the dialog box resulting from + the double click. Optionally, the resource can be edited by selecting + it and pressing the 'Edit Resource' button instead of double clicking. +The Resource Group can also be edited. The name and comment associate + with the group can be changed by pressing the 'Edit Group' button. Pressing + the 'Delete Group' button will delete both the group and all resources + contained within it. A dialog will prompt you when this button is pressed + to make sure this is what you intend to do. +Resources created in the Group view will by default be placed in the + group currently being shown. This can be changed however by selecting + another group name from the resource creation dialog box. +This view is probably the most commonly used view by developers inserting + new resources into a bundle. +Working with a Resource File +The next screen shot shows the Group tab view when working with an individual + resource file. +The functionality of this view mostly mirrors that of the Untranslated + tab view. More on that view is found in View 3. + The only addition is that resources all ready marked as translated can + be seen and edited from this view. Selecting a group from the drop down + box will update the display with all resources, translated or not, from + that group. + + |
+ ||||||||||
+ + | ++ + | +
+ |
+
![]() |
+ + | ||||||||||
+ ![]() |
+ |||||||||||
+
+ |
+
+
+ View 5. The Search Tab+The Groups tab view, like all tab views, looks and functions differently + when working with the resource bundle as a whole than when working with + an individual resource file. However, unlike the other tab views, the + differences are minimal. Searching from the bundle performs the search + on the base class and edits to the found resources affect the entire bundle. + Searching from a resource file restricts the search to that file and the + changes are also restricted to that resource file. +A screen shot of the Search tab view for the resource bundle is given + below. The view for the individual resource files is nearly identical. +There are two basic functions to this view, Find All and Replace All. + Find All takes the parameters given it and populates the result table + with any matches found (note that the current version of RB Manager does + not support wild card characters or regular expressions). The resulting + table can be edited as in the other views by doubling clicking a row in + the table. +Replace All works by first finding all of the resources in the same manner + as Find All and then replacing the text that is found with the text given + in the Replace text box. It is recommended that you first perform Find + All before Replace All. The current version of RB Manager does an all + or nothing replace. Future versions may allow step by step replacement. +Using the check boxes on the page, you can specify any combination of + three parts of the resources to search: Resource Keys, Translations, and + Comments. A fourth check box allows you to make the search case sensitive. +This view was introduced in version 0.3a of RB Manager. + + |
+ ||||||||||
+ + | ++ + | +
+ |
+