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 - Tools/Internationalization/Internationalize should understand NbBundle.getMessage()
Summary: Tools/Internationalization/Internationalize should understand NbBundle.getMes...
Status: REOPENED
Alias: None
Product: java
Classification: Unclassified
Component: I18N (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-06 20:51 UTC by Tim Lebedkov
Modified: 2011-11-28 09:21 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.