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 243190 - Internationalization Wizard does nto generate Bundle.properties
Summary: Internationalization Wizard does nto generate Bundle.properties
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: I18N (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-23 15:20 UTC by scanti
Modified: 2014-09-16 14:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description scanti 2014-03-23 15:20:21 UTC
I have this problem in my company RCP Application based on the NetBeans Platform:

I have a .Java file in a package that does not contain a Bundle.properties file. 
I run the Internationalization Wizard, the wizard adds the Bundle to the Bundle.properties of the parent package, without giving any warnings. 

When I run the application the NBBundle.getMessage(clazz, msg) gives an exception because it cannot find the the Bundle. 

My suggestions would be:
1)The wizard should create the Bundle.properties or issue an error

OR

2) the NbBundle.getMessage() should be consistent with the wizard behavior and search for the Bundle.properties in the parents packages. 

This bug has been affecting NetBeans since a long time and it is hard to catch at compile time. 

Thanks
Comment 1 Ralph Ruijs 2014-09-16 14:23:30 UTC
Sadly the internationalization wizard is not that intelligent. It adds a key-value pair to a bundle and replaces a string with some template. The NbBundle template uses the class to find the bundle-file, but other templates, like java.util.ResourceBundle[1], use the full bundle location.



[1] - java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")