This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 25027

Summary: xml - a method is not i18ned
Product: qa Reporter: Honza Firich <honzaf>
Component: JellytoolsAssignee: Martin Schovanek <mschovanek>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Honza Firich 2002-06-21 14:33:42 UTC
I found a problem on a method in jelly. It does not work 
with Japanese Forte.

class: org.netbeans.test.oo.gui.jelly.xml.CatalogNode
method: findCatalogNode()

Catalog Prefix is not at the beginning of the string in 
Japan Forte, thus is does not work.

Existing method:
----------------
public static CatalogNode findCatalogNode(int type, String 
url) {
    url = (url == null) ? "" : url;
    String name = catalogPrefix(type) + url;
    EntityCatalogsNode root = 
EntityCatalogsNode.findEntityCatalogsNode();
    CatalogNode catalog = new CatalogNode();
    catalog.setParent(root);
    catalog.initialize(name);
    catalog.expand();
    return catalog;
}

Possible solution:
------------------

public static CatalogNode findCatalogNode(int type, String 
url) {
    url = (url == null) ? "" : url;
    //String name = catalogPrefix(type) + url;
    String name;
    if (url != "") {
    Object[] newName = {url, new Integer(0)};
    name = JelloBundle.getStringFormat
("org.netbeans.modules.xml.catalog.impl.sun.Bundle", "TITLE
_catalog", newName);        
    }
    else {
        name = catalogPrefix(type);
    }
      
    EntityCatalogsNode root = 
EntityCatalogsNode.findEntityCatalogsNode();
    CatalogNode catalog = new CatalogNode();
    catalog.setParent(root);
    catalog.initialize(name);
    catalog.expand();
    return catalog;
}
Comment 1 Martin Schovanek 2002-07-11 13:10:27 UTC
Fixed in main trunk.