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 185644

Summary: Tools/Internationalization/Internationalize should understand NbBundle.getMessage()
Product: java Reporter: Tim Lebedkov <lebedkov>
Component: I18NAssignee: Ralph Ruijs <ralphbenjamin>
Status: REOPENED ---    
Severity: normal CC: mmirilovic
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Tim Lebedkov 2010-05-06 20:51:55 UTC
it suggests to replace the string constant in the following code:
NbBundle.getMessage(NewConstantsPanel.class, "NewConst")
Comment 1 Marian Mirilovic 2010-05-07 06:30:56 UTC
No, it suggests 
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("examples/Bundle"); // NOI18N
        setTitle(bundle.getString("FIND")); // NOI18N

the way describe it works only for NB modules and in this case this is correct suggestion.
Comment 2 Tim Lebedkov 2010-05-07 18:54:22 UTC
I am sorry. I don't understand why this is a desired behaviour for NetBeans module projects.

NbBundle.getMessage() is the recommended way for i18n AFAIK.