Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
86d89f0c5c | ||
|
|
0492a9410c | ||
|
|
ebcc631659 | ||
|
|
56fdd55ede | ||
|
|
5f7b623a57 |
+160
@@ -48,6 +48,166 @@ README text !eol
|
||||
*.spp -text
|
||||
*.tri2 -text
|
||||
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/TitleLogo_transparent.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/arrow_bullet.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/diamond_bullet.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/ibm_logo_small_white.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/RBReporter.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/basic_file.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/basic_group.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/basic_resource.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/basic_translation.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/basic_untranslated.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/create_group.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/empty_group.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/empty_resource.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/empty_screen.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/empty_with_preferences.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/laf_metal.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/laf_motif.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/laf_windows.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/lookup_resource.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/main_page.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/menu_file.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/menu_file_export.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/menu_file_import.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/menu_help.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/menu_options.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/menu_popup_tree.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/new_baseclass.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/new_bundle.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/preferences_dialog.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/view_groups_bundle.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/view_groups_file.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/view_search.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/view_stats_bundle.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/view_stats_file.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/view_tree_basic.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/view_untrans_bundle.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/view_untrans_dialog0.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/screenshots/view_untrans_file.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/spacer.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/template_l.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/template_line.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/template_ll.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/template_u.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/docs/images/template_ul.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/images/TitleLogo_transparent.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/images/tree_icon_bundle.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/images/tree_icon_country.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/images/tree_icon_file.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/images/tree_icon_group.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/images/tree_icon_item.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/images/tree_icon_language.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/images/tree_icon_project.gif -text
|
||||
rbm-release-0-6/com/ibm/rbm/images/tree_icon_variant.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/TitleLogo_transparent.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/arrow_bullet.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/diamond_bullet.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/ibm_logo_small_white.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/RBReporter.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/basic_file.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/basic_group.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/basic_resource.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/basic_translation.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/basic_untranslated.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/create_group.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/empty_group.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/empty_resource.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/empty_screen.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/empty_with_preferences.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/laf_metal.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/laf_motif.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/laf_windows.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/lookup_resource.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/main_page.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/menu_file.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/menu_file_export.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/menu_file_import.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/menu_help.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/menu_options.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/menu_popup_tree.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/new_baseclass.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/new_bundle.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/preferences_dialog.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/view_groups_bundle.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/view_groups_file.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/view_search.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/view_stats_bundle.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/view_stats_file.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/view_tree_basic.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/view_untrans_bundle.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/view_untrans_dialog0.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/screenshots/view_untrans_file.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/spacer.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/template_l.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/template_line.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/template_ll.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/template_u.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/docs/images/template_ul.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/gui/images/TitleLogo_transparent.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/gui/images/tree_icon_bundle.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/gui/images/tree_icon_country.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/gui/images/tree_icon_file.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/gui/images/tree_icon_group.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/gui/images/tree_icon_item.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/gui/images/tree_icon_language.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/gui/images/tree_icon_project.gif -text
|
||||
rbm-release-0-7-1/com/ibm/rbm/gui/images/tree_icon_variant.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/TitleLogo_transparent.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/arrow_bullet.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/diamond_bullet.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/ibm_logo_small_white.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/RBReporter.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/basic_file.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/basic_group.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/basic_resource.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/basic_translation.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/basic_untranslated.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/create_group.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/empty_group.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/empty_resource.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/empty_screen.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/empty_with_preferences.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/laf_metal.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/laf_motif.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/laf_windows.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/lookup_resource.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/main_page.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/menu_file.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/menu_file_export.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/menu_file_import.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/menu_help.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/menu_options.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/menu_popup_tree.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/new_baseclass.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/new_bundle.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/preferences_dialog.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/view_groups_bundle.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/view_groups_file.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/view_search.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/view_stats_bundle.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/view_stats_file.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/view_tree_basic.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/view_untrans_bundle.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/view_untrans_dialog0.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/screenshots/view_untrans_file.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/spacer.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/template_l.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/template_line.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/template_ll.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/template_u.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/docs/images/template_ul.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/gui/images/TitleLogo_transparent.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/gui/images/tree_icon_bundle.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/gui/images/tree_icon_country.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/gui/images/tree_icon_file.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/gui/images/tree_icon_group.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/gui/images/tree_icon_item.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/gui/images/tree_icon_language.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/gui/images/tree_icon_project.gif -text
|
||||
rbm-release-0-7/com/ibm/rbm/gui/images/tree_icon_variant.gif -text
|
||||
|
||||
# The following file types are stored in Git-LFS.
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.dat filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
rbm-release-0-7-1/com/ibm/rbm/lib
|
||||
rbm-release-0-7/com/ibm/rbm/lib
|
||||
@@ -0,0 +1,460 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/Bundle.java,v $
|
||||
* $Date: 2002/05/20 18:53:10 $
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.io.Writer;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* A class representing the entire Bundle of Resources for a particular language, country, variant.
|
||||
*
|
||||
* @author Jared Jackson - Email: <a href="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</a>
|
||||
* @see com.ibm.rbm.RBManager
|
||||
*/
|
||||
public class Bundle {
|
||||
|
||||
// The following public class variables reflect the various properties that can be included as
|
||||
// meta-data in a resource bundle formatted by RBManager
|
||||
public String name;
|
||||
/**
|
||||
* The encoding of the bundle (e.g. 'en', 'en_US', 'de', etc.)
|
||||
*/
|
||||
public String encoding;
|
||||
/**
|
||||
* A descriptor of the language in the encoding (e.g. English, German, etc.)
|
||||
*/
|
||||
public String language;
|
||||
/**
|
||||
* A descriptor of the country in the encoding (e.g. US, Canada, Great Britain)
|
||||
*/
|
||||
public String country;
|
||||
/**
|
||||
* The descriptor of the variant in the encoding (e.g. Euro, Irish, etc.)
|
||||
*/
|
||||
public String variant;
|
||||
/**
|
||||
* A comment concerning the bundle
|
||||
*/
|
||||
public String comment;
|
||||
/**
|
||||
* The name of the person responsible for the managerment of this bundle
|
||||
*/
|
||||
public String manager;
|
||||
|
||||
private TreeSet groups; // A vector of groups of NLS items, the key is the group name
|
||||
|
||||
/**
|
||||
* A hashtable of all of the items in the bundle, hashed according to their
|
||||
* NLS key.
|
||||
*/
|
||||
|
||||
public Hashtable allItems; // A hashtable of all items in the file, the key is the NLS key
|
||||
|
||||
private TreeSet untranslatedItems; // A vector of all items which are untranslated
|
||||
|
||||
/**
|
||||
* A vector containing all of the items which are duplicates (based on the NLS keys)
|
||||
* of items previously declared in the bundle.
|
||||
*/
|
||||
|
||||
public Vector duplicates; // A vector of items which are duplicates (NLS Keys) of previous items
|
||||
|
||||
/**
|
||||
* Constructor for creating an empty bundle with a given encoding
|
||||
*/
|
||||
|
||||
public Bundle(String encoding) {
|
||||
this.encoding = encoding;
|
||||
language = null;
|
||||
country = null;
|
||||
variant = null;
|
||||
comment = null;
|
||||
manager = null;
|
||||
groups = new TreeSet(new Comparator() {
|
||||
public boolean equals(Object o) { return false; }
|
||||
|
||||
public int compare(Object o1, Object o2) {
|
||||
if (!(o1 instanceof BundleGroup) || !(o2 instanceof BundleGroup)) return 0;
|
||||
BundleGroup g1 = (BundleGroup)o1;
|
||||
BundleGroup g2 = (BundleGroup)o2;
|
||||
return g1.getName().compareTo(g2.getName());
|
||||
}
|
||||
});
|
||||
|
||||
untranslatedItems = new TreeSet(new Comparator() {
|
||||
public boolean equals(Object o) { return false; }
|
||||
|
||||
public int compare(Object o1, Object o2) {
|
||||
if (!(o1 instanceof BundleItem) || !(o2 instanceof BundleItem)) return 0;
|
||||
BundleItem i1 = (BundleItem)o1;
|
||||
BundleItem i2 = (BundleItem)o2;
|
||||
return i1.getKey().compareTo(i2.getKey());
|
||||
}
|
||||
});
|
||||
|
||||
duplicates = new Vector();
|
||||
allItems = new Hashtable();
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodings are of the form -> language_country_variant <- (e.g. en_us_southern)
|
||||
* This method returns the language encoding string, or null if it is not specified
|
||||
*/
|
||||
|
||||
public String getLanguageEncoding() {
|
||||
if (encoding == null) return null;
|
||||
if (encoding.indexOf("_") >= 0) return encoding.substring(0,encoding.indexOf("_"));
|
||||
else return encoding.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodings are of the form -> language_country_variant <- (e.g. en_us_southern)
|
||||
* This method returns the country encoding string, or null if it is not specified
|
||||
*/
|
||||
|
||||
public String getCountryEncoding() {
|
||||
if (encoding == null || encoding.indexOf("_") < 0) return null;
|
||||
// Strip off the language
|
||||
String workStr = encoding.substring(encoding.indexOf("_")+1,encoding.length());
|
||||
if (workStr.indexOf("_") >= 0) return workStr.substring(0,encoding.indexOf("_"));
|
||||
else return workStr.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodings are of the form -> language_country_variant <- (e.g. en_us_southern)
|
||||
* This method returns the variant encoding string, or null if it is not specified
|
||||
*/
|
||||
|
||||
public String getVariantEncoding() {
|
||||
if (encoding == null || encoding.indexOf("_") < 0) return null;
|
||||
// Strip off the language
|
||||
String workStr = encoding.substring(encoding.indexOf("_")+1,encoding.length());
|
||||
if (workStr == null || workStr.length() < 1 || workStr.indexOf("_") < 0) return null;
|
||||
// Strip off the country
|
||||
workStr = workStr.substring(encoding.indexOf("_")+1, workStr.length());
|
||||
return workStr.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the UntranslatedItems as a vector. I should find where this happens and stop it.
|
||||
*/
|
||||
|
||||
public Vector getUntranslatedItemsAsVector() {
|
||||
Iterator iter = untranslatedItems.iterator();
|
||||
Vector v = new Vector();
|
||||
while (iter.hasNext()) v.addElement(iter.next());
|
||||
return v;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks all items in the untranslated items set. If they belong to a group whose name
|
||||
* matches the passed in name, then they are removed.
|
||||
*/
|
||||
|
||||
public void removeUntranslatedItemsByGroup(String groupName) {
|
||||
Iterator iter = untranslatedItems.iterator();
|
||||
try {
|
||||
while(iter.hasNext()) {
|
||||
BundleItem item = null;
|
||||
item = (BundleItem)iter.next();
|
||||
if (item != null && item.getParentGroup().getName().equals(groupName)) {
|
||||
removeUntranslatedItem(item.getKey());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
RBManagerGUI.debugMsg(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks to see if an item of the given key name exists in the set of untranslated items. If
|
||||
* it does exist, then it is removed.
|
||||
*/
|
||||
|
||||
public void removeUntranslatedItem(String name) {
|
||||
Iterator iter = untranslatedItems.iterator();
|
||||
while (iter.hasNext()) {
|
||||
BundleItem item = (BundleItem)iter.next();
|
||||
if (item.getKey().equals(name)) {
|
||||
untranslatedItems.remove(item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the boolean of wether a group of a given name exists in the bundle
|
||||
*/
|
||||
|
||||
public boolean hasGroup(String groupName) {
|
||||
Iterator iter = groups.iterator();
|
||||
while (iter.hasNext()) {
|
||||
BundleGroup group = (BundleGroup)iter.next();
|
||||
if (group.getName().equals(groupName)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a group of the given name and optionally associates a comment with
|
||||
* that group.
|
||||
*/
|
||||
|
||||
public void addBundleGroup(String groupName, String groupComment) {
|
||||
BundleGroup bg = new BundleGroup(this, groupName);
|
||||
bg.setComment(groupComment);
|
||||
addBundleGroup(bg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the group of the given name if it exists in the bundle
|
||||
*/
|
||||
|
||||
public void removeGroup(String groupName) {
|
||||
Iterator iter = groups.iterator();
|
||||
while (iter.hasNext()) {
|
||||
BundleGroup tempGroup = (BundleGroup)iter.next();
|
||||
if (tempGroup.getName().equals(groupName)) {
|
||||
groups.remove(tempGroup);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Remove the items from the untanslated items
|
||||
removeUntranslatedItemsByGroup(groupName);
|
||||
|
||||
// Loop through all Items
|
||||
Enumeration enum = allItems.elements();
|
||||
while(enum.hasMoreElements()) {
|
||||
BundleItem item = (BundleItem)enum.nextElement();
|
||||
if (item.getParentGroup().getName().equals(groupName)) {
|
||||
allItems.remove(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a single resource item from the bundle
|
||||
*/
|
||||
|
||||
public void removeItem(String key) {
|
||||
Object o = allItems.get(key);
|
||||
if (o != null) {
|
||||
BundleItem item = (BundleItem)o;
|
||||
// Remove from allItems Hashtable
|
||||
allItems.remove(key);
|
||||
// Remove from item's group
|
||||
if (item.getParentGroup() != null) {
|
||||
BundleGroup group = item.getParentGroup();
|
||||
group.removeBundleItem(key);
|
||||
}
|
||||
// Remove from untranslatedItems Hashtable
|
||||
removeUntranslatedItem(key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to add a BundleItem to the untranslatedItems. The addition will fail in two cases: One, if
|
||||
* the item does not all ready belong to this Bundle, and Two, if the item is all ready in the set of
|
||||
* untranslated items.
|
||||
*/
|
||||
|
||||
protected void addUntranslatedItem(BundleItem item) {
|
||||
if (item.getParentGroup().getParentBundle() != this) return;
|
||||
// First check to see if it is all ready there
|
||||
boolean found = false;
|
||||
Iterator iter = untranslatedItems.iterator();
|
||||
while (iter.hasNext()) {
|
||||
BundleItem oldItem = (BundleItem)iter.next();
|
||||
if (oldItem == item) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) untranslatedItems.add(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of items currently marked as untranslated
|
||||
*/
|
||||
|
||||
public int getUntranslatedItemsSize() {
|
||||
return untranslatedItems.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the indexth untranslated item
|
||||
*/
|
||||
|
||||
public BundleItem getUntranslatedItem(int index) {
|
||||
if (index >= untranslatedItems.size()) return null;
|
||||
Iterator iter = untranslatedItems.iterator();
|
||||
for (int i=0; i < index; i++) iter.next();
|
||||
return (BundleItem)iter.next();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the various resource bundle groups stored in a Vector collection.
|
||||
*/
|
||||
|
||||
public Vector getGroupsAsVector() {
|
||||
Vector v = new Vector();
|
||||
Iterator iter = groups.iterator();
|
||||
while (iter.hasNext()) {
|
||||
BundleGroup group = (BundleGroup)iter.next();
|
||||
v.addElement(group);
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of groups in the bundle.
|
||||
*/
|
||||
|
||||
public int getGroupCount() {
|
||||
return groups.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a bundle group given a certain index.
|
||||
*/
|
||||
|
||||
public BundleGroup getBundleGroup(int index) {
|
||||
if (index >= getGroupCount()) return null;
|
||||
Iterator iter = groups.iterator();
|
||||
for (int i=0; i < index; i++) iter.next();
|
||||
return (BundleGroup)iter.next();
|
||||
}
|
||||
|
||||
/**
|
||||
* Looks for a bundle group of a given name within a bundle and
|
||||
* returns it if found.
|
||||
*/
|
||||
|
||||
public BundleGroup getBundleGroup(String groupName) {
|
||||
Iterator iter = groups.iterator();
|
||||
while(iter.hasNext()) {
|
||||
BundleGroup group = (BundleGroup)iter.next();
|
||||
if (group.getName().equals(groupName)) return group;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Looks up and returns a bundle item stored in the bundle based on its
|
||||
* NLS lookup key.
|
||||
*/
|
||||
|
||||
public BundleItem getBundleItem(String key) {
|
||||
return (BundleItem)allItems.get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* One group is created for all bundles called 'Ungrouped Items'. This is the bundle
|
||||
* group in which bundle items are placed that are not specifically grouped in the
|
||||
* resource bundle file. This method returns that bundle group.
|
||||
*/
|
||||
|
||||
public BundleGroup getUngroupedGroup() {
|
||||
return getBundleGroup("Ungrouped Items");
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a bundle group to the bundle
|
||||
*/
|
||||
|
||||
public void addBundleGroup(BundleGroup bg) {
|
||||
groups.add(bg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a bundle item to the bundle. This bundle item should all ready have its
|
||||
* bundle group assigned.
|
||||
*/
|
||||
|
||||
public void addBundleItem(BundleItem item) {
|
||||
if (allItems.containsKey(item.getKey())) {
|
||||
duplicates.addElement(item);
|
||||
} else {
|
||||
if (!(groups.contains(item.getParentGroup()))) addBundleGroup(item.getParentGroup());
|
||||
item.getParentGroup().addBundleItem(item);
|
||||
allItems.put(item.getKey(), item);
|
||||
if (!item.isTranslated()) addUntranslatedItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A method useful in debugging. The string returned displays the encoding
|
||||
* information about the bundle and wether or not it is the base class of
|
||||
* a resource bundle.
|
||||
*/
|
||||
|
||||
public String toString() {
|
||||
String retStr = new String();
|
||||
if (language != null && !language.equals("")) retStr = language;
|
||||
if (country != null && !country.equals("")) retStr += ", " + country;
|
||||
if (variant != null && !variant.equals("")) retStr += ", " + variant;
|
||||
|
||||
retStr += " (" + (encoding == null || encoding.equals("") ? "Base Class" : encoding) + ")";
|
||||
return retStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method produces a String which is suitable for inclusion in a .properties
|
||||
* style resource bundle. It attaches (in comments) the meta data that RBManager
|
||||
* reads to manage the resource bundle file. This portion of the output should
|
||||
* be included at the beginning of the resource bundle file.
|
||||
*/
|
||||
|
||||
public String toOutputString() {
|
||||
String retStr = "# @file " + name + "\n";
|
||||
if (encoding != null) retStr += "# @fileEncoding " + encoding + "\n";
|
||||
if (language != null) retStr += "# @fileLanguage " + language + "\n";
|
||||
if (country != null) retStr += "# @fileCountry " + country + "\n";
|
||||
if (variant != null) retStr += "# @fileVariant " + variant + "\n";
|
||||
if (manager != null) retStr += "# @fileManager " + manager + "\n";
|
||||
if (comment != null) retStr += "# @fileComment " + comment + "\n";
|
||||
return retStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* A helping method for outputting the formatted contents of the bundle to a
|
||||
* print stream. The method first outputs the header information and then outputs
|
||||
* each bundle group's formatted data which includes each bundle item.
|
||||
*/
|
||||
|
||||
public void writeContents(PrintStream ps) {
|
||||
ps.println(this.toOutputString());
|
||||
Iterator iter = groups.iterator();
|
||||
while (iter.hasNext()) {
|
||||
((BundleGroup)iter.next()).writeContents(ps);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A helping method for outputting the formatted contents of the bundle to a
|
||||
* ouput Writer (such as a FileWriter). The method first outputs the header
|
||||
* information and then outputs each bundle group's formatted data which includes
|
||||
* each bundle item.
|
||||
*/
|
||||
|
||||
public void writeContents(Writer w) throws IOException {
|
||||
w.write(this.toOutputString() + "\n");
|
||||
Iterator iter = groups.iterator();
|
||||
while (iter.hasNext()) {
|
||||
((BundleGroup)iter.next()).writeContents(w);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/BundleGroup.java,v $
|
||||
* $Date: 2002/05/20 18:53:10 $
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.io.Writer;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* A class representing a group of BundleItems and the meta data associated with that group
|
||||
*
|
||||
* @author Jared Jackson - Email: <a href="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</a>
|
||||
* @see com.ibm.rbm.RBManager
|
||||
*/
|
||||
public class BundleGroup {
|
||||
private String name; // The name of the group
|
||||
private String comment; // A comment describing this group
|
||||
private TreeSet items; // The NLS items contained in this group
|
||||
private Bundle bundle; // The parent Bundle object of this group
|
||||
|
||||
/**
|
||||
* Basic data constructor. Creates a BundleGroup with a parent bundle and a given name.
|
||||
*/
|
||||
|
||||
public BundleGroup(Bundle parent, String name) {
|
||||
bundle = parent;
|
||||
this.name = name;
|
||||
comment = null;
|
||||
items = new TreeSet(new Comparator(){
|
||||
public boolean equals(Object o) { return false; }
|
||||
public int compare(Object o1, Object o2) {
|
||||
if (!(o1 instanceof BundleItem) || !(o2 instanceof BundleItem)) return 0;
|
||||
BundleItem i1 = (BundleItem)o1;
|
||||
BundleItem i2 = (BundleItem)o2;
|
||||
return i1.getKey().compareTo(i2.getKey());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Two bundle groups are considered equal iff their names are the same.
|
||||
*/
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o instanceof BundleGroup && ((BundleGroup)o).getName().equals(name)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
// This should be changed anywhere it is used
|
||||
|
||||
protected Vector getItemsAsVector() {
|
||||
Vector v = new Vector();
|
||||
Iterator iter = items.iterator();
|
||||
while (iter.hasNext()) {
|
||||
v.addElement(iter.next());
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a BundleItem to the group as long as that item is not currently in the group. If the
|
||||
* item.group is not equal to this group, then it is changed to be this group. <BR/>
|
||||
* This method should, in most cases, only be called from the Bundle class.
|
||||
*/
|
||||
|
||||
public void addBundleItem(BundleItem item) {
|
||||
Iterator iter = items.iterator();
|
||||
boolean found = false;
|
||||
while (iter.hasNext()) {
|
||||
BundleItem oldItem = (BundleItem)iter.next();
|
||||
if (oldItem == item) found = true;
|
||||
}
|
||||
if (!found) {
|
||||
item.setParentGroup(this);
|
||||
items.add(item);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an item of the given name from the group
|
||||
*/
|
||||
|
||||
public void removeBundleItem(String itemName) {
|
||||
Iterator iter = items.iterator();
|
||||
while(iter.hasNext()) {
|
||||
BundleItem item = (BundleItem)iter.next();
|
||||
if (item.getKey().equals(itemName)) {
|
||||
items.remove(item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of items stored in the group
|
||||
*/
|
||||
|
||||
public int getItemCount() {
|
||||
return items.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a BundleItem from the set of items at a particular index point. If the index is greater than or equal
|
||||
* to the number of items in the set, null is returned.
|
||||
*/
|
||||
|
||||
public BundleItem getBundleItem(int index) {
|
||||
if (index >= items.size()) return null;
|
||||
Iterator iter = items.iterator();
|
||||
for (int i=0; i < index; i++) iter.next();
|
||||
return (BundleItem)iter.next();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the bundle to which this group belongs
|
||||
*/
|
||||
|
||||
public Bundle getParentBundle() {
|
||||
return bundle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the comment associated with this bundle
|
||||
*/
|
||||
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the bundle
|
||||
*/
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
protected void setParentBundle(Bundle bundle) {
|
||||
this.bundle = bundle;
|
||||
}
|
||||
|
||||
protected void setComment(String comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
protected void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* The translation to a string returns the name of the group
|
||||
*/
|
||||
|
||||
public String toString() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the output for a group heading. This will be found in comment lines above the group items
|
||||
*/
|
||||
|
||||
public String toOutputString() {
|
||||
String retStr = "\n#\n# @group " + name + "\n#\n";
|
||||
if (comment != null) retStr += "# @groupComment " + comment + "\n";
|
||||
return retStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the output contents to a particular PrintStream. The output will be suitable for a properly
|
||||
* formatted .properties file.
|
||||
*/
|
||||
|
||||
public void writeContents(PrintStream ps) {
|
||||
if (!name.equals("Ungrouped Items")) ps.println(this.toOutputString());
|
||||
Iterator iter = items.iterator();
|
||||
while (iter.hasNext()) {
|
||||
((BundleItem) iter.next()).writeContents(ps);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the output contents to a particular Writer. The output will be suitable for a properly
|
||||
* formatted .properties file.
|
||||
*/
|
||||
|
||||
public void writeContents(Writer w) throws IOException {
|
||||
if (!name.equals("Ungrouped Items")) w.write(this.toOutputString() + "\n");
|
||||
Iterator iter = items.iterator();
|
||||
while (iter.hasNext()) {
|
||||
((BundleItem) iter.next()).writeContents(w);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,390 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/BundleItem.java,v $
|
||||
* $Date: 2002/05/20 18:53:10 $
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.io.Writer;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* A class representing a single translation item and all of the meta-data associated with that translation
|
||||
*
|
||||
* @author Jared Jackson - Email: <a href="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</a>
|
||||
* @see com.ibm.rbm.RBManager
|
||||
*/
|
||||
public class BundleItem {
|
||||
private String name; // The name of the NLS item key
|
||||
private String value; // The translation of the key item
|
||||
private String comment; // A comment about this item
|
||||
private boolean translated; // Has this item been translated?
|
||||
private Date created; // The date of creation of the item
|
||||
private Date modified; // The last modification date of the item
|
||||
private String creator; // The name of the person who created the item
|
||||
private String modifier; // The name of the person who last modified the item
|
||||
private Hashtable lookups; // A hastable of lookups for the item (i.e. ({#}, Meaning) pairs)
|
||||
private BundleGroup group; // The parent group of the item
|
||||
|
||||
/**
|
||||
* Basic data constructor for a resource bundle item.
|
||||
* @param parent The BundleGroup to which the item belongs. This group will have its own Bundle parent.
|
||||
* @param name The NLS lookup key common across all bundle files in the resource bundle
|
||||
* @param value The translated value of the item appropriate for the encoding of the bundle file to which the item belongs
|
||||
*/
|
||||
|
||||
public BundleItem(BundleGroup parent, String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.group = parent;
|
||||
comment = null;
|
||||
translated = false;
|
||||
created = new Date(); // Defaults to the system's current date
|
||||
modified = new Date(); // Defaults to the system's current date
|
||||
creator = null;
|
||||
modifier = null;
|
||||
lookups = new Hashtable();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the BundleGroup to which this item belongs
|
||||
*/
|
||||
|
||||
public BundleGroup getParentGroup() {
|
||||
return group;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the date this item was last modified.
|
||||
*/
|
||||
|
||||
public Date getModifiedDate() {
|
||||
return modified;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the date the item was first created.
|
||||
*/
|
||||
|
||||
public Date getCreatedDate() {
|
||||
return created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the login name of the user that created the item.
|
||||
*/
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the login name of the user that last modified the item.
|
||||
*/
|
||||
|
||||
public String getModifier() {
|
||||
return modifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the NLS lookup key for the item.
|
||||
*/
|
||||
|
||||
public String getKey() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the translation value for the item.
|
||||
*/
|
||||
|
||||
public String getTranslation() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a comment associated with the item.
|
||||
*/
|
||||
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Has the item yet been translated, or was it merely derived from a previous
|
||||
* bundle file?
|
||||
*/
|
||||
|
||||
public boolean isTranslated() {
|
||||
return translated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a hashtable of the various lookups associated with the item. Lookups are
|
||||
* context sensitive information stored within the resource item and have their own
|
||||
* meta-data associated with themselves.
|
||||
*/
|
||||
|
||||
public Hashtable getLookups() {
|
||||
return lookups;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the translated value of the item. A true mark indicates that the item has
|
||||
* been examined or modified and is ready for use in the encoding specified by the
|
||||
* parent Bundle.
|
||||
*/
|
||||
|
||||
public void setTranslated(boolean isTranslated) {
|
||||
if (translated == isTranslated) return;
|
||||
translated = isTranslated;
|
||||
if (this.getParentGroup() != null && this.getParentGroup().getParentBundle() != null) {
|
||||
Bundle bundle = this.getParentGroup().getParentBundle();
|
||||
if (isTranslated) bundle.removeUntranslatedItem(this.name);
|
||||
else bundle.addUntranslatedItem(this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the comment associated with this item.
|
||||
*/
|
||||
|
||||
public void setComment(String comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a hashtable of lookups, associates those lookups with this item.
|
||||
*/
|
||||
|
||||
protected void setLookups(Hashtable lookups) {
|
||||
this.lookups = lookups;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the NLS key associated with this item. Be careful using this method, as
|
||||
* it does not change the lookup value of any other items in the resource bundle.
|
||||
* This must be done at a higher level.
|
||||
*/
|
||||
|
||||
public void setKey(String keyName) {
|
||||
name = keyName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the translation value of the item.
|
||||
*/
|
||||
|
||||
public void setTranslation(String translationValue) {
|
||||
value = translationValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the parent BundleGroup of the item.
|
||||
*/
|
||||
|
||||
public void setParentGroup(BundleGroup group) {
|
||||
this.group = group;
|
||||
}
|
||||
|
||||
/**
|
||||
* Associates a login name of the creator of the item with the item.
|
||||
*/
|
||||
|
||||
public void setCreator(String name) {
|
||||
creator = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Associates a login name of the last modifier of the item with the item.
|
||||
*/
|
||||
|
||||
public void setModifier(String name) {
|
||||
modifier = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the created date of the item given a date formatted string.
|
||||
* The format can be either 'YYYY-MM-DD' (e.g. 20002-02-05) or
|
||||
* the format can be 'YYYMMDDTHHMMSSZ' (e.g. 20020205T103000Z)
|
||||
*/
|
||||
|
||||
public void setCreatedDate(String dateStr) {
|
||||
if (dateStr != null) created = parseDateFromString(dateStr);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the created date of the item.
|
||||
*/
|
||||
|
||||
public void setCreatedDate(Date date) {
|
||||
created = date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the last modififcation date of the item given a date formatted string.
|
||||
* The format can be either 'YYYY-MM-DD' (e.g. 20002-02-05) or
|
||||
* the format can be 'YYYMMDDTHHMMSSZ' (e.g. 20020205T103000Z)
|
||||
*/
|
||||
|
||||
public void setModifiedDate(String dateStr) {
|
||||
if (dateStr != null) modified = parseDateFromString(dateStr);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the last modification date of the item.
|
||||
*/
|
||||
|
||||
public void setModifiedDate(Date date) {
|
||||
modified = date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simply returns the lookup name of the item.
|
||||
*/
|
||||
|
||||
public String toString() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the formatted output of this bundle item as it would be included in a .properties
|
||||
* formatted resource bundle file. This format also contains the meta-data used by RBManager in
|
||||
* the form of parseable comments.
|
||||
*/
|
||||
|
||||
public String toOutputString() {
|
||||
String retStr = (translated ? "# @translated true" : "# @translated false");
|
||||
if (created != null) {
|
||||
GregorianCalendar createdCal = new GregorianCalendar();
|
||||
createdCal.setTime(created);
|
||||
int year = createdCal.get(Calendar.YEAR);
|
||||
int month = createdCal.get(Calendar.MONTH)+1;
|
||||
int day = createdCal.get(Calendar.DAY_OF_MONTH);
|
||||
retStr += " @created " + String.valueOf(year) + "-"
|
||||
+ (month > 9 ? String.valueOf(month) : "0" + String.valueOf(month)) + "-"
|
||||
+ (day > 9 ? String.valueOf(day) : "0" + String.valueOf(day));
|
||||
}
|
||||
if (modified != null) {
|
||||
GregorianCalendar modifiedCal = new GregorianCalendar();
|
||||
modifiedCal.setTime(modified);
|
||||
int year = modifiedCal.get(Calendar.YEAR);
|
||||
int month = modifiedCal.get(Calendar.MONTH)+1;
|
||||
int day = modifiedCal.get(Calendar.DAY_OF_MONTH);
|
||||
retStr += " @modified " + String.valueOf(year) + "-"
|
||||
+ (month > 9 ? String.valueOf(month) : "0" + String.valueOf(month)) + "-"
|
||||
+ (day > 9 ? String.valueOf(day) : "0" + String.valueOf(day));
|
||||
}
|
||||
if (creator != null) retStr += " @creator " + creator;
|
||||
if (modifier != null) retStr += " @modifier " + modifier;
|
||||
Enumeration enum = lookups.keys();
|
||||
while (enum.hasMoreElements()) {
|
||||
String str = (String)enum.nextElement();
|
||||
retStr += "\n# @{" + str + "} " + (String)lookups.get(str);
|
||||
}
|
||||
if (comment != null) retStr += "\n# @comment " + comment;
|
||||
|
||||
retStr += "\n" + name + "=" + saveConvert(value);
|
||||
return retStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the formatted contents to a PrintStream.
|
||||
*/
|
||||
|
||||
public void writeContents(PrintStream ps) {
|
||||
ps.println(this.toOutputString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the formatted contents to a writer such as a FileWriter.
|
||||
*/
|
||||
|
||||
public void writeContents(Writer w) throws IOException {
|
||||
w.write(this.toOutputString() + "\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Converts unicodes to encoded \\uxxxx
|
||||
* and writes out any of the characters in specialSaveChars
|
||||
* with a preceding slash
|
||||
*/
|
||||
// Taken from java.util.Properties
|
||||
private String saveConvert(String theString) {
|
||||
char aChar;
|
||||
int len = theString.length();
|
||||
StringBuffer outBuffer = new StringBuffer(len*2);
|
||||
|
||||
for(int x=0; x<len; ) {
|
||||
aChar = theString.charAt(x++);
|
||||
switch(aChar) {
|
||||
case '\\':outBuffer.append('\\'); outBuffer.append('\\');
|
||||
continue;
|
||||
case '\t':outBuffer.append('\\'); outBuffer.append('t');
|
||||
continue;
|
||||
case '\n':outBuffer.append('\\'); outBuffer.append('n');
|
||||
continue;
|
||||
case '\r':outBuffer.append('\\'); outBuffer.append('r');
|
||||
continue;
|
||||
case '\f':outBuffer.append('\\'); outBuffer.append('f');
|
||||
continue;
|
||||
default:
|
||||
if ((aChar < 20) || (aChar > 127)) {
|
||||
outBuffer.append('\\');
|
||||
outBuffer.append('u');
|
||||
outBuffer.append(toHex((aChar >> 12) & 0xF));
|
||||
outBuffer.append(toHex((aChar >> 8) & 0xF));
|
||||
outBuffer.append(toHex((aChar >> 4) & 0xF));
|
||||
outBuffer.append(toHex((aChar >> 0) & 0xF));
|
||||
}
|
||||
else {
|
||||
if (specialSaveChars.indexOf(aChar) != -1)
|
||||
outBuffer.append('\\');
|
||||
outBuffer.append(aChar);
|
||||
}
|
||||
}
|
||||
}
|
||||
return outBuffer.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a nibble to a hex character
|
||||
* @param nibble the nibble to convert.
|
||||
*/
|
||||
// Taken from java.util.Properties
|
||||
private static char toHex(int nibble) {
|
||||
return hexDigit[(nibble & 0xF)];
|
||||
}
|
||||
|
||||
/** A table of hex digits */
|
||||
// Taken from java.util.Properties
|
||||
private static final char[] hexDigit = {
|
||||
'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
|
||||
};
|
||||
|
||||
// Taken from java.util.Properties
|
||||
private static final String specialSaveChars = "=: \t\r\n\f#!";
|
||||
|
||||
private Date parseDateFromString(String dateStr) {
|
||||
SimpleDateFormat format = null;
|
||||
if (dateStr.length() == 10) format = new SimpleDateFormat("yyyy-MM-dd"); // Simple format
|
||||
else format = new SimpleDateFormat("yyyyMMdd'T'HHmmss'Z'"); // TMX ISO format
|
||||
try {
|
||||
return format.parse(dateStr);
|
||||
} catch (ParseException pe) {
|
||||
return new Date();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/Occurance.java,v $
|
||||
* $Date: 2002/05/20 18:53:10 $
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* This is a class used by the RBReporter to track occurances of a resource
|
||||
* key found while scanning a text code file. It is used mainly to produce error
|
||||
* messages with helpful context information.
|
||||
*
|
||||
* @author Jared Jackson - Email: <a href="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</a>
|
||||
* @see com.ibm.rbm.RBReporter
|
||||
*/
|
||||
public class Occurance {
|
||||
private String file_name;
|
||||
private String file_path;
|
||||
private int line_number;
|
||||
|
||||
/**
|
||||
* Basic data constructor.
|
||||
*/
|
||||
|
||||
Occurance (String file_name, String file_path, int line_number) {
|
||||
this.file_name = file_name;
|
||||
this.file_path = file_path;
|
||||
this.line_number = line_number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the associated file name of the occurance
|
||||
*/
|
||||
|
||||
public String getFileName() {
|
||||
return file_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the associated file path of the occurance
|
||||
*/
|
||||
|
||||
public String getFilePath() {
|
||||
return file_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the line number of the occurance.
|
||||
*/
|
||||
|
||||
public int getLineNumber() {
|
||||
return line_number;
|
||||
}
|
||||
|
||||
/**
|
||||
* A representation of the occurance of the form 'Occurance: _file_path_ (_line_number_)'
|
||||
*/
|
||||
|
||||
public String toString() {
|
||||
return "Occurance: " + file_path + " (" + line_number + ")";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/Preferences.java,v $
|
||||
* $Date: 2002/05/20 18:53:10 $
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
|
||||
/**
|
||||
* This class defines the methods used by RBManager to access, set, and store
|
||||
* individual user preferences for the application. All of the public methods defined
|
||||
* in this class are static, and so the class need not be instantiated.
|
||||
*
|
||||
* @author Jared Jackson - Email: <a href="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</a>
|
||||
* @see com.ibm.rbm.RBManager
|
||||
*/
|
||||
public class Preferences {
|
||||
// Default values
|
||||
private static final int NUM_RECENT_FILES = 4;
|
||||
private static final int _Y = 2002;
|
||||
private static final int _M = 6;
|
||||
private static final int _D = 15;
|
||||
private static final String EMPTY_STRING = "";
|
||||
private static Properties prop;
|
||||
|
||||
/**
|
||||
* Retrieve a preference by its key name
|
||||
* @param name The name of the key associated with one preference
|
||||
* @return The value of the preference sought
|
||||
*/
|
||||
|
||||
public static String getPreference(String name) {
|
||||
if (prop == null) init();
|
||||
Object o = prop.get(name);
|
||||
if (o == null || !(o instanceof String)) return EMPTY_STRING;
|
||||
return (String)o;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a preference by key name and value. If the key name all ready exists, that
|
||||
* preference is overwritten without warning.
|
||||
* @param name The name of the key associated with the preference
|
||||
* @param value The value of the preference to be set and later retrieved. If this value is null, the property of this name is erased.
|
||||
*/
|
||||
|
||||
public static void setPreference(String name, String value) {
|
||||
if (prop == null) init();
|
||||
if (value == null) {
|
||||
// In this case, we will remove the property
|
||||
prop.remove(name);
|
||||
}
|
||||
prop.put(name, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the results of the buffered preferences to file. There is no option for
|
||||
* where this file is saved on the file system.
|
||||
*/
|
||||
|
||||
public static void savePreferences() throws IOException {
|
||||
if (prop == null) init();
|
||||
FileOutputStream fos = new FileOutputStream("preferences.properties");
|
||||
prop.store(fos, "RBManager Preferences");
|
||||
fos.flush();
|
||||
fos.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Given the name of a resource bundle and the file path location of the base
|
||||
* document for that resource bundle, this method will insert that file into
|
||||
* a list of recent files. Currently the past 4 resource bundles visited will
|
||||
* be displayed. This method also sorts the prefences so that the most recently
|
||||
* added will be the first returned, even if that file had all ready existed
|
||||
* in the preferences when it was added.
|
||||
* @param name The name of this file as it will be displayed to the user
|
||||
* @param location The file path to this file (should be absolute).
|
||||
*/
|
||||
|
||||
public static void addRecentFilePreference(String name, String location) {
|
||||
Vector existingNames = new Vector();
|
||||
Vector existingLocations = new Vector();
|
||||
for (int i=0; i < NUM_RECENT_FILES; i++) {
|
||||
String oldName = getPreference("recentfileid" + String.valueOf(i));
|
||||
String oldLocation = getPreference("recentfileloc" + String.valueOf(i));
|
||||
if (oldName.equals(EMPTY_STRING) || oldLocation.equals(EMPTY_STRING)) break;
|
||||
existingNames.addElement(oldName);
|
||||
existingLocations.addElement(oldLocation);
|
||||
}
|
||||
// Check to see if the file is all ready in there
|
||||
int swap_start = 0;
|
||||
int old_size = existingLocations.size();
|
||||
for (int i=0; i <= old_size; i++) {
|
||||
if (i == existingLocations.size()) {
|
||||
// No match was found, pull all the elements down one
|
||||
swap_start = i;
|
||||
if (swap_start >= NUM_RECENT_FILES) swap_start = NUM_RECENT_FILES-1;
|
||||
else {
|
||||
// Extend the length of the vectors
|
||||
existingNames.addElement(EMPTY_STRING);
|
||||
existingLocations.addElement(EMPTY_STRING);
|
||||
}
|
||||
} else {
|
||||
String oldLocation = (String)existingLocations.elementAt(i);
|
||||
if (oldLocation.equals(location)) {
|
||||
// We found a match, pull this one to the front
|
||||
swap_start = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Move the files down the line as appropriate
|
||||
for (int i=swap_start; i > 0; i--) {
|
||||
existingLocations.setElementAt(existingLocations.elementAt(i-1),i);
|
||||
existingNames.setElementAt(existingNames.elementAt(i-1),i);
|
||||
}
|
||||
existingLocations.setElementAt(location, 0);
|
||||
existingNames.setElementAt(name, 0);
|
||||
|
||||
// Set the properties
|
||||
for (int i=0; i < existingLocations.size(); i++) {
|
||||
setPreference("recentfileid" + String.valueOf(i), (String)existingNames.elementAt(i));
|
||||
setPreference("recentfileloc" + String.valueOf(i), (String)existingLocations.elementAt(i));
|
||||
}
|
||||
for (int i=existingLocations.size(); i < NUM_RECENT_FILES; i++) {
|
||||
setPreference("recentfileid" + String.valueOf(i), EMPTY_STRING);
|
||||
setPreference("recentfileloc" + String.valueOf(i), EMPTY_STRING);
|
||||
}
|
||||
try {
|
||||
savePreferences();
|
||||
} catch (IOException ioe) {} // Ignore, its not critical
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of the names and locations of the various recently used files.
|
||||
* @return A Vector of Strings which is twice in length the number of files known about. The vector contains name 1 then location 1, then name 2 ...
|
||||
*/
|
||||
|
||||
public static Vector getRecentFilesPreferences() {
|
||||
if (prop == null) init();
|
||||
Vector existing = new Vector();
|
||||
for (int i=0; i < NUM_RECENT_FILES; i++) {
|
||||
String name = getPreference("recentfileid" + String.valueOf(i));
|
||||
String location = getPreference("recentfileloc" + String.valueOf(i));
|
||||
if (name.equals(EMPTY_STRING) || location.equals(EMPTY_STRING)) break;
|
||||
existing.addElement(name);
|
||||
existing.addElement(location);
|
||||
}
|
||||
return existing;
|
||||
}
|
||||
|
||||
private static void init() {
|
||||
Properties defaults = new Properties();
|
||||
// This values are needed and are specified by default
|
||||
// If they exist in the file, they will be overwritten
|
||||
defaults.put("username", Resources.getTranslation("unknown_user"));
|
||||
defaults.put("locale", "en");
|
||||
defaults.put("lookandfeel", "");
|
||||
|
||||
prop = new Properties(defaults);
|
||||
try {
|
||||
FileInputStream fis = new FileInputStream("preferences.properties");
|
||||
prop.load(fis);
|
||||
} catch (IOException ioe) {
|
||||
System.err.println("Error reading properties");
|
||||
ioe.printStackTrace(System.err);
|
||||
}
|
||||
try {
|
||||
savePreferences();
|
||||
} catch (IOException ioe) {
|
||||
System.err.println("Error saving preferences " + ioe.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public static void main(String args[]) {
|
||||
// Test
|
||||
init();
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/RBExporter.java,v $
|
||||
* $Date: 2002/05/20 18:53:10 $
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
import java.io.*;
|
||||
import javax.swing.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* This is the super class for all exporter plug-in classes. As of yet, there
|
||||
* is little contained in this class.
|
||||
*
|
||||
* @author Jared Jackson - Email: <a href="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</a>
|
||||
* @see com.ibm.rbm.RBManager
|
||||
*/
|
||||
public class RBExporter {
|
||||
protected static JFileChooser chooser;
|
||||
|
||||
/**
|
||||
* Basic empty constructor.
|
||||
*/
|
||||
public RBExporter() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/RBICUExporter.java,v $
|
||||
* $Date: 2002/05/20 18:53:10 $
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
import java.io.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.filechooser.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* This class provides a plug-in exporter utility for RBManager that outputs ICU
|
||||
* resource bundle files in the according to the file structure of Resource
|
||||
* Bundles. Most of the meta-data is lost in this export.
|
||||
*
|
||||
* @author George Rhoten
|
||||
* @see com.ibm.rbm.RBManager
|
||||
*/
|
||||
public class RBICUExporter extends RBExporter {
|
||||
/** Do characters beyond \\u007f need \\u escape notation? */
|
||||
private boolean escapeNonAscii = false;
|
||||
|
||||
/** Write the meta data for each resource? */
|
||||
private boolean writeMetaData = true;
|
||||
|
||||
/** Write the groups as keys? */
|
||||
private boolean writeGroupsAsKeys = false;
|
||||
|
||||
public RBICUExporter() {
|
||||
super();
|
||||
|
||||
// Initialize the file chooser if necessary
|
||||
if (chooser == null) {
|
||||
chooser = new JFileChooser();
|
||||
chooser.setFileFilter(new javax.swing.filechooser.FileFilter(){
|
||||
public String getDescription() {
|
||||
return "root ICU File";
|
||||
}
|
||||
public boolean accept(File f) {
|
||||
if (f.isDirectory()) return true;
|
||||
return (f.getName().startsWith("root."));
|
||||
}
|
||||
});
|
||||
} // end if
|
||||
}
|
||||
|
||||
protected void export(RBManager rbm) throws IOException {
|
||||
if (rbm == null) return;
|
||||
// Open the Save Dialog
|
||||
int ret_val = chooser.showSaveDialog(null);
|
||||
if (ret_val != JFileChooser.APPROVE_OPTION) {
|
||||
return;
|
||||
}
|
||||
// Retrieve basic file information
|
||||
File file = chooser.getSelectedFile(); // The file(s) we will be working with
|
||||
File directory = new File(file.getParent()); // The directory we will be writing to
|
||||
String base_name = file.getName(); // The base name of the files we will write
|
||||
if (base_name == null || base_name.equals("")) {
|
||||
base_name = rbm.getBaseClass();
|
||||
}
|
||||
if (base_name.toLowerCase().endsWith(".properties")) {
|
||||
base_name = base_name.substring(0,base_name.length()-11);
|
||||
}
|
||||
|
||||
Vector bundle_v = rbm.getBundles();
|
||||
for (int i=0; i < bundle_v.size(); i++) {
|
||||
Bundle bundle = (Bundle)bundle_v.elementAt(i);
|
||||
String base_enc = base_name;
|
||||
if (bundle.encoding != null && !bundle.encoding.equals("")) {
|
||||
base_enc = base_enc + "_" + bundle.encoding;
|
||||
}
|
||||
String file_name = base_enc + ".txt";
|
||||
String header = "\ufeff// Resource Bundle: " + file_name + " - File automatically generated by RBManager at " + (new Date());
|
||||
|
||||
OutputStream fos = new FileOutputStream(new File(directory, file_name));
|
||||
PrintWriter resOut = new PrintWriter(new OutputStreamWriter(fos, "UTF-8"));
|
||||
|
||||
Vector group_v = bundle.getGroupsAsVector();
|
||||
resOut.println(header);
|
||||
resOut.println(base_enc + " { ");
|
||||
for (int j=0; j < group_v.size(); j++) {
|
||||
BundleGroup group = (BundleGroup)group_v.elementAt(j);
|
||||
|
||||
Vector itemVect = group.getItemsAsVector();
|
||||
int itemVectSize = itemVect.size();
|
||||
if (itemVectSize > 0) {
|
||||
if (writeMetaData) {
|
||||
String groupComment = group.getComment();
|
||||
if (groupComment != null && !groupComment.equals("")) {
|
||||
resOut.println(" // @groupComment " + groupComment);
|
||||
}
|
||||
}
|
||||
|
||||
boolean writeGroupName = !bundle.getUngroupedGroup().getName().equals(group.getName());
|
||||
if (writeGroupName) {
|
||||
if (writeGroupsAsKeys) {
|
||||
resOut.println(" " + escapeString(group.getName(), true) + " { ");
|
||||
}
|
||||
else if (writeMetaData) {
|
||||
resOut.println(" // @group " + escapeString(group.getName(), true));
|
||||
}
|
||||
}
|
||||
for (int k=0; k < itemVectSize; k++) {
|
||||
BundleItem item = (BundleItem)itemVect.elementAt(k);
|
||||
|
||||
if (writeMetaData) {
|
||||
resOut.print(" //");
|
||||
resOut.print(" @translated " + item.isTranslated());
|
||||
resOut.print(" @created " + item.getCreatedDate());
|
||||
resOut.print(" @modified " + item.getModifiedDate());
|
||||
resOut.print(" @creator " + item.getCreator());
|
||||
resOut.println(" @modifier " + item.getModifier());
|
||||
String itemComment = item.getComment();
|
||||
if (itemComment != null && !itemComment.equals("")) {
|
||||
resOut.println(" // @comment " + itemComment);
|
||||
}
|
||||
}
|
||||
|
||||
resOut.println(" " + escapeString(item.getKey(), true)
|
||||
+ " { " + escapeString(item.getTranslation(), false) + " }");
|
||||
} // end for - k
|
||||
if (writeGroupName && writeGroupsAsKeys) {
|
||||
resOut.println(" }");
|
||||
}
|
||||
}
|
||||
} // end for - j
|
||||
resOut.println("}");
|
||||
|
||||
// Write out the file
|
||||
resOut.close();
|
||||
fos.close();
|
||||
} // end for - i
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape a string according to how the ICU tool "genrb" handles strings.
|
||||
* @param str The string to escape
|
||||
* @param isKey If this is a key, then quotes are optional.
|
||||
* @return A string that can be used in an ICU resource bundle.
|
||||
*/
|
||||
protected String escapeString(String str, boolean isKey) throws IOException {
|
||||
StringBuffer strBuf = new StringBuffer();
|
||||
int len = str.length();
|
||||
boolean quoteRequired = !isKey;
|
||||
for (int idx = 0; idx < len; idx++) {
|
||||
char ch = str.charAt(idx);
|
||||
if (ch <= ' ' || '~' < ch) {
|
||||
if (isKey && ch != ' ') {
|
||||
IOException e = new IOException(str + " needs to use invariant characters for the key.");
|
||||
e.fillInStackTrace();
|
||||
throw e;
|
||||
} else if (escapeNonAscii && ch != ' ') {
|
||||
String zeros;
|
||||
String hexNum;
|
||||
if ((ch & 0xf800) == 0xd800) {
|
||||
// We assume that we found a valid UTF-16 string with a surrogate
|
||||
int ch2 = str.charAt(idx++);
|
||||
int chSurrogate = ((((int)ch)<<10)+(ch2)-((0xd800<<10)+0xdc00-0x10000));
|
||||
|
||||
zeros = "00000000";
|
||||
hexNum = Integer.toHexString(chSurrogate);
|
||||
strBuf.append("\\U");
|
||||
} else {
|
||||
zeros = "0000";
|
||||
hexNum = Integer.toHexString(ch);
|
||||
strBuf.append("\\u");
|
||||
}
|
||||
strBuf.append(zeros.substring(hexNum.length()) + hexNum.toUpperCase());
|
||||
} else {
|
||||
quoteRequired = true;
|
||||
strBuf.append(ch);
|
||||
}
|
||||
} else if (ch == '\"') {
|
||||
quoteRequired = true;
|
||||
strBuf.append("\\\"");
|
||||
} else {
|
||||
if (ch == '{' || ch == '}') {
|
||||
quoteRequired = true;
|
||||
}
|
||||
strBuf.append(ch);
|
||||
}
|
||||
}
|
||||
if (quoteRequired) {
|
||||
strBuf.insert(0, '\"');
|
||||
strBuf.append('\"');
|
||||
}
|
||||
return strBuf.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,441 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/RBImporter.java,v $
|
||||
* $Date: 2002/05/20 18:53:10 $
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
import java.io.*;
|
||||
import javax.swing.*;
|
||||
import java.util.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
|
||||
/**
|
||||
* <P>This is the super class for all importer plug-in classes.</P>
|
||||
* <P>
|
||||
* In terms of general functionality of this class or its children classes, the following steps should happen in order:
|
||||
* <OL>
|
||||
* <LI>A Dialog is shown from which the user may select options about the import, including the file from which to import.</LI>
|
||||
* <LI>The 'Import' button is pressed, closing the options dialog and opening a progress bar dialog box.</LI>
|
||||
* <LI>The class should resolve all conflicts with locale encodings existing in the import files, but not in the active resource bundle.</LI>
|
||||
* <LI>The class should parse resources one at a time and use the importResource() method to insert them into the resource bundle.</LI>
|
||||
* <LI>The class should report when all resources have been read and the import is complete.</LI>
|
||||
* </OL>
|
||||
* </P>
|
||||
*
|
||||
* @author Jared Jackson - Email: <a href="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</a>
|
||||
* @see com.ibm.rbm.RBManager
|
||||
*/
|
||||
public class RBImporter extends JDialog {
|
||||
private final static int FILE_OPTION_POPULATE = 0; // Create a new locale file populated from base file
|
||||
private final static int FILE_OPTION_EMPTY = 1; // Create a new empty locale file
|
||||
private final static int FILE_OPTION_IGNORE = 2; // Ignore all resources from this encoding
|
||||
private final static int FILE_OPTION_PROMPT = 3; // Prompt for each conflict
|
||||
private final static int RESOURCE_OPTION_OVERWRITE = 0; // Use the value from the source import file
|
||||
private final static int RESOURCE_OPTION_IGNORE = 1; // Ignore the import and use existing value
|
||||
private final static int RESOURCE_OPTION_PROMPT = 2; // Propmpt for each conflict
|
||||
|
||||
protected static JFileChooser chooser;
|
||||
protected int num_conflicts;
|
||||
protected int num_extra_files;
|
||||
protected String title;
|
||||
protected RBManager rbm;
|
||||
protected RBManagerGUI gui;
|
||||
protected boolean pathSet = false;
|
||||
|
||||
// Visual Components
|
||||
JRadioButton resourceOverwriteRadio = new JRadioButton(Resources.getTranslation("import_resource_conflict_overwrite"), false);
|
||||
JRadioButton resourceIgnoreRadio = new JRadioButton(Resources.getTranslation("import_resource_conflict_ignore"), false);
|
||||
JRadioButton resourcePromptRadio = new JRadioButton(Resources.getTranslation("import_conflict_prompt"), true);
|
||||
JRadioButton fileGeneratePopulateRadio = new JRadioButton(Resources.getTranslation("import_file_conflict_generate_populate"), false);
|
||||
JRadioButton fileGenerateEmptyRadio = new JRadioButton(Resources.getTranslation("import_file_conflict_generate_empty"), false);
|
||||
JRadioButton fileIgnoreRadio = new JRadioButton(Resources.getTranslation("import_file_conflict_ignore"), false);
|
||||
JRadioButton filePromptRadio = new JRadioButton(Resources.getTranslation("import_conflict_prompt"), true);
|
||||
|
||||
JCheckBox markTranslatedCheck = new JCheckBox(Resources.getTranslation("import_default_translated"), true);
|
||||
JCheckBox createGroupsCheck = new JCheckBox(Resources.getTranslation("import_default_group_creation"), true);
|
||||
JComboBox groupComboBox = new JComboBox();
|
||||
|
||||
JLabel sourceLabel;
|
||||
|
||||
JDialog progressBarDialog;
|
||||
JProgressBar progressBar;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param title The title that appears in the Dialog box
|
||||
* @param rbm An RBManager instance
|
||||
* @param gui The RBManager GUI instance associated with the RBManager instance
|
||||
*/
|
||||
|
||||
public RBImporter(String title, RBManager rbm, RBManagerGUI gui) {
|
||||
super(new Frame(), title, true);
|
||||
this.title = title;
|
||||
this.rbm = rbm;
|
||||
this.gui = gui;
|
||||
init();
|
||||
}
|
||||
|
||||
protected void init() {
|
||||
chooser = new JFileChooser();
|
||||
setupFileChooser();
|
||||
num_conflicts = 0;
|
||||
num_extra_files = 0;
|
||||
initComponents();
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
protected void setupFileChooser() {
|
||||
// To be overwritten
|
||||
}
|
||||
|
||||
protected void beginImport() throws IOException {
|
||||
// To be overwritten
|
||||
if (!pathSet) return;
|
||||
}
|
||||
|
||||
protected void chooseFile() {
|
||||
int result = chooser.showOpenDialog(this);
|
||||
if (result == chooser.APPROVE_OPTION) {
|
||||
File f = chooser.getSelectedFile();
|
||||
sourceLabel.setText(Resources.getTranslation("import_source_file",f.getAbsolutePath()));
|
||||
pathSet = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected File getChosenFile() {
|
||||
return chooser.getSelectedFile();
|
||||
}
|
||||
|
||||
/**
|
||||
* A super class method intended for use of nearly all subclass importers, once a resource
|
||||
* is found by those subclasses. This method is called in order to create the new resource
|
||||
* and handle the various conflict errors that may result as a part of that import.
|
||||
*/
|
||||
|
||||
protected void importResource(BundleItem item, String encoding, String group_name) {
|
||||
Bundle bundle = null;
|
||||
BundleGroup group = null;
|
||||
BundleGroup backup_group = null;
|
||||
|
||||
if (group_name == null) group_name = getDefaultGroup();
|
||||
if (encoding == null) return;
|
||||
// Get the bundle to which we will be adding this resource
|
||||
if (rbm.hasResource(encoding)) {
|
||||
Vector bv = rbm.getBundles();
|
||||
for (int i = 0; i < bv.size(); i++) {
|
||||
Bundle tempb = (Bundle)bv.elementAt(i);
|
||||
if (tempb.encoding.equals(encoding)) {
|
||||
bundle = tempb;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Skip this import if the bundle is non-existent (Should have been resolved if wanted)
|
||||
if (bundle == null) return;
|
||||
// Find the group in the bundle, Ungrouped if non-existent
|
||||
Vector gv = bundle.getGroupsAsVector();
|
||||
for (int i=0; i < gv.size(); i++) {
|
||||
BundleGroup tempg = (BundleGroup)gv.elementAt(i);
|
||||
if (i==0) backup_group = tempg;
|
||||
if (tempg.getName().equals("Ungrouped Items")) backup_group = tempg;
|
||||
else if (tempg.getName().equals(group_name)) {
|
||||
group = tempg;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (group == null) {
|
||||
if (getDefaultGroupCreation()) {
|
||||
// Create a new group by this name
|
||||
bundle.addBundleGroup(group_name, "");
|
||||
gv = bundle.getGroupsAsVector();
|
||||
for (int i=0; i < gv.size(); i++) {
|
||||
BundleGroup tempg = (BundleGroup)gv.elementAt(i);
|
||||
if (tempg.getName().equals(group_name)) {
|
||||
group = tempg;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Use the backup_group
|
||||
group = backup_group;
|
||||
}
|
||||
}
|
||||
// If all group identification efforts fail, we fail
|
||||
if (group == null) return;
|
||||
item.setParentGroup(group);
|
||||
// Check for and resolve conflicts
|
||||
if (bundle.allItems.containsKey(item.getKey())) {
|
||||
resolveResource(bundle,item);
|
||||
RBManagerGUI.debugMsg("Resolve conflict");
|
||||
} else {
|
||||
// Insert the resource
|
||||
bundle.addBundleItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method should be called when trying to import and item whose key all ready exists within the bundle.
|
||||
*/
|
||||
|
||||
protected void resolveResource(Bundle bundle, BundleItem item) {
|
||||
if (this.getResourceConflictOption() == this.RESOURCE_OPTION_IGNORE) return;
|
||||
else if (this.getResourceConflictOption() == this.RESOURCE_OPTION_OVERWRITE) {
|
||||
bundle.removeItem(item.getKey());
|
||||
bundle.addBundleItem(item);
|
||||
} else if (this.getResourceConflictOption() == this.RESOURCE_OPTION_PROMPT) {
|
||||
BundleItem original = (BundleItem)bundle.allItems.get(item.getKey());
|
||||
if (original == null) return;
|
||||
String trans = original.getTranslation();
|
||||
String options[] = { Resources.getTranslation("import_resource_conflict_overwrite"),
|
||||
Resources.getTranslation("import_resource_conflict_ignore")};
|
||||
String insert[] = {item.getKey(), (bundle.encoding.equals("") ? "(Base Class)" : bundle.encoding)};
|
||||
String result = (String)JOptionPane.showInputDialog(this, Resources.getTranslation("import_resource_conflict_choose", insert) +
|
||||
"\n" + Resources.getTranslation("import_resource_conflict_choose_source", item.getTranslation()) +
|
||||
"\n" + Resources.getTranslation("import_resource_conflict_choose_target", trans),
|
||||
Resources.getTranslation("import_file_conflicts"), JOptionPane.QUESTION_MESSAGE,
|
||||
null, options, options[0]);
|
||||
if (result == null) return;
|
||||
if (result.equals(Resources.getTranslation("import_resource_conflict_overwrite"))) {
|
||||
bundle.removeItem(item.getKey());
|
||||
bundle.addBundleItem(item);
|
||||
} else if (result.equals(Resources.getTranslation("import_resource_conflict_ignore"))) return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a vector of strings containing locale encodings (e.g. {"en", "en_us", "de"}), attempts
|
||||
* to resolve those conflicts according to the preferences selected by the user.
|
||||
*/
|
||||
|
||||
protected void resolveEncodings(Vector v) {
|
||||
for (int i=0; i < v.size(); i++) {
|
||||
String encoding = (String)v.elementAt(i);
|
||||
if (encoding == null || encoding.equals("")) continue;
|
||||
if (rbm.hasResource(encoding)) continue;
|
||||
else {
|
||||
// We need to resolve this conflict
|
||||
if (this.getFileConflictOption() == this.FILE_OPTION_IGNORE) continue;
|
||||
else if (this.getFileConflictOption() == this.FILE_OPTION_POPULATE) {
|
||||
rbm.createResource(null, null, null, encoding, null, null, null, true);
|
||||
} else if (this.getFileConflictOption() == this.FILE_OPTION_EMPTY) {
|
||||
rbm.createResource(null, null, null, encoding, null, null, null, true);
|
||||
} else if (this.getFileConflictOption() == this.FILE_OPTION_PROMPT) {
|
||||
String options[] = { Resources.getTranslation("import_file_conflict_generate_populate"),
|
||||
Resources.getTranslation("import_file_conflict_generate_empty"),
|
||||
Resources.getTranslation("import_file_conflict_ignore")};
|
||||
|
||||
String result = (String)JOptionPane.showInputDialog(this, Resources.getTranslation("import_file_conflict_choose", encoding),
|
||||
Resources.getTranslation("import_file_conflicts"), JOptionPane.QUESTION_MESSAGE,
|
||||
null, options, options[0]);
|
||||
if (result == null) continue;
|
||||
if (result.equals(Resources.getTranslation("import_file_conflict_ignore"))) continue;
|
||||
else if (result.equals(Resources.getTranslation("import_file_conflict_generate_populate"))) {
|
||||
rbm.createResource(null, null, null, encoding, null, null, null, true);
|
||||
} else if (result.equals(Resources.getTranslation("import_file_conflict_generate_empty"))) {
|
||||
rbm.createResource(null, null, null, encoding, null, null, null, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
gui.updateDisplayTree();
|
||||
}
|
||||
|
||||
// Returns an integer mask describing the user's selection for file resolving missing file locale conflicts
|
||||
|
||||
private int getFileConflictOption() {
|
||||
if (fileGeneratePopulateRadio.isSelected()) return this.FILE_OPTION_POPULATE;
|
||||
if (fileGenerateEmptyRadio.isSelected()) return this.FILE_OPTION_EMPTY;
|
||||
if (fileIgnoreRadio.isSelected()) return this.FILE_OPTION_IGNORE;
|
||||
if (filePromptRadio.isSelected()) return this.FILE_OPTION_PROMPT;
|
||||
return this.FILE_OPTION_PROMPT;
|
||||
}
|
||||
|
||||
// Returns an integer mask describing the user's selection for duplicate resource key conflicts
|
||||
|
||||
private int getResourceConflictOption() {
|
||||
if (resourceOverwriteRadio.isSelected()) return this.RESOURCE_OPTION_OVERWRITE;
|
||||
if (resourceIgnoreRadio.isSelected()) return this.RESOURCE_OPTION_IGNORE;
|
||||
if (resourcePromptRadio.isSelected()) return this.RESOURCE_OPTION_PROMPT;
|
||||
return this.RESOURCE_OPTION_PROMPT;
|
||||
}
|
||||
|
||||
// Returns the group name for use when no group name is specified
|
||||
|
||||
protected String getDefaultGroup() {
|
||||
return groupComboBox.getSelectedItem().toString();
|
||||
}
|
||||
|
||||
// Returns the default translation value
|
||||
|
||||
protected boolean getDefaultTranslated() {
|
||||
return markTranslatedCheck.isSelected();
|
||||
}
|
||||
|
||||
// Returns whether or not a group of name non-existant in the active bundle is created
|
||||
|
||||
protected boolean getDefaultGroupCreation() {
|
||||
return createGroupsCheck.isSelected();
|
||||
}
|
||||
|
||||
protected void showProgressBar(int steps) {
|
||||
thisWindowClosing();
|
||||
JDialog progressBarDialog = new JDialog(this, Resources.getTranslation("dialog_title_import_progress"), false);
|
||||
JProgressBar progressBar = new JProgressBar(0, steps);
|
||||
progressBar.setValue(0);
|
||||
progressBarDialog.getContentPane().add(progressBar);
|
||||
progressBarDialog.pack();
|
||||
progressBarDialog.show();
|
||||
}
|
||||
|
||||
protected void incrementProgressBar() {
|
||||
if (progressBar == null) return;
|
||||
progressBar.setValue(progressBar.getValue()+1);
|
||||
if (progressBar.getValue() == progressBar.getMaximum()) hideProgressBar();
|
||||
}
|
||||
|
||||
protected void hideProgressBar() {
|
||||
if (progressBarDialog != null) progressBarDialog.setVisible(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the visual components for selecting an import file and setting the appropriate
|
||||
* options
|
||||
*/
|
||||
|
||||
protected void initComponents() {
|
||||
// Create Components
|
||||
JLabel titleLabel = new JLabel(title);
|
||||
sourceLabel = new JLabel(Resources.getTranslation("import_source_file","--"));
|
||||
JLabel insertGroupLabel = new JLabel(Resources.getTranslation("import_insert_group"));
|
||||
|
||||
JButton fileChooseButton = new JButton(Resources.getTranslation("button_choose"));
|
||||
JButton cancelButton = new JButton(Resources.getTranslation("button_cancel"));
|
||||
JButton importButton = new JButton(Resources.getTranslation("button_import"));
|
||||
|
||||
ButtonGroup resourceGroup = new ButtonGroup();
|
||||
ButtonGroup fileGroup = new ButtonGroup();
|
||||
|
||||
JPanel topPanel = new JPanel(new BorderLayout());
|
||||
JPanel midPanel = new JPanel(new BorderLayout());
|
||||
JPanel botPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
|
||||
|
||||
JPanel topInnerPanel = new JPanel(new BorderLayout());
|
||||
|
||||
Box midBox = new Box(BoxLayout.Y_AXIS);
|
||||
|
||||
JPanel resourcePanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
|
||||
JPanel filePanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
|
||||
JPanel defaultPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
|
||||
JPanel defaultPanel2 = new JPanel(new BorderLayout());
|
||||
|
||||
Box resourceBox = new Box(BoxLayout.Y_AXIS);
|
||||
Box fileBox = new Box(BoxLayout.Y_AXIS);
|
||||
Box groupBox = new Box(BoxLayout.X_AXIS);
|
||||
|
||||
// Setup title
|
||||
titleLabel.setFont(new Font("Serif",Font.BOLD,16));
|
||||
|
||||
// Setup panels
|
||||
midPanel.setBorder(BorderFactory.createTitledBorder(Resources.getTranslation("import_options")));
|
||||
resourcePanel.setBorder(BorderFactory.createTitledBorder(Resources.getTranslation("import_resource_conflicts")));
|
||||
filePanel.setBorder(BorderFactory.createTitledBorder(Resources.getTranslation("import_file_conflicts")));
|
||||
defaultPanel.setBorder(BorderFactory.createTitledBorder(Resources.getTranslation("import_default_values")));
|
||||
|
||||
// Arrange button groups
|
||||
fileGroup.add(fileGeneratePopulateRadio);
|
||||
fileGroup.add(fileGenerateEmptyRadio);
|
||||
fileGroup.add(fileIgnoreRadio);
|
||||
fileGroup.add(filePromptRadio);
|
||||
resourceGroup.add(resourceOverwriteRadio);
|
||||
resourceGroup.add(resourceIgnoreRadio);
|
||||
resourceGroup.add(resourcePromptRadio);
|
||||
|
||||
// Add action listeners
|
||||
cancelButton.addActionListener(new ActionListener(){
|
||||
public void actionPerformed(ActionEvent ev) {
|
||||
thisWindowClosing();
|
||||
}
|
||||
});
|
||||
|
||||
importButton.addActionListener(new ActionListener(){
|
||||
public void actionPerformed(ActionEvent ev) {
|
||||
try {
|
||||
beginImport();
|
||||
thisWindowClosing();
|
||||
} catch (IOException ioe) {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
Resources.getTranslation("error") + "\n" + Resources.getTranslation("error"),
|
||||
Resources.getTranslation("error"), JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
fileChooseButton.addActionListener(new ActionListener(){
|
||||
public void actionPerformed(ActionEvent ev) {
|
||||
chooseFile();
|
||||
}
|
||||
});
|
||||
|
||||
// Setup combo box
|
||||
groupComboBox = new JComboBox(((Bundle)rbm.getBundles().elementAt(0)).getGroupsAsVector());
|
||||
|
||||
// Arange components
|
||||
groupBox.add(Box.createHorizontalGlue());
|
||||
groupBox.add(insertGroupLabel);
|
||||
groupBox.add(Box.createHorizontalStrut(5));
|
||||
groupBox.add(groupComboBox);
|
||||
|
||||
defaultPanel2.add(groupBox, BorderLayout.NORTH);
|
||||
defaultPanel2.add(markTranslatedCheck, BorderLayout.CENTER);
|
||||
defaultPanel2.add(createGroupsCheck, BorderLayout.SOUTH);
|
||||
|
||||
fileBox.add(fileGeneratePopulateRadio);
|
||||
fileBox.add(fileGenerateEmptyRadio);
|
||||
fileBox.add(fileIgnoreRadio);
|
||||
fileBox.add(filePromptRadio);
|
||||
|
||||
resourceBox.add(resourceOverwriteRadio);
|
||||
resourceBox.add(resourceIgnoreRadio);
|
||||
resourceBox.add(resourcePromptRadio);
|
||||
|
||||
defaultPanel.add(defaultPanel2);
|
||||
filePanel.add(fileBox);
|
||||
resourcePanel.add(resourceBox);
|
||||
|
||||
midBox.add(resourcePanel);
|
||||
midBox.add(filePanel);
|
||||
midBox.add(defaultPanel);
|
||||
|
||||
midPanel.add(midBox, BorderLayout.CENTER);
|
||||
|
||||
topInnerPanel.add(sourceLabel, BorderLayout.CENTER);
|
||||
topInnerPanel.add(fileChooseButton, BorderLayout.EAST);
|
||||
|
||||
topPanel.add(titleLabel, BorderLayout.NORTH);
|
||||
topPanel.add(topInnerPanel, BorderLayout.CENTER);
|
||||
|
||||
botPanel.add(cancelButton);
|
||||
botPanel.add(importButton);
|
||||
|
||||
getContentPane().setLayout(new BorderLayout());
|
||||
getContentPane().add(topPanel, BorderLayout.NORTH);
|
||||
getContentPane().add(midPanel, BorderLayout.CENTER);
|
||||
getContentPane().add(botPanel, BorderLayout.SOUTH);
|
||||
|
||||
pack();
|
||||
}
|
||||
|
||||
protected void thisWindowClosing() {
|
||||
setVisible(false);
|
||||
dispose();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/RBJavaExporter.java,v $
|
||||
* $Date: 2002/05/20 18:53:10 $
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
import java.io.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.*;
|
||||
import javax.swing.filechooser.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* An exporter plug-in class for RBManager. The resources exported here conform to
|
||||
* the Java standard for Resource Bundles as specified in java.util.ListResourceBundle.
|
||||
* The output files are compilable java files that are not associated with any
|
||||
* package.
|
||||
*
|
||||
* @author Jared Jackson - Email: <a href="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</a>
|
||||
* @see com.ibm.rbm.RBManager
|
||||
*/
|
||||
public class RBJavaExporter extends RBExporter {
|
||||
private String packageName = null;
|
||||
private boolean publicClass = true;
|
||||
private boolean publicMethods = true;
|
||||
|
||||
|
||||
public RBJavaExporter() {
|
||||
super();
|
||||
|
||||
// Initialize the file chooser if necessary
|
||||
if (chooser == null) {
|
||||
chooser = new JFileChooser();
|
||||
chooser.setFileFilter(new javax.swing.filechooser.FileFilter(){
|
||||
public String getDescription() {
|
||||
return "Java Source Files";
|
||||
}
|
||||
public boolean accept(File f) {
|
||||
if (f.isDirectory()) return true;
|
||||
if (f.getName().endsWith(".java") && f.getName().indexOf("_") < 0) return true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} // end if
|
||||
}
|
||||
|
||||
protected void export(RBManager rbm) throws IOException {
|
||||
if (rbm == null) return;
|
||||
// Open the additional Dialog
|
||||
RBJavaExporterDialog parametersDialog = new RBJavaExporterDialog();
|
||||
packageName = parametersDialog.getPackageName();
|
||||
publicClass = parametersDialog.isClassPublic();
|
||||
publicMethods = parametersDialog.isMethodsPublic();
|
||||
|
||||
// Open the Save Dialog
|
||||
int ret_val = chooser.showSaveDialog(null);
|
||||
if (ret_val != JFileChooser.APPROVE_OPTION) return;
|
||||
// Retrieve basic file information
|
||||
File file = chooser.getSelectedFile(); // The file(s) we will be working with
|
||||
File directory = new File(file.getParent()); // The directory we will be writing to
|
||||
String base_name = file.getName(); // The base name of the files we will write
|
||||
if (base_name == null || base_name.equals("")) base_name = rbm.getBaseClass();
|
||||
if (base_name.endsWith(".java")) base_name = base_name.substring(0,base_name.length()-5);
|
||||
|
||||
Vector bundle_v = rbm.getBundles();
|
||||
for (int i=0; i < bundle_v.size(); i++) {
|
||||
Bundle bundle = (Bundle)bundle_v.elementAt(i);
|
||||
String base_enc = base_name;
|
||||
if (bundle.encoding != null && !bundle.encoding.equals("")) base_enc = base_enc + "_" + bundle.encoding;
|
||||
String file_name = base_enc + ".java";
|
||||
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append("/* File: " + file_name + "\n");
|
||||
buffer.append(" * Date: " + (new Date()) + "\n");
|
||||
buffer.append(" * Comment: This file was generated automatically by RBManager" + "\n");
|
||||
buffer.append(" */\n\n");
|
||||
if (packageName != null) {
|
||||
buffer.append("package " + packageName + ";\n\n");
|
||||
}
|
||||
buffer.append("import java.util.ListResourceBundle;\n\n");
|
||||
buffer.append((publicClass ? "public " : "protected "));
|
||||
buffer.append("class " + base_enc + " extends ListResourceBundle {\n");
|
||||
buffer.append("\t" + (publicMethods ? "public" : "protected") + " Object[][] getContents() {\n");
|
||||
buffer.append("\t\treturn contents;\n");
|
||||
buffer.append("\t}\n");
|
||||
buffer.append("\tprivate static final Object[][] contents = {\n");
|
||||
buffer.append("\t// LOCALIZE THIS\n");
|
||||
|
||||
Vector group_v = bundle.getGroupsAsVector();
|
||||
for (int j=0; j < group_v.size(); j++) {
|
||||
BundleGroup group = (BundleGroup)group_v.elementAt(j);
|
||||
Vector item_v = group.getItemsAsVector();
|
||||
for (int k=0; k < item_v.size(); k++) {
|
||||
BundleItem item = (BundleItem)item_v.elementAt(k);
|
||||
buffer.append("\t\t{\"" + item.getKey() + "\", \"" + item.getTranslation() + "\"},\t// " + item.getComment() + "\n");
|
||||
} // end for - k
|
||||
} // end for - j
|
||||
|
||||
buffer.append("\t// END OF MATERIAL TO LOCALIZE\n");
|
||||
buffer.append("\t};\n");
|
||||
buffer.append("}");
|
||||
|
||||
// Write out the file
|
||||
File write_file = new File(directory, file_name);
|
||||
FileWriter writer = new FileWriter(write_file);
|
||||
writer.write(buffer.toString());
|
||||
writer.flush();
|
||||
writer.close();
|
||||
} // end for - i
|
||||
}
|
||||
}
|
||||
|
||||
class RBJavaExporterDialog extends JDialog {
|
||||
JCheckBox packageCheck;
|
||||
JRadioButton classPublicRadio;
|
||||
JRadioButton classProtectedRadio;
|
||||
JRadioButton methodsPublicRadio;
|
||||
JRadioButton methodsProtectedRadio;
|
||||
JTextField packageField;
|
||||
|
||||
public RBJavaExporterDialog() {
|
||||
super(new JFrame(), Resources.getTranslation("dialog_title_export_java_options"), true);
|
||||
initComponents();
|
||||
}
|
||||
|
||||
public String getPackageName() {
|
||||
if (!(packageCheck.isSelected())) return null;
|
||||
String retVal = packageField.getText();
|
||||
if (retVal == null || retVal.trim().equals("")) return null;
|
||||
return retVal.trim();
|
||||
}
|
||||
|
||||
public boolean isClassPublic() {
|
||||
return classPublicRadio.isSelected();
|
||||
}
|
||||
|
||||
public boolean isMethodsPublic() {
|
||||
return methodsPublicRadio.isSelected();
|
||||
}
|
||||
|
||||
private void handleClose() {
|
||||
setVisible(false);
|
||||
dispose();
|
||||
}
|
||||
|
||||
private void initComponents() {
|
||||
getContentPane().setLayout(new BorderLayout());
|
||||
getContentPane().removeAll();
|
||||
|
||||
packageCheck = new JCheckBox(Resources.getTranslation("export_java_package"), false);
|
||||
classPublicRadio = new JRadioButton(Resources.getTranslation("export_java_class_public"), true);
|
||||
classProtectedRadio = new JRadioButton(Resources.getTranslation("export_java_class_protected"), false);
|
||||
methodsPublicRadio = new JRadioButton(Resources.getTranslation("export_java_class_public"), true);
|
||||
methodsProtectedRadio = new JRadioButton(Resources.getTranslation("export_java_class_protected"), false);
|
||||
packageField = new JTextField();
|
||||
packageField.setColumns(30);
|
||||
|
||||
JButton okButton = new JButton(Resources.getTranslation("OK"));
|
||||
JLabel titleLabel = new JLabel(Resources.getTranslation("export_java_title"), SwingConstants.LEFT);
|
||||
|
||||
JPanel okPanel = new JPanel();
|
||||
okPanel.add(okButton);
|
||||
JPanel centerPanel = new JPanel(new GridLayout(1,1));
|
||||
centerPanel.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
|
||||
Box centerBox = Box.createVerticalBox();
|
||||
Box packageBox = Box.createHorizontalBox();
|
||||
packageBox.add(packageCheck);
|
||||
packageBox.add(packageField);
|
||||
centerBox.add(packageBox);
|
||||
centerBox.add(new JSeparator());
|
||||
centerBox.add(classPublicRadio);
|
||||
centerBox.add(classProtectedRadio);
|
||||
centerBox.add(new JSeparator());
|
||||
centerBox.add(methodsPublicRadio);
|
||||
centerBox.add(methodsProtectedRadio);
|
||||
centerPanel.add(centerBox);
|
||||
|
||||
getContentPane().add(titleLabel, BorderLayout.NORTH);
|
||||
getContentPane().add(okPanel, BorderLayout.SOUTH);
|
||||
getContentPane().add(centerPanel, BorderLayout.CENTER);
|
||||
|
||||
okButton.addActionListener(new ActionListener(){
|
||||
public void actionPerformed(ActionEvent ev) {
|
||||
handleClose();
|
||||
}
|
||||
});
|
||||
|
||||
ButtonGroup classGroup = new ButtonGroup();
|
||||
ButtonGroup methodsGroup = new ButtonGroup();
|
||||
classGroup.add(classPublicRadio);
|
||||
classGroup.add(classProtectedRadio);
|
||||
methodsGroup.add(methodsPublicRadio);
|
||||
methodsGroup.add(methodsProtectedRadio);
|
||||
|
||||
//validateTree();
|
||||
pack();
|
||||
//setLocation(new Point(25,25));
|
||||
setVisible(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/RBJavaImporter.java,v $
|
||||
* $Date: 2002/05/20 18:53:09 $
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
|
||||
import java.io.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.filechooser.*;
|
||||
import java.util.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.net.*;
|
||||
|
||||
/**
|
||||
* This is the super class for all importer plug-in classes. As of yet, there
|
||||
* is little contained in this class.
|
||||
*
|
||||
* @author Jared Jackson - Email: <a href="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</a>
|
||||
* @see com.ibm.rbm.RBManager
|
||||
*/
|
||||
public class RBJavaImporter extends RBImporter {
|
||||
|
||||
public RBJavaImporter(String title, RBManager rbm, RBManagerGUI gui) {
|
||||
super(title, rbm, gui);
|
||||
}
|
||||
|
||||
protected void setupFileChooser() {
|
||||
chooser.setFileFilter(new javax.swing.filechooser.FileFilter(){
|
||||
public boolean accept(File f) {
|
||||
if (f.isDirectory()) return true;
|
||||
if (f.getName().endsWith(".class") && f.getName().indexOf("_") < 0) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return Resources.getTranslation("import_java_file_description");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void beginImport() throws IOException {
|
||||
super.beginImport();
|
||||
ListResourceBundle base_lrb = null;
|
||||
URLClassLoader urlLoader = null;
|
||||
try {
|
||||
File baseFile = getChosenFile();
|
||||
URL baseURL = baseFile.toURL();
|
||||
URL urls[] = new URL[1];
|
||||
urls[0] = baseURL;
|
||||
urlLoader = new URLClassLoader(urls);
|
||||
String baseName = baseFile.getName();
|
||||
baseName = baseName.substring(0, baseName.indexOf(".class"));
|
||||
|
||||
Class baseClass = urlLoader.loadClass(baseName);
|
||||
base_lrb = (ListResourceBundle)baseClass.newInstance();
|
||||
} catch (Exception e) {
|
||||
RBManagerGUI.debugMsg(e.toString());
|
||||
RBManagerGUI.debugMsg(e.getMessage());
|
||||
e.printStackTrace(System.err);
|
||||
}
|
||||
if (base_lrb != null) {
|
||||
Enumeration enum = base_lrb.getKeys();
|
||||
while (enum.hasMoreElements()) {
|
||||
String key = enum.nextElement().toString();
|
||||
System.out.println("Resource -> " + key + " = " + base_lrb.getString(key));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
class myClassLoader extends ClassLoader {
|
||||
public myClassLoader() {
|
||||
super();
|
||||
}
|
||||
|
||||
public Class myDefineClass(String name, byte array[], int off, int len) {
|
||||
return super.defineClass(name, array, off, len);
|
||||
}
|
||||
}
|
||||
*/
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/RBPropertiesExporter.java,v $
|
||||
* $Date: 2002/05/20 18:53:09 $
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
import java.io.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.filechooser.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* This class provides a plug-in exporter utility for RBManager that outputs Java
|
||||
* standard .properties files in the according to the file structure of Resource
|
||||
* Bundles. Most all meta-data is lost in this export.
|
||||
*
|
||||
* @author Jared Jackson - Email: <a href="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</a>
|
||||
* @see com.ibm.rbm.RBManager
|
||||
*/
|
||||
public class RBPropertiesExporter extends RBExporter {
|
||||
|
||||
public RBPropertiesExporter() {
|
||||
super();
|
||||
|
||||
// Initialize the file chooser if necessary
|
||||
if (chooser == null) {
|
||||
chooser = new JFileChooser();
|
||||
chooser.setFileFilter(new javax.swing.filechooser.FileFilter(){
|
||||
public String getDescription() {
|
||||
return "Base Class Properties Files";
|
||||
}
|
||||
public boolean accept(File f) {
|
||||
if (f.isDirectory()) return true;
|
||||
String name = f.getName();
|
||||
if (name.toLowerCase().endsWith(".properties") && f.getName().indexOf("_") < 0) return true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} // end if
|
||||
}
|
||||
|
||||
protected void export(RBManager rbm) throws IOException {
|
||||
if (rbm == null) return;
|
||||
// Open the Save Dialog
|
||||
int ret_val = chooser.showSaveDialog(null);
|
||||
if (ret_val != JFileChooser.APPROVE_OPTION) return;
|
||||
// Retrieve basic file information
|
||||
File file = chooser.getSelectedFile(); // The file(s) we will be working with
|
||||
File directory = new File(file.getParent()); // The directory we will be writing to
|
||||
String base_name = file.getName(); // The base name of the files we will write
|
||||
if (base_name == null || base_name.equals("")) base_name = rbm.getBaseClass();
|
||||
if (base_name.toLowerCase().endsWith(".properties"))
|
||||
base_name = base_name.substring(0,base_name.length()-11);
|
||||
|
||||
Vector bundle_v = rbm.getBundles();
|
||||
for (int i=0; i < bundle_v.size(); i++) {
|
||||
Properties prop = new Properties();
|
||||
Bundle bundle = (Bundle)bundle_v.elementAt(i);
|
||||
String base_enc = base_name;
|
||||
if (bundle.encoding != null && !bundle.encoding.equals("")) base_enc = base_enc + "_" + bundle.encoding;
|
||||
String file_name = base_enc + ".properties";
|
||||
String header = "Resource Bundle: " + file_name + " - File automatically generated by RBManager at " + (new Date());
|
||||
|
||||
Vector group_v = bundle.getGroupsAsVector();
|
||||
for (int j=0; j < group_v.size(); j++) {
|
||||
BundleGroup group = (BundleGroup)group_v.elementAt(j);
|
||||
Vector item_v = group.getItemsAsVector();
|
||||
for (int k=0; k < item_v.size(); k++) {
|
||||
BundleItem item = (BundleItem)item_v.elementAt(k);
|
||||
prop.setProperty(item.getKey(), item.getTranslation());
|
||||
} // end for - k
|
||||
} // end for - j
|
||||
|
||||
// Write out the file
|
||||
File write_file = new File(directory, file_name);
|
||||
FileOutputStream fos = new FileOutputStream(write_file);
|
||||
prop.store(fos, header);
|
||||
} // end for - i
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/RBPropertiesImporter.java,v $
|
||||
* $Date: 2002/05/20 18:53:09 $
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
import java.io.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.filechooser.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* This is the super class for all importer plug-in classes. As of yet, there
|
||||
* is little contained in this class.
|
||||
*
|
||||
* @author Jared Jackson - Email: <a href="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</a>
|
||||
* @see com.ibm.rbm.RBManager
|
||||
*/
|
||||
public class RBPropertiesImporter extends RBImporter {
|
||||
|
||||
boolean isRBMFile = true;
|
||||
|
||||
/**
|
||||
* Constructs the importer given the parent data classes and a Dialog title.
|
||||
*/
|
||||
|
||||
public RBPropertiesImporter(String title, RBManager rbm, RBManagerGUI gui) {
|
||||
super(title, rbm, gui);
|
||||
}
|
||||
|
||||
protected void setupFileChooser() {
|
||||
chooser.setFileFilter(new javax.swing.filechooser.FileFilter(){
|
||||
public boolean accept(File f) {
|
||||
if (f.isDirectory()) return true;
|
||||
if (f.getName().toLowerCase().endsWith(".properties") && f.getName().indexOf("_") < 0) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return Resources.getTranslation("import_properties_file_description");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void beginImport() throws IOException {
|
||||
super.beginImport();
|
||||
File baseFile = getChosenFile();
|
||||
FileReader fr = new FileReader(baseFile);
|
||||
BufferedReader br = new BufferedReader(fr);
|
||||
|
||||
// Test if this is an RBManager generated file or not
|
||||
int count = 0;
|
||||
String line = null;
|
||||
isRBMFile = true;
|
||||
while ((line = br.readLine()) != null) {
|
||||
if (!line.trim().equals("")) count++;
|
||||
if (count == 1 && !line.startsWith("# @file")) {
|
||||
// Not generated by RBManager
|
||||
isRBMFile = false;
|
||||
}
|
||||
} // end while
|
||||
if (isRBMFile) {
|
||||
// Treat the file as generated by RBManager
|
||||
// Parse the resource bundle through RBManager
|
||||
RBManager import_rbm = new RBManager(baseFile);
|
||||
// Merge the two resource bundles
|
||||
Vector bundles = import_rbm.getBundles();
|
||||
Vector encodings = new Vector();
|
||||
for (int i=0; i < bundles.size(); i++) {
|
||||
Bundle b = (Bundle)bundles.elementAt(i);
|
||||
encodings.addElement(b.encoding);
|
||||
}
|
||||
resolveEncodings(encodings);
|
||||
for (int i=0; i < bundles.size(); i++) {
|
||||
Bundle b = (Bundle)bundles.elementAt(i);
|
||||
Enumeration enum = b.allItems.keys();
|
||||
while (enum.hasMoreElements()) {
|
||||
String key = (String)enum.nextElement();
|
||||
BundleItem item = (BundleItem)b.allItems.get(key);
|
||||
importResource(item, b.encoding, (item.getParentGroup() == null ? getDefaultGroup(): item.getParentGroup().getName()));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Just treat it as a regular properties file
|
||||
// Check if there are any missing target locale files
|
||||
String baseName = baseFile.getName().substring(0,baseFile.getName().length()-11); // |'.properties'| == 11
|
||||
File baseDir = new File(baseFile.getParent());
|
||||
String allChildren[] = baseDir.list();
|
||||
Vector children_v = new Vector();
|
||||
for (int i=0; i < allChildren.length; i++) {
|
||||
if (allChildren[i].startsWith(baseName) && allChildren[i].toLowerCase().endsWith(".properties")) {
|
||||
if (allChildren[i].length() == (baseName + ".properties").length()) children_v.addElement("");
|
||||
else children_v.addElement(allChildren[i].substring(baseName.length()+1, allChildren[i].indexOf(".properties")));
|
||||
}
|
||||
}
|
||||
showProgressBar(children_v.size());
|
||||
resolveEncodings(children_v);
|
||||
// Run through each source locale file importing as necessary
|
||||
for (int i=0; i < children_v.size(); i++) {
|
||||
Properties p = new Properties();
|
||||
FileInputStream fis = new FileInputStream(new File(baseDir, baseName +
|
||||
(children_v.elementAt(i).toString().equals("") ? "" : "_" + children_v.elementAt(i).toString()) +
|
||||
".properties"));
|
||||
p.load(fis);
|
||||
Enumeration enum = p.keys();
|
||||
while (enum.hasMoreElements()) {
|
||||
String key = (String)enum.nextElement();
|
||||
BundleItem item = new BundleItem(null, key, p.getProperty(key));
|
||||
item.setTranslated(this.getDefaultTranslated());
|
||||
importResource(item, children_v.elementAt(i).toString(), getDefaultGroup());
|
||||
}
|
||||
incrementProgressBar();
|
||||
}
|
||||
hideProgressBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
java -classpath lib\RBManager.jar;lib\xerces.jar;. com.ibm.rbm.RBReporter %1
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,316 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/RBReporterScanner.java,v $
|
||||
* $Date: 2002/05/20 18:53:09 $
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import javax.swing.event.*;
|
||||
import javax.swing.filechooser.*;
|
||||
import java.awt.event.*;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import org.apache.xerces.parsers.*;
|
||||
import org.apache.xerces.dom.*;
|
||||
import org.apache.xml.serialize.*;
|
||||
import org.w3c.dom.*;
|
||||
import org.xml.sax.*;
|
||||
|
||||
/**
|
||||
* RBReporterScaner is a utility class for RBReporter. It creates a report from an xml settings
|
||||
* file that scans code for resources and compares them against a resource bundle.
|
||||
*
|
||||
* @author Jared Jackson - Email: <a href="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</a>
|
||||
* @see com.ibm.rbm.RBReporter
|
||||
*/
|
||||
public class RBReporterScanner {
|
||||
private Bundle bundle;
|
||||
private DocumentImpl config;
|
||||
private Hashtable fileRules;
|
||||
private Hashtable parseRules;
|
||||
private Hashtable results;
|
||||
private Hashtable missing;
|
||||
private boolean resultsFound;
|
||||
|
||||
protected RBReporterScanner(Bundle bundle, File configFile) throws IOException {
|
||||
resultsFound = false;
|
||||
this.bundle = bundle;
|
||||
|
||||
try {
|
||||
InputSource is = new InputSource(new FileInputStream(configFile));
|
||||
DOMParser parser = new DOMParser();
|
||||
parser.parse(is);
|
||||
config = (DocumentImpl)parser.getDocument();
|
||||
} catch (SAXException saxe) {
|
||||
throw new IOException("Illegal XML Document: " + saxe.getMessage());
|
||||
}
|
||||
|
||||
ElementImpl root = (ElementImpl)config.getDocumentElement();
|
||||
fileRules = getFileRules(root);
|
||||
parseRules = getParseRules(root);
|
||||
|
||||
results = new Hashtable();
|
||||
Enumeration enum = bundle.allItems.keys();
|
||||
while (enum.hasMoreElements()) {
|
||||
String key = (String)enum.nextElement();
|
||||
BundleItem item = (BundleItem)bundle.allItems.get(key);
|
||||
results.put(key, new ScanResult(item));
|
||||
}
|
||||
|
||||
missing = new Hashtable();
|
||||
}
|
||||
|
||||
protected int getNumberResourcesFound() {
|
||||
return results.size();
|
||||
}
|
||||
|
||||
protected int getNumberMissingResources() {
|
||||
return missing.size();
|
||||
}
|
||||
|
||||
protected int getNumberUnusedResources() {
|
||||
int count = 0;
|
||||
Enumeration enum = results.elements();
|
||||
while (enum.hasMoreElements()) {
|
||||
ScanResult result = (ScanResult)enum.nextElement();
|
||||
if (result.getOccurances().size() < 1) count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
protected Vector getMissingResources() {
|
||||
Enumeration enum = missing.elements();
|
||||
Vector v = new Vector();
|
||||
while (enum.hasMoreElements()) v.addElement(enum.nextElement());
|
||||
return v;
|
||||
}
|
||||
|
||||
protected Vector getUnusedResources() {
|
||||
Enumeration enum = results.elements();
|
||||
Vector v = new Vector();
|
||||
while (enum.hasMoreElements()) {
|
||||
ScanResult result = (ScanResult)enum.nextElement();
|
||||
if (result.getOccurances().size() < 1) {
|
||||
v.addElement(result);
|
||||
}
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
protected boolean performScan() throws IOException {
|
||||
resultsFound = false;
|
||||
|
||||
ElementImpl root = (ElementImpl)config.getDocumentElement();
|
||||
NodeList nl = root.getElementsByTagName("Scan");
|
||||
if (nl.getLength() < 1) return resultsFound;
|
||||
ElementImpl scan_elem = (ElementImpl)nl.item(0);
|
||||
nl = scan_elem.getElementsByTagName("Directory");
|
||||
for (int i=0; i < nl.getLength(); i++) {
|
||||
ElementImpl dir_elem = (ElementImpl)nl.item(i);
|
||||
File directory = new File(dir_elem.getAttribute("location"));
|
||||
boolean recurse = dir_elem.getAttribute("recurse_directories").equalsIgnoreCase("true");
|
||||
NodeList rules_list = dir_elem.getElementsByTagName("Rules");
|
||||
if (rules_list.getLength() < 1) continue;
|
||||
ElementImpl rules_elem = (ElementImpl)rules_list.item(0);
|
||||
NodeList frules_list = rules_elem.getElementsByTagName("ApplyFileRule");
|
||||
// For each file rule
|
||||
for (int j=0; j < frules_list.getLength(); j++) {
|
||||
ElementImpl frule_elem = (ElementImpl)frules_list.item(j);
|
||||
FileRule frule = (FileRule)fileRules.get(frule_elem.getAttribute("name"));
|
||||
if (frule == null) continue;
|
||||
NodeList prules_list = frule_elem.getElementsByTagName("ApplyParseRule");
|
||||
Vector prules_v = new Vector();
|
||||
// For each parse rule
|
||||
for (int k=0; k < prules_list.getLength(); k++) {
|
||||
ElementImpl prule_elem = (ElementImpl)prules_list.item(k);
|
||||
ParseRule prule = (ParseRule)parseRules.get(prule_elem.getAttribute("name"));
|
||||
if (prule == null) continue;
|
||||
prules_v.addElement(prule);
|
||||
}
|
||||
if (prules_v.size() < 1) continue;
|
||||
scanDirectory(directory, frule, prules_v, recurse);
|
||||
}
|
||||
}
|
||||
|
||||
return resultsFound;
|
||||
}
|
||||
|
||||
private void scanDirectory(File directory, FileRule frule, Vector prules, boolean recurse) throws IOException {
|
||||
|
||||
// Recursion step
|
||||
if (recurse) {
|
||||
File children[] = directory.listFiles(new java.io.FileFilter(){
|
||||
public boolean accept(File f) {
|
||||
if (f.isDirectory()) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return "";
|
||||
}
|
||||
});
|
||||
for (int i=0; i < children.length; i++) {
|
||||
File new_directory = children[i];
|
||||
scanDirectory(new_directory, frule, prules, recurse);
|
||||
}
|
||||
}
|
||||
// Go through each acceptable file
|
||||
File children[] = directory.listFiles();
|
||||
for (int i=0; i < children.length; i++) {
|
||||
File f = children[i];
|
||||
if (f.isDirectory() || !(frule.applyRule(f.getName()))) continue;
|
||||
FileReader fr = new FileReader(f);
|
||||
BufferedReader br = new BufferedReader(fr);
|
||||
String line = null;
|
||||
int line_count = 0;
|
||||
// Read the file line by line
|
||||
while ((line = br.readLine()) != null) {
|
||||
line_count++;
|
||||
Vector findings = new Vector();
|
||||
// Apply all parse rules to each line
|
||||
for (int j=0; j < prules.size(); j++) {
|
||||
ParseRule prule = (ParseRule)prules.elementAt(j);
|
||||
Vector temp_results = prule.applyRule(line);
|
||||
for (int k=0; k < temp_results.size(); k++) {
|
||||
findings.addElement(temp_results.elementAt(k));
|
||||
}
|
||||
}
|
||||
for (int j=0; j < findings.size(); j++) {
|
||||
String name = (String)findings.elementAt(j);
|
||||
Occurance occ = new Occurance(f.getName(), f.getAbsolutePath(), line_count);
|
||||
// If the name is found in the resource bundles derived hashtable
|
||||
if (results.containsKey(name)) {
|
||||
ScanResult scan_res = (ScanResult)results.get(name);
|
||||
scan_res.addOccurance(occ);
|
||||
} else {
|
||||
// Add it to the missing results
|
||||
ScanResult scan_res = new ScanResult(new BundleItem(null, name, "*unknown*"));
|
||||
scan_res.addOccurance(occ);
|
||||
missing.put(name, scan_res);
|
||||
results.put(name, scan_res);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Hashtable getFileRules(ElementImpl root) {
|
||||
Hashtable result = new Hashtable();
|
||||
NodeList frules_list = root.getElementsByTagName("FileRules");
|
||||
ElementImpl frules_elem = null;
|
||||
if (frules_list.getLength() > 0) frules_elem = (ElementImpl)frules_list.item(0);
|
||||
if (frules_elem == null) return result;
|
||||
frules_list = frules_elem.getElementsByTagName("FileRule");
|
||||
for (int i=0; i < frules_list.getLength(); i++) {
|
||||
ElementImpl elem = (ElementImpl)frules_list.item(i);
|
||||
FileRule frule = new FileRule(elem.getAttribute("name"), elem.getAttribute("starts_with"),
|
||||
elem.getAttribute("ends_with"), elem.getAttribute("contains"));
|
||||
result.put(elem.getAttribute("name"), frule);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private Hashtable getParseRules(ElementImpl root) {
|
||||
Hashtable result = new Hashtable();
|
||||
NodeList prules_list = root.getElementsByTagName("ParseRules");
|
||||
ElementImpl prules_elem = null;
|
||||
if (prules_list.getLength() > 0) prules_elem = (ElementImpl)prules_list.item(0);
|
||||
if (prules_elem == null) return result;
|
||||
prules_list = prules_elem.getElementsByTagName("ParseRule");
|
||||
for (int i=0; i < prules_list.getLength(); i++) {
|
||||
ElementImpl elem = (ElementImpl)prules_list.item(i);
|
||||
ParseRule prule = new ParseRule(elem.getAttribute("name"), elem.getAttribute("follows"),
|
||||
elem.getAttribute("precedes"));
|
||||
result.put(elem.getAttribute("name"), prule);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
class FileRule {
|
||||
String name;
|
||||
String starts_with;
|
||||
String ends_with;
|
||||
String contains;
|
||||
|
||||
FileRule(String name, String starts_with, String ends_with, String contains) {
|
||||
this.name = name;
|
||||
this.starts_with = starts_with;
|
||||
this.ends_with = ends_with;
|
||||
this.contains = contains;
|
||||
}
|
||||
|
||||
boolean applyRule(String source) {
|
||||
boolean accept = true;
|
||||
if (starts_with != null && starts_with.length() > 0 && !(source.startsWith(starts_with))) accept = false;
|
||||
if (ends_with != null && ends_with.length() > 0 && !(source.endsWith(ends_with))) accept = false;
|
||||
if (contains != null && contains.length() > 0 && source.indexOf(contains) < 0) accept = false;
|
||||
return accept;
|
||||
}
|
||||
}
|
||||
|
||||
class ParseRule {
|
||||
String name;
|
||||
String before;
|
||||
String after;
|
||||
|
||||
ParseRule(String name, String before, String after) {
|
||||
this.name = name;
|
||||
this.before = before;
|
||||
this.after = after;
|
||||
}
|
||||
|
||||
// returns the vector of strings found after before and before after
|
||||
|
||||
Vector applyRule(String source) {
|
||||
Vector v = new Vector();
|
||||
if (before != null && before.length() > 0) {
|
||||
if (after != null && after.length() > 0) {
|
||||
// Both before and after non-empty
|
||||
int before_index = -1;
|
||||
int after_index = -1;
|
||||
while ((before_index = source.indexOf(before, ++before_index)) >= 0) {
|
||||
//before_index = source.indexOf(before, before_index);
|
||||
after_index = -1;
|
||||
after_index = source.indexOf(after, before_index + before.length()+1);
|
||||
if (after_index < 0 || before_index < 0 || before.length() < 0) break;
|
||||
else {
|
||||
v.addElement(source.substring(before_index + before.length(), after_index));
|
||||
before_index = after_index;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Before non-empty, after empty
|
||||
int index = -1;
|
||||
while (source.indexOf(before, ++index) >= 0) {
|
||||
index = source.indexOf(before, index);
|
||||
String result = source.substring(index + before.length(), source.length());
|
||||
if (result != null && result.length() > 0) v.addElement(result);
|
||||
}
|
||||
}
|
||||
} else if (after != null && after.length() > 0) {
|
||||
// Before empty, after not
|
||||
int index = -1;
|
||||
while (source.indexOf(after, ++index) >= 0) {
|
||||
index = source.indexOf(before, index);
|
||||
String result = source.substring(0, index);
|
||||
if (result != null && result.length() > 0) v.addElement(result);
|
||||
}
|
||||
} else {
|
||||
// Before and after empty
|
||||
v.addElement(source);
|
||||
}
|
||||
return v;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,232 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/RBTMXExporter.java,v $
|
||||
* $Date: 2002/05/20 18:53:09 $
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
|
||||
import java.io.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.filechooser.*;
|
||||
import java.util.*;
|
||||
|
||||
import org.apache.xerces.parsers.*;
|
||||
import org.apache.xerces.dom.*;
|
||||
import org.apache.xml.serialize.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
/**
|
||||
* This class is a plug-in to RBManager that allows the user to export Resource Bundles
|
||||
* along with some of the meta-data associated by RBManager to the TMX specification.
|
||||
* For more information on TMX visit the web site <A HREF=http://www.lis.org/tmx>http://www.lisa.org/tmx</A>
|
||||
*
|
||||
* @author Jared Jackson - Email: <a href="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</a>
|
||||
* @see com.ibm.rbm.RBManager
|
||||
*/
|
||||
public class RBTMXExporter extends RBExporter {
|
||||
private static final String VERSION = "0.5a";
|
||||
|
||||
/**
|
||||
* Default constructor for the TMX exporter.
|
||||
*/
|
||||
|
||||
public RBTMXExporter() {
|
||||
super();
|
||||
|
||||
// Initialize the file chooser if necessary
|
||||
if (chooser == null) {
|
||||
chooser = new JFileChooser();
|
||||
chooser.setFileFilter(new javax.swing.filechooser.FileFilter(){
|
||||
public String getDescription() {
|
||||
return "TMX Files";
|
||||
}
|
||||
public boolean accept(File f) {
|
||||
if (f.isDirectory()) return true;
|
||||
if (f.getName().endsWith(".tmx")) return true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} // end if
|
||||
}
|
||||
|
||||
private String convertToISO(Date d) {
|
||||
GregorianCalendar gc = new GregorianCalendar();
|
||||
gc.setTime(d);
|
||||
return convertToISO(gc);
|
||||
}
|
||||
|
||||
private String convertToISO(GregorianCalendar gc) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append(String.valueOf(gc.get(Calendar.YEAR)));
|
||||
int month = gc.get(Calendar.MONTH)+1;
|
||||
buffer.append(((month < 10) ? "0" : "") + String.valueOf(month));
|
||||
int day = gc.get(Calendar.DAY_OF_MONTH);
|
||||
buffer.append(((day < 10) ? "0" : "") + String.valueOf(day));
|
||||
buffer.append("T");
|
||||
int hour = gc.get(Calendar.HOUR_OF_DAY);
|
||||
buffer.append(((hour < 10) ? "0" : "") + String.valueOf(hour));
|
||||
int minute = gc.get(Calendar.MINUTE);
|
||||
buffer.append(((minute < 10) ? "0" : "") + String.valueOf(minute));
|
||||
int second = gc.get(Calendar.SECOND);
|
||||
buffer.append(((second < 10) ? "0" : "") + String.valueOf(second));
|
||||
buffer.append("Z");
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
private String convertEncoding(BundleItem item) {
|
||||
if (item != null && item.getParentGroup() != null && item.getParentGroup().getParentBundle() != null) {
|
||||
String language = item.getParentGroup().getParentBundle().getLanguageEncoding();
|
||||
String country = item.getParentGroup().getParentBundle().getCountryEncoding();
|
||||
String variant = item.getParentGroup().getParentBundle().getVariantEncoding();
|
||||
if (language != null && !language.equals("")) {
|
||||
//language = language.toUpperCase();
|
||||
if (country != null && !country.equals("")) {
|
||||
//country = country.toUpperCase();
|
||||
if (variant != null && !variant.equals("")) {
|
||||
//variant = variant.toUpperCase();
|
||||
return language + "-" + country + "-" + variant;
|
||||
} else return language + "-" + country;
|
||||
} else return language;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private void appendTUV(DocumentImpl xml, Element tu, BundleItem item) {
|
||||
Element tuv = xml.createElement("tuv");
|
||||
tuv.setAttribute("lang", convertEncoding(item));
|
||||
tuv.setAttribute("creationdate",convertToISO(item.getCreatedDate()));
|
||||
tuv.setAttribute("creationid",item.getCreator());
|
||||
tuv.setAttribute("changedate",convertToISO(item.getModifiedDate()));
|
||||
tuv.setAttribute("changeid",item.getModifier());
|
||||
item.getComment();
|
||||
item.isTranslated();
|
||||
|
||||
Element comment_prop = xml.createElement("prop");
|
||||
comment_prop.appendChild(xml.createTextNode(item.getComment()));
|
||||
comment_prop.setAttribute("type","x-Comment");
|
||||
tuv.appendChild(comment_prop);
|
||||
|
||||
Element translated_prop = xml.createElement("prop");
|
||||
translated_prop.appendChild(xml.createTextNode(String.valueOf(item.isTranslated())));
|
||||
translated_prop.setAttribute("type","x-Translated");
|
||||
tuv.appendChild(translated_prop);
|
||||
|
||||
Hashtable lookups = item.getLookups();
|
||||
Enumeration enum = lookups.keys();
|
||||
while (enum.hasMoreElements()) {
|
||||
String key = (String)enum.nextElement();
|
||||
String value = (String)lookups.get(key);
|
||||
Element lookup_prop = xml.createElement("prop");
|
||||
lookup_prop.appendChild(xml.createTextNode(key + "=" + value));
|
||||
lookup_prop.setAttribute("type","x-Lookup");
|
||||
tuv.appendChild(lookup_prop);
|
||||
}
|
||||
|
||||
Element seg = xml.createElement("seg");
|
||||
seg.appendChild(xml.createTextNode(item.getTranslation()));
|
||||
tuv.appendChild(seg);
|
||||
|
||||
tu.appendChild(tuv);
|
||||
}
|
||||
|
||||
protected void export(RBManager rbm) throws IOException {
|
||||
if (rbm == null) return;
|
||||
// Open the Save Dialog
|
||||
int ret_val = chooser.showSaveDialog(null);
|
||||
if (ret_val != JFileChooser.APPROVE_OPTION) return;
|
||||
// Retrieve basic file information
|
||||
File file = chooser.getSelectedFile(); // The file(s) we will be working with
|
||||
File directory = new File(file.getParent()); // The directory we will be writing to
|
||||
String base_name = file.getName(); // The base name of the files we will write
|
||||
if (base_name == null || base_name.equals("")) base_name = rbm.getBaseClass();
|
||||
if (base_name.endsWith(".tmx")) base_name = base_name.substring(0,base_name.length()-4);
|
||||
|
||||
String file_name = base_name + ".tmx";
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
|
||||
Vector bundle_v = rbm.getBundles();
|
||||
Bundle main_bundle = (Bundle)bundle_v.elementAt(0);
|
||||
|
||||
DocumentImpl xml = new DocumentImpl();
|
||||
Element root = xml.createElement("tmx");
|
||||
root.setAttribute("version", "1.2");
|
||||
xml.appendChild(root);
|
||||
|
||||
Element header = xml.createElement("header");
|
||||
Element note = xml.createElement("note");
|
||||
note.appendChild(xml.createTextNode("This document was created automatically by RBManager"));
|
||||
header.appendChild(note);
|
||||
header.setAttribute("creationtool", "RBManager");
|
||||
header.setAttribute("creationtoolversion", VERSION);
|
||||
header.setAttribute("datatype", "PlainText");
|
||||
header.setAttribute("segtype", "sentance");
|
||||
header.setAttribute("adminlang", "en-us");
|
||||
header.setAttribute("srclang", "EN");
|
||||
header.setAttribute("o-tmf", "none");
|
||||
header.setAttribute("creationdate", convertToISO(new Date()));
|
||||
root.appendChild(header);
|
||||
|
||||
Element body = xml.createElement("body");
|
||||
root.appendChild(body);
|
||||
|
||||
Vector group_v = main_bundle.getGroupsAsVector();
|
||||
// Loop through each bundle group in main_bundle
|
||||
for (int i=0; i < group_v.size(); i++) {
|
||||
BundleGroup main_group = (BundleGroup)group_v.elementAt(i);
|
||||
// Gather a group of groups of the same name as main_group
|
||||
Vector all_groups_v = new Vector();
|
||||
for (int j=1; j < bundle_v.size(); j++) {
|
||||
Bundle bundle = (Bundle)bundle_v.elementAt(j);
|
||||
if (bundle.hasGroup(main_group.getName())) {
|
||||
Vector groups = bundle.getGroupsAsVector();
|
||||
for (int k=0; k < groups.size(); k++) {
|
||||
BundleGroup group = (BundleGroup)groups.elementAt(k);
|
||||
if (group.getName().equals(main_group.getName())) all_groups_v.addElement(group);
|
||||
}
|
||||
}
|
||||
} // end for - j
|
||||
// Loop through each item in main_group
|
||||
for (int j=0; j < main_group.getItemCount(); j++) {
|
||||
BundleItem main_item = main_group.getBundleItem(j);
|
||||
Element tu = xml.createElement("tu");
|
||||
tu.setAttribute("tuid",main_item.getKey());
|
||||
tu.setAttribute("datatype","Text");
|
||||
// Insert the group name for the item
|
||||
Element group_prop = xml.createElement("prop");
|
||||
group_prop.appendChild(xml.createTextNode(main_group.getName()));
|
||||
group_prop.setAttribute("type", "x-Group");
|
||||
tu.appendChild(group_prop);
|
||||
// Add the main_item to the xml
|
||||
appendTUV(xml, tu, main_item);
|
||||
// Loop through the rest of the groups of the same name as main_group
|
||||
for (int k=0; k < all_groups_v.size(); k++) {
|
||||
BundleGroup group = (BundleGroup)all_groups_v.elementAt(k);
|
||||
// Loop through the items in each group
|
||||
for (int l=0; l < group.getItemCount(); l++) {
|
||||
BundleItem item = group.getBundleItem(l);
|
||||
if (item.getKey().equals(main_item.getKey())) {
|
||||
appendTUV(xml, tu, item);
|
||||
break;
|
||||
}
|
||||
} // end for - l
|
||||
} // end for - k
|
||||
body.appendChild(tu);
|
||||
} // end for - j
|
||||
} // end for - i
|
||||
FileWriter fw = new FileWriter(new File(directory,file_name));
|
||||
OutputFormat of = new OutputFormat(xml);
|
||||
of.setIndenting(true);
|
||||
of.setEncoding("ISO-8859-1");
|
||||
XMLSerializer serializer = new XMLSerializer(fw, of);
|
||||
serializer.serialize(xml);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,223 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/RBTMXImporter.java,v $
|
||||
* $Date: 2002/05/20 18:53:09 $
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
import java.io.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.filechooser.*;
|
||||
import java.util.*;
|
||||
|
||||
import org.apache.xerces.parsers.*;
|
||||
import org.apache.xerces.dom.*;
|
||||
import org.apache.xml.serialize.*;
|
||||
import org.w3c.dom.*;
|
||||
import org.xml.sax.*;
|
||||
|
||||
|
||||
/**
|
||||
* This is the super class for all importer plug-in classes. This class defines the methods
|
||||
* and functionality common to all importers. This includes setting up the options dialog and
|
||||
* displaying it to the user, performing the actual insertions into the resource bundle manager,
|
||||
* and managing any import conflicts.
|
||||
*
|
||||
* @author Jared Jackson - Email: <a href="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</a>
|
||||
* @see com.ibm.rbm.RBManager
|
||||
*/
|
||||
public class RBTMXImporter extends RBImporter {
|
||||
|
||||
DocumentImpl tmx_xml = null;
|
||||
|
||||
/**
|
||||
* Basic constructor for the TMX importer from the parent RBManager data and a Dialog title.
|
||||
*/
|
||||
|
||||
public RBTMXImporter(String title, RBManager rbm, RBManagerGUI gui) {
|
||||
super(title, rbm, gui);
|
||||
}
|
||||
|
||||
protected void setupFileChooser() {
|
||||
chooser.setFileFilter(new javax.swing.filechooser.FileFilter(){
|
||||
public boolean accept(File f) {
|
||||
if (f.isDirectory()) return true;
|
||||
if (f.getName().endsWith(".tmx")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return Resources.getTranslation("import_TMX_file_description");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void beginImport() throws IOException {
|
||||
super.beginImport();
|
||||
File tmx_file = getChosenFile();
|
||||
|
||||
try {
|
||||
InputSource is = new InputSource(new FileInputStream(tmx_file));
|
||||
//is.setEncoding("UTF-8");
|
||||
DOMParser parser = new DOMParser();
|
||||
parser.parse(is);
|
||||
tmx_xml = (DocumentImpl)parser.getDocument();
|
||||
} catch (Exception e) {
|
||||
RBManagerGUI.debugMsg(e.getMessage());
|
||||
e.printStackTrace(System.err);
|
||||
}
|
||||
if (tmx_xml == null) return;
|
||||
|
||||
importDoc();
|
||||
}
|
||||
|
||||
private void importDoc() {
|
||||
if (tmx_xml == null) return;
|
||||
ElementImpl root = (ElementImpl)tmx_xml.getDocumentElement();
|
||||
Node node = root.getFirstChild();
|
||||
while (node != null && (node.getNodeType() != Node.ELEMENT_NODE || !(node.getNodeName().equalsIgnoreCase("header")))) {
|
||||
node = node.getNextSibling();
|
||||
}
|
||||
ElementImpl header = (ElementImpl)node;
|
||||
node = root.getFirstChild();
|
||||
while (node != null && (node.getNodeType() != Node.ELEMENT_NODE || !(node.getNodeName().equalsIgnoreCase("body")))) {
|
||||
node = node.getNextSibling();
|
||||
}
|
||||
ElementImpl body = (ElementImpl)node;
|
||||
resolveEncodings(getEncodingsVector(body));
|
||||
|
||||
// Now do the actual import resource by resource
|
||||
NodeList tu_list = body.getElementsByTagName("tu");
|
||||
for (int i=0; i < tu_list.getLength(); i++) {
|
||||
ElementImpl tu_elem = (ElementImpl)tu_list.item(i);
|
||||
// Get the key value
|
||||
String name = tu_elem.getAttribute("tuid");
|
||||
if (name == null || name.length() < 1) continue;
|
||||
// Get the group if it exists
|
||||
String group = null;
|
||||
NodeList prop_list = tu_elem.getElementsByTagName("prop");
|
||||
for (int j=0; j < prop_list.getLength(); j++) {
|
||||
ElementImpl prop_elem = (ElementImpl)prop_list.item(j);
|
||||
String type = prop_elem.getAttribute("type");
|
||||
if (type != null && type.equals("x-Group")) {
|
||||
prop_elem.normalize();
|
||||
NodeList text_list = prop_elem.getChildNodes();
|
||||
if (text_list.getLength() < 1) continue;
|
||||
TextImpl text_elem = (TextImpl)text_list.item(0);
|
||||
group = text_elem.getNodeValue();
|
||||
}
|
||||
}
|
||||
if (group == null || group.length() < 1) group = getDefaultGroup();
|
||||
|
||||
NodeList tuv_list = tu_elem.getElementsByTagName("tuv");
|
||||
// For each tuv element
|
||||
for (int j=0; j < tuv_list.getLength(); j++) {
|
||||
ElementImpl tuv_elem = (ElementImpl)tuv_list.item(j);
|
||||
String encoding = tuv_elem.getAttribute("lang");
|
||||
// Get the current encoding
|
||||
if (encoding == null) continue;
|
||||
char array[] = encoding.toCharArray();
|
||||
for (int k=0; k < array.length; k++) {
|
||||
if (array[k] == '-') array[k] = '_';
|
||||
}
|
||||
encoding = String.valueOf(array);
|
||||
// Get the translation value
|
||||
NodeList seg_list = tuv_elem.getElementsByTagName("seg");
|
||||
if (seg_list.getLength() < 1) continue;
|
||||
ElementImpl seg_elem = (ElementImpl)seg_list.item(0);
|
||||
seg_elem.normalize();
|
||||
NodeList text_list = seg_elem.getChildNodes();
|
||||
if (text_list.getLength() < 1) continue;
|
||||
TextImpl text_elem = (TextImpl)text_list.item(0);
|
||||
String value = text_elem.getNodeValue();
|
||||
if (value == null || value.length() < 1) continue;
|
||||
// Create the bundle item
|
||||
BundleItem item = new BundleItem(null, name, value);
|
||||
// Get creation, modification values
|
||||
item.setCreatedDate(tuv_elem.getAttribute("creationdate"));
|
||||
item.setModifiedDate(tuv_elem.getAttribute("changedate"));
|
||||
if (tuv_elem.getAttribute("changeid") != null) item.setModifier(tuv_elem.getAttribute("changeid"));
|
||||
if (tuv_elem.getAttribute("creationid") != null) item.setCreator(tuv_elem.getAttribute("creationid"));
|
||||
// Get properties specified
|
||||
prop_list = tuv_elem.getElementsByTagName("prop");
|
||||
Hashtable lookups = null;
|
||||
for (int k=0; k < prop_list.getLength(); k++) {
|
||||
ElementImpl prop_elem = (ElementImpl)prop_list.item(k);
|
||||
String type = prop_elem.getAttribute("type");
|
||||
if (type != null && type.equals("x-Comment")) {
|
||||
// Get the comment
|
||||
prop_elem.normalize();
|
||||
text_list = prop_elem.getChildNodes();
|
||||
if (text_list.getLength() < 1) continue;
|
||||
text_elem = (TextImpl)text_list.item(0);
|
||||
String comment = text_elem.getNodeValue();
|
||||
if (comment != null && comment.length() > 0) item.setComment(comment);
|
||||
} else if (type != null && type.equals("x-Translated")) {
|
||||
// Get the translated flag value
|
||||
prop_elem.normalize();
|
||||
text_list = prop_elem.getChildNodes();
|
||||
if (text_list.getLength() < 1) continue;
|
||||
text_elem = (TextImpl)text_list.item(0);
|
||||
if (text_elem.getNodeValue() != null) {
|
||||
if (text_elem.getNodeValue().equalsIgnoreCase("true")) item.setTranslated(true);
|
||||
else if (text_elem.getNodeValue().equalsIgnoreCase("false")) item.setTranslated(false);
|
||||
else item.setTranslated(getDefaultTranslated());
|
||||
} else item.setTranslated(getDefaultTranslated());
|
||||
} else if (type != null && type.equals("x-Lookup")) {
|
||||
// Get a lookup value
|
||||
prop_elem.normalize();
|
||||
text_list = prop_elem.getChildNodes();
|
||||
if (text_list.getLength() < 1) continue;
|
||||
text_elem = (TextImpl)text_list.item(0);
|
||||
if (text_elem.getNodeValue() != null) {
|
||||
String text = text_elem.getNodeValue();
|
||||
if (text.indexOf("=") > 0) {
|
||||
try {
|
||||
if (lookups == null) lookups = new Hashtable();
|
||||
String lkey = text.substring(0,text.indexOf("="));
|
||||
String lvalue = text.substring(text.indexOf("=")+1,text.length());
|
||||
lookups.put(lkey, lvalue);
|
||||
} catch (Exception ex) { /* String out of bounds - Ignore and go on */ }
|
||||
}
|
||||
} else item.setTranslated(getDefaultTranslated());
|
||||
}
|
||||
}
|
||||
if (lookups != null) item.setLookups(lookups);
|
||||
importResource(item, encoding, group);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Vector getEncodingsVector(ElementImpl body) {
|
||||
String empty = "";
|
||||
if (body == null) return null;
|
||||
Hashtable hash = new Hashtable();
|
||||
NodeList tu_list = body.getElementsByTagName("tu");
|
||||
for (int i=0; i < tu_list.getLength(); i++) {
|
||||
ElementImpl tu_elem = (ElementImpl)tu_list.item(i);
|
||||
NodeList tuv_list = tu_elem.getElementsByTagName("tuv");
|
||||
for (int j=0; j < tuv_list.getLength(); j++) {
|
||||
ElementImpl tuv_elem = (ElementImpl)tuv_list.item(j);
|
||||
String encoding = tuv_elem.getAttribute("lang");
|
||||
if (encoding == null) continue;
|
||||
char array[] = encoding.toCharArray();
|
||||
for (int k=0; k < array.length; k++) {
|
||||
if (array[k] == '-') array[k] = '_';
|
||||
}
|
||||
encoding = String.valueOf(array);
|
||||
if (!(hash.containsKey(encoding))) hash.put(encoding,empty);
|
||||
}
|
||||
}
|
||||
Vector v = new Vector();
|
||||
Enumeration enum = hash.keys();
|
||||
while (enum.hasMoreElements()) { v.addElement(enum.nextElement()); }
|
||||
return v;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,247 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/Resources.java,v $
|
||||
* $Date: 2002/05/20 23:04:00 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.net.JarURLConnection;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.*;
|
||||
import java.util.zip.ZipEntry;
|
||||
|
||||
/**
|
||||
* A class not to be instantiated. Provides methods for translating items from a resource bundle. To use this class
|
||||
* make sure you first call initBundle(). Once this is done, calling any of the getTranslation() methods will return
|
||||
* the appropriate String.
|
||||
*
|
||||
* @author Jared Jackson - Email: <a href="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</a>
|
||||
* @see com.ibm.rbm.RBManager
|
||||
*/
|
||||
public class Resources {
|
||||
private static ResourceBundle resource_bundle;
|
||||
private static Locale locale;
|
||||
|
||||
/**
|
||||
* Initialize the properties of this resource bundle. This method must be called once before any
|
||||
* other method can be called (unless that method performs a check that calls this method). This is
|
||||
* also the method to use in case the resource data on the data store has changed and those changes
|
||||
* need to be reflected in future use of this class.
|
||||
*/
|
||||
|
||||
public static void initBundle() {
|
||||
try {
|
||||
if (locale == null) locale = Locale.getDefault();
|
||||
resource_bundle = ResourceBundle.getBundle("com/ibm/rbm/resources/RBManager", locale);
|
||||
} catch(MissingResourceException mre) {
|
||||
System.err.println("Missing Resource for default locale, " + Locale.getDefault().toString());
|
||||
mre.printStackTrace(System.err);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the locale to be used when making a query on the resource
|
||||
*/
|
||||
|
||||
public static void setLocale(Locale locale) {
|
||||
try {
|
||||
Resources.locale = locale;
|
||||
Resources.resource_bundle = ResourceBundle.getBundle("com/ibm/rbm/resources/RBManager", locale);
|
||||
} catch (MissingResourceException mre) {
|
||||
System.err.println("Missing Resource for locale, " + locale.toString());
|
||||
mre.printStackTrace(System.err);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the currently set Locales object.
|
||||
*/
|
||||
|
||||
public static Locale getLocale() {
|
||||
if (Resources.locale == null) Resources.initBundle();
|
||||
return Resources.locale;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of strings containing the locale encoding (e.g. 'en_US', 'de', etc.)
|
||||
* of the locales defined in the current resource bundle. These are all of the locales for
|
||||
* which unique translation of resource bundle items are possible. If a locale encoding is
|
||||
* used to query on that is not in this array, the base class translation will be returned.
|
||||
*/
|
||||
|
||||
public static String[] getAvailableLocales() {
|
||||
Locale loc[] = null;
|
||||
String list[] = null;
|
||||
Vector locVect = new Vector();
|
||||
// try {
|
||||
try {
|
||||
URL resURL = ClassLoader.getSystemResource("com/ibm/rbm/resources/RBManager.properties");
|
||||
JarURLConnection resConnection = (JarURLConnection)resURL.openConnection();
|
||||
Enumeration enumRes = resConnection.getJarFile().entries();
|
||||
String baseName = "com/ibm/rbm/resources/RBManager";
|
||||
while (enumRes.hasMoreElements()) {
|
||||
String entryName = ((ZipEntry)enumRes.nextElement()).getName();
|
||||
if (entryName.startsWith(baseName)) {
|
||||
entryName = entryName.substring(baseName.length(), entryName.lastIndexOf('.'));
|
||||
if (entryName.startsWith("_")) {
|
||||
entryName = entryName.substring(1);
|
||||
}
|
||||
else if (entryName.length() == 0) {
|
||||
/* For our resources we consider root as English */
|
||||
entryName = "en";
|
||||
}
|
||||
locVect.add(entryName);
|
||||
}
|
||||
}
|
||||
|
||||
/* File locDir = new File("resources");
|
||||
list = locDir.list(new FilenameFilter() {
|
||||
public boolean accept(File dir, String name) {
|
||||
boolean accept = true;
|
||||
if (!name.toLowerCase().endsWith(".properties")) accept = false; // Must be property file
|
||||
if (!name.startsWith("RBManager")) accept = false; // Must be a RBManager file
|
||||
if (name.equals("RBManager.properties")) accept = false; // Base class does not count
|
||||
return accept;
|
||||
}
|
||||
});
|
||||
*/
|
||||
int listSize = locVect.size();
|
||||
list = new String[listSize];
|
||||
for (int i=0; i < listSize; i++) {
|
||||
list[i] = (String)locVect.get(i);
|
||||
}
|
||||
} catch (IOException ioe) {
|
||||
System.err.println("Can't get resources");
|
||||
ioe.printStackTrace(System.err);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Looks up a translation in the currently set Locale by the NLS lookup key provided.
|
||||
* If no resource by that key is found, the key itself is returned.
|
||||
*/
|
||||
|
||||
public static String getTranslation(String key) {
|
||||
if (key == null || resource_bundle == null) return "";
|
||||
try {
|
||||
String retStr = resource_bundle.getString(key);
|
||||
return retStr;
|
||||
} catch (Exception e) {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a locale encoding, returns the language portion of that encoding.
|
||||
*<br>
|
||||
* For instance 'en', 'en_US', 'en_GB', all return 'en'
|
||||
*/
|
||||
|
||||
public static String getLanguage(String encoding) {
|
||||
if (encoding == null) return null;
|
||||
if (encoding.indexOf("_") < 0) return encoding.trim();
|
||||
return encoding.substring(0, encoding.indexOf("_"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a locale encoding, returns the country portion of that encoding.
|
||||
* <br>
|
||||
* For instance 'en_US', 'sp_US', both return 'US'
|
||||
* <br>
|
||||
* Returns null if no country is specified (e.g. 'en' or 'de')
|
||||
*/
|
||||
|
||||
public static String getCountry(String encoding) {
|
||||
if (encoding == null) return null;
|
||||
if (encoding.indexOf("_") < 0) return null;
|
||||
String result = encoding.substring(encoding.indexOf("_")+1, encoding.length());
|
||||
if (result.indexOf("_") < 0) return result.trim();
|
||||
return result.substring(0, encoding.indexOf("_"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a locale encoding, returns the variant portion of that encoding.
|
||||
* <br>
|
||||
* For instance 'en_GB_EURO', 'de_DE_EURO', both return 'EURO'
|
||||
* <br>
|
||||
* Returns null if no variant is specified (e.g. 'en' or 'en_US')
|
||||
*/
|
||||
|
||||
public static String getVariant(String encoding) {
|
||||
RBManagerGUI.debugMsg(encoding);
|
||||
if (encoding == null) return null;
|
||||
if (encoding.indexOf("_") < 0) return null;
|
||||
String result = encoding.substring(encoding.indexOf("_")+1, encoding.length());
|
||||
if (result.indexOf("_") < 0) return null;
|
||||
result = result.substring(result.indexOf("_")+1, result.length());
|
||||
return result.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a translation given the currently set locale, a lookup key, and a single lookup item replacement.
|
||||
* For an understanding of the lookup item replacement see getTranslation(String key, String[] lookup).
|
||||
*/
|
||||
|
||||
public static String getTranslation(String key, String lookup) {
|
||||
if (key == null || resource_bundle == null) return "";
|
||||
try {
|
||||
Object objects[] = {lookup};
|
||||
String retStr = resource_bundle.getString(key);
|
||||
retStr = MessageFormat.format(retStr, objects);
|
||||
return retStr;
|
||||
} catch (Exception e) {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a translation given the currently set locale, a lookup key, and zero or more lookup item replacements.
|
||||
* Lookup items are contextual translation material stored in the resource according to the format dictated in
|
||||
* the java.text package. In short, numbered markers are replaced by strings passed in as parameters.
|
||||
* <p>
|
||||
* For example, suppose you have the following resource:
|
||||
* <p>
|
||||
* myResource = Hello {1}, Isn't this a great {2}?
|
||||
* <p>
|
||||
* You want to replace the '{1}' witht the current user name and the '{2}' with the name of the day today.
|
||||
* You can do this by calling:
|
||||
* <p>
|
||||
* String lookups[] = { "Joe", "Friday" };
|
||||
* <br>
|
||||
* Resources.getTranslation("myResource", lookups);
|
||||
* <p>
|
||||
* The result would be:
|
||||
* <p>
|
||||
* 'Hello Joe, Isn't this a great Friday?'
|
||||
* <p>
|
||||
* This method (as well as the getTranslation(String key, String lookup) method) is useful for using nested
|
||||
* lookups from the resource bundle. For instance, the above line could be replaced with:
|
||||
* <p>
|
||||
* String lookups[] = { getUserName(), Resources.getTranslation("Friday") };
|
||||
*/
|
||||
|
||||
public static String getTranslation(String key, String[] lookup) {
|
||||
if (key == null || resource_bundle == null) return "";
|
||||
try {
|
||||
Object objects[] = new Object[lookup.length];
|
||||
for (int i=0; i < lookup.length; i++) objects[i] = lookup[i];
|
||||
String retStr = resource_bundle.getString(key);
|
||||
retStr = MessageFormat.format(retStr, lookup);
|
||||
return retStr;
|
||||
} catch (Exception e) {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*****************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/ScanResult.java,v $
|
||||
* $Date: 2002/05/20 18:53:08 $
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
package com.ibm.rbm;
|
||||
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* This class represents the results found for each resource key while
|
||||
* performing the code scan done by RBReporter.
|
||||
*
|
||||
* @author Jared Jackson - Email: <a href="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</a>
|
||||
* @see com.ibm.rbm.RBReporter
|
||||
*/
|
||||
public class ScanResult {
|
||||
BundleItem item;
|
||||
Vector occurances;
|
||||
|
||||
ScanResult(BundleItem item) {
|
||||
this.item = item;
|
||||
occurances = new Vector();
|
||||
}
|
||||
|
||||
BundleItem getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
int getNumberOccurances() {
|
||||
return occurances.size();
|
||||
}
|
||||
|
||||
Vector getOccurances() {
|
||||
return occurances;
|
||||
}
|
||||
|
||||
void addOccurance(Occurance o) {
|
||||
occurances.addElement(o);
|
||||
}
|
||||
|
||||
String getName() {
|
||||
return item.getKey();
|
||||
}
|
||||
|
||||
String getGroupName() {
|
||||
if (item.getParentGroup() != null) return item.getParentGroup().getName();
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
@echo off
|
||||
|
||||
rem *****************************************************************************
|
||||
rem * Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
rem * others. All Rights Reserved. *
|
||||
rem *****************************************************************************
|
||||
|
||||
cd ..\..\..\
|
||||
echo compiling source code %1
|
||||
javac -d . -classpath com/ibm/rbm/lib/xerces.jar -deprecation %1 com/ibm/rbm/*.java
|
||||
if errorlevel 1 goto error
|
||||
|
||||
echo creating jar file
|
||||
erase com\ibm\rbm\RBManager.jar
|
||||
jar cfm com/ibm/rbm/RBManager.jar com/ibm/rbm/manifest.stub com/ibm/rbm/*.class com/ibm/rbm/images/*.gif com/ibm/rbm/resources/RBManager*.properties
|
||||
if errorlevel 1 goto error
|
||||
|
||||
echo cleaning up class files
|
||||
cd com\ibm\rbm
|
||||
erase *.class
|
||||
goto end
|
||||
|
||||
:error
|
||||
cd com\ibm\rbm
|
||||
pause
|
||||
:end
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
@rem *****************************************************************************
|
||||
@rem * Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
@rem * others. All Rights Reserved. *
|
||||
@rem *****************************************************************************
|
||||
mkdir docs\api
|
||||
@set DOC_TYPE=-private
|
||||
javadoc -d docs/api -classpath lib/xerces.jar -sourcepath ../../../ -windowTitle "RBManager" -bottom "Copyright IBM 2000-2002" %DOC_TYPE% com.ibm.rbm
|
||||
@if errorlevel 1 pause
|
||||
@@ -0,0 +1,230 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>Resource Bundle Reporter</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="images/template_ul.gif" HEIGHT="75"><IMG SRC="images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="index.html">Home</A></LI>
|
||||
<LI><A HREF="Tutorial/index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="Views/index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="Tutorial/step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H1 ALIGN="CENTER">Resource Bundle Reporter</H1>
|
||||
<H1 ALIGN="CENTER"><IMG SRC="images/screenshots/RBReporter.gif" WIDTH="600" HEIGHT="600"></H1>
|
||||
<H4 ALIGN="LEFT">What is RBReporter?</H4>
|
||||
<P ALIGN="LEFT">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.</P>
|
||||
<H4 ALIGN="LEFT">How is RBReporter started?</H4>
|
||||
<P ALIGN="LEFT">From the command line, RBReporter is run by typing in the
|
||||
following command:</P>
|
||||
<P ALIGN="LEFT"><CODE>java com.ibm.rbm.RBReporter</CODE></P>
|
||||
<P ALIGN="LEFT">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:</P>
|
||||
<P ALIGN="LEFT"><CODE>java com.ibm.rbm.RBReporter -gui</CODE></P>
|
||||
<P ALIGN="LEFT">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.</P>
|
||||
<P ALIGN="LEFT">Another option is to run the reporter with the following
|
||||
argument:</P>
|
||||
<P ALIGN="LEFT"><CODE>java com.ibm.rbm.RBReporter -now</CODE></P>
|
||||
<P ALIGN="LEFT">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.</P>
|
||||
<P ALIGN="LEFT">The last option is the following:</P>
|
||||
<P ALIGN="LEFT"><code>java com.ibm.rbm.RBReporter -line</CODE></P>
|
||||
<P ALIGN="LEFT">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.</P>
|
||||
<H4 ALIGN="LEFT">What do the settings mean?</H4>
|
||||
<P ALIGN="LEFT">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.</P>
|
||||
<P ALIGN="LEFT">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.</P>
|
||||
<P ALIGN="LEFT">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.</P>
|
||||
<P ALIGN="LEFT">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.</P>
|
||||
<P ALIGN="LEFT">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.</P>
|
||||
<P ALIGN="LEFT">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.</P>
|
||||
<H4 ALIGN="LEFT">What is the code scan?</H4>
|
||||
<P ALIGN="LEFT">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.</P>
|
||||
<P ALIGN="LEFT">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.</P>
|
||||
<P ALIGN="LEFT">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 <A HREF="scanfile.html">detailed information on setting up a
|
||||
scan XML file</A> can be found by following the link.</P>
|
||||
<P ALIGN="LEFT"> </P>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,187 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>Template</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="images/template_ul.gif" HEIGHT="75"><IMG SRC="images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="index.html">Home</A></LI>
|
||||
<LI><A HREF="Tutorial/index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="Views/index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="Tutorial/step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H3 ALIGN="CENTER">Frequently Asked Questions</H3>
|
||||
<P><B> What is the advantage of using RB Manager when I can edit resource
|
||||
bundle property files in a simple text editor?</B></P>
|
||||
<P>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.</P>
|
||||
<P>RBManager offers the following features to correct these problems:</P>
|
||||
<P>
|
||||
<UL>
|
||||
|
||||
<LI> RB Manager can edit multiple language files when appropriate</LI>
|
||||
<LI>Entries are checked for proper format and assured not to be duplicates</LI>
|
||||
|
||||
<LI>RB Manager provides a better grouping of resources, so that individual
|
||||
translations are easy to find</LI>
|
||||
<LI>Each language file will display in its own view a list of only resources
|
||||
that are untranslated</LI>
|
||||
|
||||
<LI>RB Manager keeps track of statistics such as number of resources,
|
||||
untranslated items, etc.</LI>
|
||||
|
||||
<LI>RB Manager allows importing and exporting of translation data into
|
||||
multiple formats</LI>
|
||||
<LI>Use of the application cuts down on development, translation, and
|
||||
debugging time in any internationalized setting</LI>
|
||||
</UL>
|
||||
|
||||
<P><B>Will RB Manager work on my computer?</B></P>
|
||||
|
||||
<P>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 <A HREF="Tutorial/step1.html">Step 1</A> of the tutorial.</P>
|
||||
|
||||
<P><B>Why doesn't RB Manager run in language X?</B></P>
|
||||
<P></P>
|
||||
<P>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 <A HREF="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</A>.
|
||||
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.</P>
|
||||
<P><B>I found a bug. Where do I report it?</B></P>
|
||||
<P>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 <A HREF="mailto:jjared@almaden.ibm.com">jjared@almaden.ibm.com</A>.
|
||||
I hope soon to create a page where known bugs are listed.</P>
|
||||
<P><B>What can I expect from future versions of RB Manager?</B></P>
|
||||
<P><A HREF="future_features.html">Answer</A></P>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,181 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RB Manager - Features and Version History</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="images/template_ul.gif" HEIGHT="75"><IMG SRC="images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="index.html">Home</A></LI>
|
||||
<LI><A HREF="Tutorial/index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="Views/index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="Tutorial/step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H3 ALIGN="CENTER">Future Features and Version History</H3>
|
||||
<P>Some of the features all ready in the works for future versions of RB
|
||||
Manager:</P>
|
||||
<UL>
|
||||
<LI>The ability to lookup suggested translations using imported dictionaries</LI>
|
||||
<LI>Multiple selections across resource tables</LI>
|
||||
<LI>Editing subtrees within the resource bundle tree</LI>
|
||||
<LI>The ability to print various views of resources</LI>
|
||||
<LI>A character table for selecting characters not common to keyboards</LI>
|
||||
<LI>...and of course all of the bug fixes</LI>
|
||||
</UL>
|
||||
<P>Features added in the latest version (0.6) of RB Manager:</P>
|
||||
<P>
|
||||
|
||||
<UL>
|
||||
<LI>The program window now has an icon</LI>
|
||||
<LI>Integrate the images and resources into the jar files</LI>
|
||||
<LI>Source code made publicly available</LI>
|
||||
<LI>Allow exporting of ICU4C resource bundles</LI>
|
||||
<LI>... and some bug fixes</LI>
|
||||
</UL>
|
||||
<P></P>
|
||||
<P>Features added in version 0.4a of RB Manager:</P>
|
||||
<P>
|
||||
<UL>
|
||||
<LI>Recently accessed resource bundles appear in the File menu for easy
|
||||
opening</LI>
|
||||
<LI>New icons for the tree view</LI>
|
||||
<LI>Ability to save, hide, or delete specific resource files without affecting
|
||||
the resource bundle as a whole</LI>
|
||||
<LI>Exporting to Java class files allows for specification of the package
|
||||
name as well as the ability to specify public or protected objects</LI>
|
||||
<LI>Translations can now easily accomidate multiple line text</LI>
|
||||
<LI>RB Manager is no longer restriced to resource bundles that end in
|
||||
'.properties' in lower-case</LI>
|
||||
<LI>... and some bug fixes</LI>
|
||||
</UL>
|
||||
<P></P>
|
||||
<P>Features added in version 0.3a of RB Manager:</P>
|
||||
<UL>
|
||||
<LI>The ability to merge property files and other resource bundles with
|
||||
the open resource bundle</LI>
|
||||
<LI>Exporting Java compilable files (ListResourceBundle extension files)</LI>
|
||||
<LI>Import and export support for TMX formatted XML translation files</LI>
|
||||
<LI>The ability to search resource bundles and language files for particular
|
||||
translations</LI>
|
||||
<LI>Keyboard shortcuts for the most common functions</LI>
|
||||
<LI>A file scanning extension to the reporting tool</LI>
|
||||
<LI>... and some bug fixes</LI>
|
||||
</UL>
|
||||
<P>Have another idea? Send any thoughts or comments to author <A HREF="mailto:jjared@almaden.ibm.com">Jared
|
||||
Jackson</A>.</P>
|
||||
<P></P>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:214d6c25c4a222feeb5ecd1d7e701c6bf1801f1549b87500f06dbb50652e59a7
|
||||
size 1674
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2854f358648dcc2ea21b4a3c9ca65a82762b3d02b18b5334e44ee9a88c2ba490
|
||||
size 70
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2b29b7501c7b062d87436384916182a5754ccb3c33faf92df52f96fcd79ad292
|
||||
size 94
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:936b84d7c37c4dfe4c2007a1b36a7c4b9e7f99a76a992d6fe52a8478268e838d
|
||||
size 138
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2c533ec4859833b6545c3ece7b04f205c706a559d1b9cc13b2358e8a6c1f7fbb
|
||||
size 13984
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5000446f0de3cd6bb58068f0a1812143c61bfaf8f12377d85944f1955ff43802
|
||||
size 9741
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8a0677bcacd381e409812ec083761a35bf01aaa46fbe754eff0ce11a08e79d93
|
||||
size 15042
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5d9b02fd17e78781ab0087841e57db5f4f01829ac2d0e4705be77ce0f9e07773
|
||||
size 6266
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:69ede7a8d3d5611bff67b816769970b00bbb26375dd7bcb5dc12bff6e635bab9
|
||||
size 7875
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e9c95945a8aefb6cc0b3ab40c47e3db9bcc477253deebf8c1d9068a51db9012b
|
||||
size 13182
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:96b7bdcd935da20b4e8dcc2f7a3c0b794db3ab6ebb9671f7a124b906b8c5bd9e
|
||||
size 3907
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7f79bafcbd83c0b48d05ea1e92e38771380c7f0237e3d19a1455b679e1b1cceb
|
||||
size 14569
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b126edb2f68d349be71a318faa857aea46733e2b1f06977c3872a6b8923e265f
|
||||
size 5103
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4be9cc01af6622b32b8990b03028f35eb2bf35a38f81765e22017b275bb8932d
|
||||
size 9993
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cef4419a481aab80b6c2b4ebd3d825f41ff9a3e1d3ad316b23d38d6b7306bd25
|
||||
size 9907
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:75b62dfce347952ab181a058068a0770386adde7b9e369d814c6530c16dd72ff
|
||||
size 44433
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e532590fc6a29094385c22aa83505a3d1581e9c5639abe85d4e81e2a2af47443
|
||||
size 53322
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ea4d85e2055d8f5b80f357914594be1363b0da81ccd0d58f4e2cb44ddb4020c3
|
||||
size 46077
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a971a496893fcd47316854c794eba841947be399b734dbc41a49b7c4e4766cfe
|
||||
size 6445
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8c79589e7a5b2777c955bff00153acb12c0578fa6544ec8d5d29c6630de7a9f1
|
||||
size 19085
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9869d4b7d5abee4f08c41d47040decc5ad7b5a12a5956e69d449285f09e22423
|
||||
size 2741
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8bf3015ac1aee031a7277a5692e54ff75db4da80aed1fddf4f08fb820310f0d4
|
||||
size 3985
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:60e0f095ce0cebcd7b9ab4f02885651e44919d8d017645f711c7656288d80478
|
||||
size 4086
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5066031f1468a4a67f9476a9b2be896746e9408bbc55b4c12c0f8a4bf960abea
|
||||
size 974
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:279d55a2ae2c6a39ad5f95e5f3637b9df58b3ae0bc61355a88f408aa65cf1496
|
||||
size 1363
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b5d5baed9ac56fb489419f134d01cfe08ddd268a8b5e8e972af952cbae0a2f8d
|
||||
size 24413
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:90d5d1fae8caed6906f140afb496101c93020041837b77098ffc61b1d32ffb36
|
||||
size 13419
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6cdad7205629826ee50d35c564591ea01c1e222cd347f7f1750d64feee8c660d
|
||||
size 11696
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2320a515f0723fbada80edf20c43c2fde785d2a851e7f0caf134e943d8618ff2
|
||||
size 7187
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3042bba691113cb0dd6022dc841d6dc5d6f38d2e1a9e92b37cb631261f60d4f4
|
||||
size 18087
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dc6cba42c8941716e5223e8976d6af48ff71d7a10bd6299b5c90f3e9310e86ac
|
||||
size 19343
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0fc768d02640e331352cd5e47a270f7302990dde6d633e49d4fc545cd96e2d3b
|
||||
size 21681
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c59bbe195eae957f07c31d334ad8006a1ebb1c24d7333963797558541777dd64
|
||||
size 17090
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:80e3851066ce3cad5dca32e2246531cfc30a40a98c8513208354322c5208f96d
|
||||
size 16525
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6560c25dcba6797709156efbeb477326c4b6d7656af6787f5806ad7e721eaedc
|
||||
size 16313
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0a87d31236ae9552427e6f6ca2b62f31d082ec2e337363dcd94030a735280135
|
||||
size 19558
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4a236e065a890fab49e0cdadde7c5b0ff0a4e3c385662fe0fb57523daa752027
|
||||
size 7367
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:15d339561a2293c014051540b208c4463b40b1be3221ca5a09922f6df97a973c
|
||||
size 24230
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3b4c63ce5e8bb367cc4863072d9d01cdbfe11b6578fa2f61f120f6665aba50d3
|
||||
size 870
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3cdf8c3821377b329065b7e3b323f1d8a46e9f47793d22b6f8b1634e32cf5f43
|
||||
size 128
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cc3c724b1d540bbeaefc2849f5b5553948c281ce9f87e33c1ef800957d7ceeb9
|
||||
size 87
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:88811dcefd14320da9eafcb0091d2b114203d0036d57ad973e61e484aa6e661e
|
||||
size 748
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5db7769208ffcb95631d9727e6fc93d82073eee5e7c26da78949ecc2a37a3ab8
|
||||
size 93
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0089ba9d41f0d6234d623aef965fab44c190097c94c9472fcdc99abdd5124bdf
|
||||
size 1069
|
||||
@@ -0,0 +1,145 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>Resource Bundle Manager</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="images/template_ul.gif" HEIGHT="75"><IMG SRC="images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="index.html">Home</A></LI>
|
||||
<LI><A HREF="Tutorial/index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="Views/index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="Tutorial/step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<DIV ALIGN="CENTER">
|
||||
<H2>Welcome to Resource Bundle Manager (v0.6)</H2>
|
||||
<P ALIGN="CENTER"><IMG SRC="images/screenshots/main_page.gif"></P>
|
||||
<P ALIGN="CENTER">These pages are meant to help you and your development
|
||||
team get started with this translation management tool.</P>
|
||||
<P ALIGN="CENTER">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 <A HREF="Tutorial/index.html">step-by-step
|
||||
tutorial</A>, <A HREF="Views/index.html">functions and views</A>, or
|
||||
<A HREF="faq.html">frequently asked questions</A>. If you are new to
|
||||
internationalization in development, you may want to first check out
|
||||
this<A HREF="http://www-106.ibm.com/developerworks/library/j-rbmgr/index.html">
|
||||
introduction to internationalization</A>.</P>
|
||||
<P ALIGN="CENTER">If you have any comments or would like to report a bug,
|
||||
feel free to <A HREF="mailto:jjared@almaden.ibm.com">contact the author</A>.</P>
|
||||
</DIV>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,144 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RBManager - Look and Feel</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="images/template_ul.gif" HEIGHT="75"><IMG SRC="images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="index.html">Home</A></LI>
|
||||
<LI><A HREF="Tutorial/index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="Views/index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="Tutorial/step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H3 ALIGN="CENTER">Look and Feel</H3>
|
||||
<P>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.</P>
|
||||
<P>This page shows some examples of how the system looks under four common
|
||||
look and feels: <A HREF="#Windows">Windows</A>, <A HREF="#Metal">Metal</A>,
|
||||
<A HREF="#Mac">Mac OSX (aqua)</A>, and <A HREF="#Motif">Motif</A>.</P>
|
||||
<P><B><a name="Windows">Windows</A></B></P>
|
||||
<P><IMG SRC="images/screenshots/laf_windows.gif" WIDTH="600" HEIGHT="444"></P>
|
||||
<P><B><a name="Metal">Metal</A></B></P>
|
||||
<P><IMG SRC="images/screenshots/laf_metal.gif" WIDTH="600" HEIGHT="444"></P>
|
||||
<P><B><a name="Mac">Mac OSX (aqua)</A></B></P>
|
||||
<P> </P>
|
||||
<P><B><a name="Motif">Motif</A></B></P>
|
||||
<P><IMG SRC="images/screenshots/laf_motif.gif" WIDTH="600" HEIGHT="444"></P>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,282 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RB Manager - Menu Items</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="images/template_ul.gif" HEIGHT="75"><IMG SRC="images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="index.html">Home</A></LI>
|
||||
<LI><A HREF="Tutorial/index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="Views/index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="Tutorial/step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H2 ALIGN="CENTER">RB Manager - Menu Items</H2>
|
||||
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR VALIGN="TOP">
|
||||
<TD COLSPAN="2">
|
||||
<P><B>The File Menu</B></P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD COLSPAN="2"><IMG SRC="images/screenshots/menu_file.gif" WIDTH="258" HEIGHT="219" VSPACE="5" HSPACE="5"></TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I>New Resource Bundle...</I></TD>
|
||||
<TD>Create a new resource bundle. You will need to select the base class
|
||||
name for this bundle.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I>Open Resource Bundle...</I></TD>
|
||||
<TD>Select a resource bundle from the file sysetem. The bundle should
|
||||
have been one created by RB Manager, otherwise use the Merge option.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I>Save Resource Bundle</I></TD>
|
||||
<TD>Save the bundle to the file system.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I>Save Resource Bundle As...</I></TD>
|
||||
<TD>Save the resource bundle in a selected location within the file
|
||||
system.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD COLSPAN="2"><IMG SRC="images/screenshots/menu_file_import.gif" WIDTH="454" HEIGHT="219" VSPACE="5" HSPACE="5"></TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I><B>Merge To Resource Bundle</B></I></TD>
|
||||
<TD>Import resource bundles from different formats and merge them with
|
||||
the currently open resource bundle.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I><IMG SRC="images/arrow_bullet.gif" WIDTH="12" HEIGHT="10">Simple
|
||||
Resource Bundles...</I></TD>
|
||||
<TD>Import from other resource bundles made up of .properties text files
|
||||
created by RB Manager or not.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I><IMG SRC="images/arrow_bullet.gif" WIDTH="12" HEIGHT="10">TMX
|
||||
Documents...</I></TD>
|
||||
<TD>Import from XML documents that conform to the TMX specification
|
||||
created by the LISA group.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD COLSPAN="2"><IMG SRC="images/screenshots/menu_file_export.gif" WIDTH="439" HEIGHT="219" VSPACE="5" HSPACE="5"></TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I><B>Export Resource Bundles</B></I></TD>
|
||||
<TD>Save the translations in other formats.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I><IMG SRC="images/arrow_bullet.gif" WIDTH="12" HEIGHT="10">Compilable
|
||||
Java Files...</I></TD>
|
||||
<TD>Export to compilable java class files that extend the ListResourceBundle
|
||||
class. </TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I><IMG SRC="images/arrow_bullet.gif" WIDTH="12" HEIGHT="10">Minimal
|
||||
Properties Files...</I></TD>
|
||||
<TD>Export to .properties text files just as in the Save option, except
|
||||
that these files will be stripped of all unnecessary meta data.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I><IMG SRC="images/arrow_bullet.gif" WIDTH="12" HEIGHT="10">TMX
|
||||
Documents...</I></TD>
|
||||
<TD>Export to XML documents that conform to the TMX specification created
|
||||
by the LISA group.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD COLSPAN="2"><IMG SRC="images/spacer.gif" WIDTH="15" HEIGHT="15"></TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD COLSPAN="2"><B>The Options Menu</B></TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD COLSPAN="2"><IMG SRC="images/screenshots/menu_options.gif" WIDTH="211" HEIGHT="111" VSPACE="5" HSPACE="5"></TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I>Add New Entry...</I></TD>
|
||||
<TD>Create a new resource for the entire resource bundle.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I>Add New Group...</I></TD>
|
||||
<TD>Create a new resource group for the entire resource bundle.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I>Add New Resource File...</I></TD>
|
||||
<TD>Create a new resource file for the resource bundle. Optionally select
|
||||
whether or not to populate this file with currently defined resources.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I>Preferences...</I></TD>
|
||||
<TD>Bring up the preferences dialog box.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD COLSPAN="2"><IMG SRC="images/spacer.gif" WIDTH="15" HEIGHT="15"></TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD COLSPAN="2"><B>The Help Menu</B></TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD COLSPAN="2"><IMG SRC="images/screenshots/menu_help.gif" WIDTH="353" HEIGHT="46" VSPACE="5" HSPACE="5"></TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I>About Resource Bundle Manager...</I></TD>
|
||||
<TD>Brings up a dialog box displaying the version of RB Manager and
|
||||
other information.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD COLSPAN="2"><IMG SRC="images/spacer.gif" WIDTH="15" HEIGHT="15"></TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD COLSPAN="2"><B>The Resource File Popup Menu</B></TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD COLSPAN="2"><IMG SRC="images/screenshots/menu_popup_tree.gif" WIDTH="671" HEIGHT="543" VSPACE="5" HSPACE="5"></TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I><B>Resource File Popup Menu</B></I></TD>
|
||||
<TD>Pops up from an individual resource file.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I>Save Resource File</I></TD>
|
||||
<TD>Save only the selected resource file to the file system.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I>Hide Resource File</I></TD>
|
||||
<TD>Remove the selected resource file from the resource bundle tree.
|
||||
All future changes to the bundle will not affect this file. This will
|
||||
also remove any changes made to the file since last saving it.</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD><I>Delete Resource File</I></TD>
|
||||
<TD>If the operating system allows, deletes the resource file from the
|
||||
file system. This is a permanent change and can not be undone.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P> </P>
|
||||
<P> </P>
|
||||
<P> </P>
|
||||
<P> </P>
|
||||
<P> </P>
|
||||
<P> </P>
|
||||
<P> </P>
|
||||
<P> </P>
|
||||
<P> </P>
|
||||
<P> </P>
|
||||
<P> </P>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,220 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RBReporter Scan File</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="images/template_ul.gif" HEIGHT="75"><IMG SRC="images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="index.html">Home</A></LI>
|
||||
<LI><A HREF="Tutorial/index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="Views/index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="Tutorial/step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H1 ALIGN="CENTER">RBReporter Scan XML Configuration File</H1>
|
||||
<P><B>Introduction</B></P>
|
||||
<P>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.</P>
|
||||
<P><B>Sample Scan File </B>(rbmanager_scan.xml<B>)</B></P>
|
||||
<BLOCKQUOTE><CODE>
|
||||
<PRE>
|
||||
<?xml version="1.0" ?>
|
||||
<RBFILESCANNER NAME="RBManager Scanner" FILENAME="rbmanager_scanner.xml">
|
||||
<FILERULES>
|
||||
<!-- FileRules can have attributes starts_with, ends_with, and contains -->
|
||||
<FILERULE NAME="Java File" ENDS_WITH=".java" />
|
||||
<FILERULE NAME="XSL File" ENDS_WITH=".xsl" />
|
||||
</FILERULES>
|
||||
<PARSERULES>
|
||||
<!-- ParseRules can have attributes follows and precedes -->
|
||||
<PARSERULE NAME="Java static resource" FOLLOWS="Resources.getTranslation(&quot;" PRECEDES="&quot;" />
|
||||
</PARSERULES>
|
||||
<SCAN>
|
||||
<DIRECTORY LOCATION="\C:\Development\RBManager\Source" RECURSE_DIRECTORIES="true">
|
||||
<RULES>
|
||||
<APPLYFILERULE NAME="Java File">
|
||||
<APPLYPARSERULE NAME="Java static resource" />
|
||||
</APPLYFILERULE>
|
||||
</RULES>
|
||||
</DIRECTORY>
|
||||
</SCAN>
|
||||
</RBFILESCANNER>
|
||||
</PRE>
|
||||
</CODE></BLOCKQUOTE>
|
||||
<P><B>Details</B></P>
|
||||
<P>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'. </P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P><B>The Example File Explained</B></P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<blockquote><code>
|
||||
<pre>
|
||||
public class Sample {
|
||||
public static void main(String args[]) {
|
||||
System.out.println(Resources.getTranslation("Hello") + " " + Resources.getTranslation("World"));
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</code></blockquote>
|
||||
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,134 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>Template</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="images/template_ul.gif" HEIGHT="75"><IMG SRC="images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="index.html">Home</A></LI>
|
||||
<LI><A HREF="Tutorial/index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="Views/index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="Tutorial/step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H3 ALIGN="CENTER">System Requirements</H3>
|
||||
<P>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.</P>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,160 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RB Manager Tutorial</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(../images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="../images/template_ul.gif" HEIGHT="75"><IMG SRC="../images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="../images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="../images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="../images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="../faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="../future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../index.html">Home</A></LI>
|
||||
<LI><A HREF="index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="../Views/index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="../lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="../menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="../scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<DIV ALIGN="CENTER">
|
||||
<H2>Step-by-step Tutorial</H2>
|
||||
<P ALIGN="CENTER">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.</P>
|
||||
<H3 ALIGN="LEFT">
|
||||
<UL>
|
||||
<LI>
|
||||
<H4>Step 1. <A HREF="step1.html">Setting Your Personal Prefences</A></H4>
|
||||
</LI>
|
||||
<LI>
|
||||
<H4>Step 2. <A HREF="step2.html">Creating a New Resource Bundle</A></H4>
|
||||
</LI>
|
||||
<LI>
|
||||
<H4>Step 3. <A HREF="step3.html">Creating Groups within the Bundle</A></H4>
|
||||
</LI>
|
||||
<LI>
|
||||
<H4>Step 4. <A HREF="step4.html">Populating the Bundle with Resources</A></H4>
|
||||
</LI>
|
||||
<LI>
|
||||
<H4>Step 5. <A HREF="step5.html">Adding Resource Files for New Languages</A></H4>
|
||||
</LI>
|
||||
<LI>
|
||||
<H4>Step 6. <A HREF="step6.html">Saving the Results</A> </H4>
|
||||
</LI>
|
||||
</UL>
|
||||
</H3>
|
||||
<H4><A HREF="step1.html">Go to Step 1</A></H4>
|
||||
</DIV>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="../images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,193 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RB Manager Tutorial - Preferences</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(../images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="../images/template_ul.gif" HEIGHT="75"><IMG SRC="../images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="../images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="../images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="../images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="../faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="../future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../index.html">Home</A></LI>
|
||||
<LI><A HREF="index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="../Views/index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="../lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="../menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="../scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H3 ALIGN="CENTER">Setting Your Personal Preferences</H3>
|
||||
<P><B>Getting Started</B></P>
|
||||
<P>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 <A HREF="http://java.sun.com">Sun's
|
||||
internet site</A>. 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.</P>
|
||||
<P>To run the program from the command line, first go to the RBManager directory
|
||||
on your system, then enter:</P>
|
||||
<P><CODE>java -classpath ./lib/RBManager.jar;./lib/xerces.jar com.ibm.rbm.RBManager</CODE></P>
|
||||
<P>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.</P>
|
||||
<P><B>The Display</B></P>
|
||||
<P>Once you get the application running, you will hopefully see something
|
||||
like this:</P>
|
||||
<P><IMG SRC="../images/screenshots/empty_screen.gif"></P>
|
||||
<P>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.</P>
|
||||
<P><B>Customizing the Application for You</B></P>
|
||||
<P>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:</P>
|
||||
<P><IMG SRC="../images/screenshots/preferences_dialog.gif" WIDTH="429" HEIGHT="269"></P>
|
||||
<P>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).</P>
|
||||
<P>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. </P>
|
||||
<P>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.</P>
|
||||
<P><A HREF="index.html">Back to the Tutorial Menu</A> -or- <A HREF="step2.html">Forward
|
||||
to Step 2</A></P>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="../images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,173 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RB Manager Tutorial - Creating Resources</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(../images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="../images/template_ul.gif" HEIGHT="75"><IMG SRC="../images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="../images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="../images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="../images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="../faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="../future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../index.html">Home</A></LI>
|
||||
<LI><A HREF="index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="../Views/index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="../lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="../menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="../scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H3 ALIGN="CENTER">Step 2. Creating a New Resource Bundle</H3>
|
||||
<P><B>Things to Consider</B></P>
|
||||
<P>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: <code>RBManager.properties</CODE>, <code>RBManager_de.properties</CODE>,
|
||||
<code>RBManger_fi.properties</CODE>, etc. In future versions of the program,
|
||||
RB Manager will be extended to support importing and exporting data from
|
||||
other language translations schemas such as the XML internationalization
|
||||
standard, TMX.</P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P><B>Creating the Resource Bundle</B></P>
|
||||
<P>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:</P>
|
||||
<P><IMG SRC="../images/screenshots/new_bundle.gif" WIDTH="552" HEIGHT="385"></P>
|
||||
<P>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:</P>
|
||||
<P><IMG SRC="../images/screenshots/new_baseclass.gif" WIDTH="676" HEIGHT="511"></P>
|
||||
<P>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.</P>
|
||||
<P><A HREF="step1.html">Back to Step 1</A> -or- <A HREF="step3.html">Forward
|
||||
to Step 3</A></P>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="../images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,160 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RB Manager Tutorial - Creating Groups</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(../images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="../images/template_ul.gif" HEIGHT="75"><IMG SRC="../images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="../images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="../images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="../images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="../faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="../future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../index.html">Home</A></LI>
|
||||
<LI><A HREF="index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="../Views/index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="../lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="../menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="../scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<DIV ALIGN="CENTER">
|
||||
<H3>Creating Groups within the Bundle</H3>
|
||||
<P ALIGN="LEFT"><B>What is a Group?</B></P>
|
||||
<P ALIGN="LEFT">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.</P>
|
||||
<P ALIGN="LEFT">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.</P>
|
||||
<P ALIGN="LEFT"><B>Creating a Group</B></P>
|
||||
<P ALIGN="LEFT">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.</P>
|
||||
<P ALIGN="LEFT">Once you have followed one of these two methods, the following
|
||||
dialog should appear:</P>
|
||||
<P ALIGN="LEFT"><IMG SRC="../images/screenshots/create_group.gif" WIDTH="408" HEIGHT="109"></P>
|
||||
<P ALIGN="LEFT">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.</P>
|
||||
<P ALIGN="LEFT"><A HREF="step2.html">Back to Step 2</A> -or- <A HREF="step4.html">Forward
|
||||
to Step 4</A></P>
|
||||
</DIV>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="../images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,193 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RB Manager Tutorial - Populating the Bundle</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(../images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="../images/template_ul.gif" HEIGHT="75"><IMG SRC="../images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="../images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="../images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="../images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="../faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="../future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../index.html">Home</A></LI>
|
||||
<LI><A HREF="index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="../Views/index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="../lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="../menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="../scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H3 ALIGN="CENTER">Step 4. Populating the Bundle with Resources</H3>
|
||||
<P><B>Working within a Group</B></P>
|
||||
<P>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:</P>
|
||||
<P><IMG SRC="../images/screenshots/empty_group.gif" WIDTH="750" HEIGHT="432"></P>
|
||||
<P>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.</P>
|
||||
<P><B>Filling in Resource Information</B></P>
|
||||
<P>Once you follow one of the above two steps, you should see a dialog similar
|
||||
to the following:</P>
|
||||
<P><IMG SRC="../images/screenshots/empty_resource.gif"></P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P>A sample resource creation is show as follows:</P>
|
||||
<P><IMG SRC="../images/screenshots/basic_resource.gif"></P>
|
||||
<P><B>Using 'Look-ups'</B></P>
|
||||
<P>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:</P>
|
||||
<P><IMG SRC="../images/screenshots/lookup_resource.gif"></P>
|
||||
<P>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.</P>
|
||||
<P><B>Editing the Resources</B></P>
|
||||
<P>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:</P>
|
||||
<P><IMG SRC="../images/screenshots/basic_group.gif" WIDTH="750" HEIGHT="432"></P>
|
||||
<P>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.</P>
|
||||
<P><A HREF="step3.html">Back to Step 3</A> -or- <A HREF="step5.html">Forward
|
||||
to Step 5</A></P>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="../images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,183 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RB Manager Tutorial - Creating Resource Files</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(../images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="../images/template_ul.gif" HEIGHT="75"><IMG SRC="../images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="../images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="../images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="../images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="../faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="../future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../index.html">Home</A></LI>
|
||||
<LI><A HREF="index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="../Views/index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="../lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="../menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="../scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H3 ALIGN="CENTER">Step 5. Adding Resource Files for New Languages</H3>
|
||||
<P><B>Creating a New Language File</B></P>
|
||||
<P>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:</P>
|
||||
<P><IMG SRC="../images/screenshots/basic_file.gif" WIDTH="620" HEIGHT="421"></P>
|
||||
<P>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 <CODE>baseclass_language_encoding_variant.properties</CODE>.
|
||||
In the above example, the file would be named<CODE> RBTutorial_de.properties</CODE>.
|
||||
Note that it is important to define fallback files for each language (i.e.
|
||||
if you have a file for <CODE>RBTutorial_de_DE.properties</CODE>, you should
|
||||
also have a file for <CODE>RBTutorial_de.properties</CODE>).</P>
|
||||
<P>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.</P>
|
||||
<P><B>Working with the New Language File</B><BR>
|
||||
</P>
|
||||
<P>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:</P>
|
||||
<P><IMG SRC="../images/screenshots/basic_untranslated.gif" WIDTH="750" HEIGHT="416">
|
||||
</P>
|
||||
<P>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:</P>
|
||||
<P><IMG SRC="../images/screenshots/basic_translation.gif" WIDTH="513" HEIGHT="269"></P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P><A HREF="step4.html">Back to Step 4</A> -or- <A HREF="step6.html">Forward
|
||||
to Step 6</A></P>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="../images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,156 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RB Manager Tutorial - Saving</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(../images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="../images/template_ul.gif" HEIGHT="75"><IMG SRC="../images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="../images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="../images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="../images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="../faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="../future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../index.html">Home</A></LI>
|
||||
<LI><A HREF="index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="../Views/index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="../lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="../menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="../scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H2 ALIGN="CENTER">Step 6. Saving the Results</H2>
|
||||
<P><B>Always Save Periodically</B></P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P><B>Good Luck</B></P>
|
||||
<P>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.</P>
|
||||
<P><A HREF="step5.html">Back to Step 5</A></P>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="../images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,156 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RB Manager - Functionality and Views</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(../images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="../images/template_ul.gif" HEIGHT="75"><IMG SRC="../images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="../images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="../images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="../images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="../faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="../future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../index.html">Home</A></LI>
|
||||
<LI><A HREF="../Tutorial/index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="../lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="../menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../Tutorial/step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="../scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<DIV ALIGN="CENTER">
|
||||
<H2>Functionality and Views</H2>
|
||||
<P ALIGN="CENTER">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.</P>
|
||||
<H3 ALIGN="LEFT">
|
||||
<UL>
|
||||
<LI>
|
||||
<H4>View 1. <A HREF="view1.html">The Resource Bundle Tree</A></H4>
|
||||
</LI>
|
||||
<LI>
|
||||
<H4>View 2. <A HREF="view2.html">The Statistics Tab</A></H4>
|
||||
</LI>
|
||||
<LI>
|
||||
<H4>View 3. <A HREF="view3.html">The Untranslated Tab</A></H4>
|
||||
</LI>
|
||||
<LI>
|
||||
<H4>View 4. <A HREF="view4.html">The Groups Tab</A></H4>
|
||||
</LI>
|
||||
<LI>
|
||||
<H4>View 5. <A HREF="view5.html">The Search Tab</A></H4>
|
||||
</LI>
|
||||
</UL>
|
||||
</H3>
|
||||
<H4><A HREF="step1.html">Go to View 1</A></H4>
|
||||
</DIV>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="../images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,175 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RB Manager - The Resource Bundle Tree</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(../images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="../images/template_ul.gif" HEIGHT="75"><IMG SRC="../images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="../images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="../images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="../images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="../faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="../future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../index.html">Home</A></LI>
|
||||
<LI><A HREF="../Tutorial/index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="../lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="../menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../Tutorial/step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="../scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H3 ALIGN="CENTER">View 1. The Resource Bundle Tree</H3>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P><IMG SRC="../images/screenshots/view_tree_basic.gif" WIDTH="642" HEIGHT="499"></P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P ALIGN="CENTER"><A HREF="view2.html">View 2. The Statistics Tab</A></P>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="../images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,186 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RB Manager - The Statistics Tab</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(../images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="../images/template_ul.gif" HEIGHT="75"><IMG SRC="../images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="../images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="../images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="../images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="../faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="../future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../index.html">Home</A></LI>
|
||||
<LI><A HREF="../Tutorial/index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="../lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="../menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../Tutorial/step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="../scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H3 ALIGN="CENTER">View 2. The Statistics Tab</H3>
|
||||
<P>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 <A HREF="view1.html">View 1</A>.</P>
|
||||
<P><B>Working with a Resource Bundle</B></P>
|
||||
<P>The screen shot below shows RB Manager and some statistics concerning
|
||||
the resource bundle associated with the application.</P>
|
||||
<P><IMG SRC="../images/screenshots/view_stats_bundle.gif" WIDTH="642" HEIGHT="543"></P>
|
||||
<P>Three basic areas are covered by this view, Resource Files, Resource
|
||||
Groups, and Resource Items.</P>
|
||||
<P>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.</P>
|
||||
<P>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 <A HREF="../Tutorial/index.html">Tutorial</A>.
|
||||
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.</P>
|
||||
<P>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.</P>
|
||||
<P><B>Working with a Resource File</B></P>
|
||||
<P>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.</P>
|
||||
<P><IMG SRC="../images/screenshots/view_stats_file.gif" WIDTH="671" HEIGHT="543"></P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P ALIGN="CENTER"><A HREF="view3.html">View 3. The Untranslated Tab</A></P>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="../images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,180 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RB Manager - The Untranslated Tab</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(../images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="../images/template_ul.gif" HEIGHT="75"><IMG SRC="../images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="../images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="../images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="../images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="../faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="../future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../index.html">Home</A></LI>
|
||||
<LI><A HREF="../Tutorial/index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="../lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="../menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../Tutorial/step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="../scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H3 ALIGN="CENTER">View 3. The Untranslated Tab</H3>
|
||||
<P>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 <A HREF="view1.html">View
|
||||
1</A>. 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.</P>
|
||||
<P><B>Working with a Resource Bundle</B></P>
|
||||
<P>The screen shot below shows RB Manager and a view of untranslated items
|
||||
for the entire resource bundle.</P>
|
||||
<P><IMG SRC="../images/screenshots/view_untrans_bundle.gif" WIDTH="671" HEIGHT="543"></P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P><B>Working with a Resource File</B></P>
|
||||
<P>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.</P>
|
||||
<P><IMG SRC="../images/screenshots/view_untrans_file.gif" WIDTH="671" HEIGHT="543"></P>
|
||||
<P>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 <A HREF="../Tutorial/index.html">Tutorial</A>).
|
||||
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.</P>
|
||||
<P>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.</P>
|
||||
<P><IMG SRC="../images/screenshots/view_untrans_dialog0.gif" WIDTH="513" HEIGHT="269"></P>
|
||||
<P>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).</P>
|
||||
<P>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'.</P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P ALIGN="CENTER"><A HREF="view4.html">View 4. The Groups Tab</A></P>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="../images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,170 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RB Manager - The Groups Tab</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(../images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="../images/template_ul.gif" HEIGHT="75"><IMG SRC="../images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="../images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="../images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="../images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="../faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="../future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../index.html">Home</A></LI>
|
||||
<LI><A HREF="../Tutorial/index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="../lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="../menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../Tutorial/step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="../scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H3 ALIGN="CENTER">View 4. The Groups Tab</H3>
|
||||
<P>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 <A HREF="view1.html">View
|
||||
1</A>. 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 <A HREF="../Tutorial/index.html">Tutorial</A>.</P>
|
||||
<P><B>Working with a Resource Bundle</B></P>
|
||||
<P>The screen shot below shows RB Manager and a view of groups for the entire
|
||||
resource bundle.</P>
|
||||
<P><IMG SRC="../images/screenshots/view_groups_bundle.gif" WIDTH="671" HEIGHT="543"></P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P>This view is probably the most commonly used view by developers inserting
|
||||
new resources into a bundle.</P>
|
||||
<P><B>Working with a Resource File</B></P>
|
||||
<P>The next screen shot shows the Group tab view when working with an individual
|
||||
resource file.</P>
|
||||
<P><IMG SRC="../images/screenshots/view_groups_file.gif" WIDTH="671" HEIGHT="543"></P>
|
||||
<P>The functionality of this view mostly mirrors that of the Untranslated
|
||||
tab view. More on that view is found in <A HREF="view3.html">View 3</A>.
|
||||
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.</P>
|
||||
<P ALIGN="CENTER"><A HREF="view5.html">View 5. The Search Tab</A></P>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="../images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,156 @@
|
||||
<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" -->
|
||||
<HEAD>
|
||||
<!-- #BeginEditable "doctitle" -->
|
||||
<TITLE>RB Manager - The Search Tab</TITLE>
|
||||
<!-- #EndEditable -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<STYLE TYPE="TEXT/CSS">
|
||||
<!--
|
||||
.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333}
|
||||
.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(../images/diamond_bullet.gif); text-decoration: none; font-weight: bold}
|
||||
.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify}
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="2" COLSPAN="2" BACKGROUND="../images/template_ul.gif" HEIGHT="75"><IMG SRC="../images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD>
|
||||
<TD HEIGHT="15" WIDTH="100%" BACKGROUND="../images/template_u.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD HEIGHT="60" >
|
||||
<CENTER><IMG SRC="../images/TitleLogo_transparent.gif" VSPACE="0"></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD WIDTH="200" BACKGROUND="../images/template_l.gif" VALIGN="top">
|
||||
<TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1">
|
||||
<TR>
|
||||
<TD CLASS="topicHead">General</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../system_requirements.html">System Requirements</A></LI>
|
||||
<LI><A HREF="../faq.html">FAQ</A></LI>
|
||||
<LI><A HREF="../future_features.html">Future Releases</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../future_features.html">Version
|
||||
History</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Manager</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../index.html">Home</A></LI>
|
||||
<LI><A HREF="../Tutorial/index.html">Tutorial</A></LI>
|
||||
<LI><A HREF="index.html">Functionality and Views</A></LI>
|
||||
<LI><A HREF="../lookandfeel.html">Look and Feel</A></LI>
|
||||
<LI><A HREF="../menu.html">Menu Items</A></LI>
|
||||
<LI CLASS="topicList"><A HREF="../Tutorial/step1.html">Preferences</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicHead">RB Reporter</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD CLASS="topicList">
|
||||
<UL>
|
||||
<LI><A HREF="../RBReporter.html">Home</A></LI>
|
||||
<LI>Report Types</LI>
|
||||
<LI><A HREF="../scanfile.html">Code Scanning</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P> </P>
|
||||
</TD>
|
||||
|
||||
<TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" -->
|
||||
<H3 ALIGN="CENTER">View 5. The Search Tab</H3>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P><IMG SRC="../images/screenshots/view_search.gif" WIDTH="671" HEIGHT="543"></P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P>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.</P>
|
||||
<P>This view was introduced in version 0.3a of RB Manager.</P>
|
||||
<P ALIGN="CENTER"><A HREF="index.html">Back to the Functionality and View
|
||||
Index </A></P>
|
||||
<!-- #EndEditable --></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD BACKGROUND="../images/template_ll.gif" HEIGHT="40" WIDTH="200">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD WIDTH="80">
|
||||
<!-- Comment -->
|
||||
</TD>
|
||||
<TD>
|
||||
<CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
|
||||
<TR>
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF"> </TD>
|
||||
<TD>
|
||||
<DIV ALIGN="CENTER"><IMG SRC="../images/TitleLogo_transparent.gif" WIDTH="175" HEIGHT="50"></DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD WIDTH="200" BGCOLOR="#CCCCFF">
|
||||
<P><A HREF="index.html">RBManager</A></P>
|
||||
<P><A HREF="RBReporter.html">RBReporter</A></P>
|
||||
<P><A HREF="../Tutorial/step1.html">System Requirements</A></P>
|
||||
<P><A HREF="faq.html">FAQ</A></P>
|
||||
<P>Topics</P>
|
||||
<UL>
|
||||
<LI><A HREF="../Tutorial/index.html">Step-by-step Tutorial</A></LI>
|
||||
<LI><A HREF="step1.html">Changing Prefences</A></LI>
|
||||
<LI><A HREF="future_features.html">Future Release Features</A></LI>
|
||||
<LI><A HREF="mailto:jjared@almaden.ibm.com">Contact the Author</A></LI>
|
||||
</UL>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
-->
|
||||
</BODY>
|
||||
<!-- #EndTemplate --></HTML>
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2aa220c2a732230c1ef279299667ce7b69845d8abdcbeeece2f548d54feafb59
|
||||
size 1619
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0d02267543096ba5d2ddc3494d488769cfc13969860049493d3399278cb424ab
|
||||
size 1086
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2fce8ee796096cbc1a6af6c4c1ce1a35712d3a5aee4ed57b9c4e3d4677dfe9df
|
||||
size 576
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:912f946e7cb4dc29ec52fe08959511b1bbf582bb43e2527a2439f137b31fb30b
|
||||
size 285
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6f6d212f46da0ea2076cdbcd22376b3e73806ca41fc3cde955560089de2d5004
|
||||
size 369
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:80aaa098b5f76ab22534e3ee14c80cc29ff462f914c1e87fe53680879880fa9b
|
||||
size 200
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cdfd58c8af9c0bb83b3fad68e90c8d8f0caba28f571ed2ac62d6a8c3c486019f
|
||||
size 1078
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b1a91d3ee792b1d19b5e34c0cf3207b5f0b745fb5591c2cb56ca1ead4d905a7c
|
||||
size 291
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4fed6a4898228fdcf97a982ff43a790149299b7ca93f2f42b43e4e4eb58de679
|
||||
size 450
|
||||
Executable
+65
@@ -0,0 +1,65 @@
|
||||
@echo off
|
||||
|
||||
rem *****************************************************************************
|
||||
rem * Copyright (C) 2000-2002, International Business Machines Corporation and *
|
||||
rem * others. All Rights Reserved. *
|
||||
rem *****************************************************************************
|
||||
|
||||
call compile.bat -O
|
||||
|
||||
echo * Making Directories
|
||||
|
||||
mkdir zip
|
||||
cd zip
|
||||
mkdir lib
|
||||
mkdir docs
|
||||
cd docs
|
||||
mkdir Images
|
||||
cd Images
|
||||
mkdir Screenshots
|
||||
cd ..
|
||||
mkdir Tutorial
|
||||
mkdir Views
|
||||
cd ..
|
||||
mkdir Reports
|
||||
cd ..
|
||||
|
||||
echo * Copying Files
|
||||
|
||||
echo ** Copying Batch Files and Properties
|
||||
|
||||
copy RBManager.bat zip
|
||||
copy RBManager.jar zip
|
||||
copy RBReporter.bat zip
|
||||
copy rbmanager_scanner.xml zip
|
||||
copy resources\preferences.properties zip
|
||||
attrib -r zip/preferences.properties
|
||||
|
||||
echo ** Copying Documentation
|
||||
|
||||
cd docs
|
||||
copy *.html ..\zip\docs\
|
||||
cd Images
|
||||
copy *.gif ..\..\zip\docs\Images\
|
||||
copy *.jpg ..\..\zip\docs\Images\
|
||||
cd Screenshots
|
||||
copy *.gif ..\..\..\zip\docs\Images\Screenshots\
|
||||
copy *.jpg ..\..\..\zip\docs\Images\Screenshots\
|
||||
cd ..\..\Tutorial
|
||||
copy *.html ..\..\zip\docs\Tutorial\
|
||||
cd ..\Views
|
||||
copy *.html ..\..\zip\docs\Views\
|
||||
cd ..\..
|
||||
|
||||
echo ** Copying Jar Files
|
||||
|
||||
cd lib
|
||||
copy *.jar ..\zip\lib\
|
||||
cd ..
|
||||
|
||||
echo ** Copying License
|
||||
copy ..\..\..\license.html zip
|
||||
|
||||
@echo * Directory created: zip
|
||||
@echo ** Don't forget to modify preferences.properties
|
||||
pause
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user