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 153358 - Allow ResourceBundle instead of NbBundle
Summary: Allow ResourceBundle instead of NbBundle
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: I18N (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 2 votes (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-18 07:45 UTC by ivan
Modified: 2011-11-28 09:21 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
nb55-internationalization-expert-settings.jpg (52.13 KB, image/jpeg)
2008-11-19 10:39 UTC, Jiri Vagner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ivan 2008-11-18 07:45:21 UTC
Please first check out the thread 
    Keeping libraries "pure"

The gist of it is that I'm trying to write some libraries which
I'd like to keep "pure" and not dependent on NB apis so that they
can be used outside of NB. 
In fact I believe all modules in lib.* are such modules.

The thread discusses the merits of writing a java library and
creating a wrapper vs creating a "pure" NB module. The wrapper
stuff isn't very automated. It got painful enough that I
opted for "pure" NB modules. 

However, I ran into a snag. The gui builder insists on i18n'ing
messages using NbBundle which forces the code to depend on an NB module.
What I'd like to ask is for the form property AutomaticInternationalization
to become a combo-box and offer NB-style as well as standard i18n'ing.
Comment 1 Jesse Glick 2008-11-18 23:45:37 UTC
There used to be an option to pick the style of I18N code generation you want, but I can't find it now.

Probably the form editor should use NbBundle.getMessage(ThisClass.class, "key") if NbBundle can be found on the
classpath of the form, otherwise using ResourceBundle.getBundle("this.package.and.ThisClass").getString("key").
Comment 2 ivan 2008-11-19 00:03:19 UTC
NbBundle may not be on the classpath if the project dependencies aren't
setup right a-priori, so too automatic a choice may backfire.
Comment 3 Michel Graciano 2008-11-19 01:03:58 UTC
Yes, there is this option but it is no more public... it was removed from 'Advanced Options' and not relocated on new
Options UI. AFAIK when you change the internationalization option on the combobox, it will be remembered during all NB
sessions, until you change it again. This will be a problem if you, like me, work at several projects which have
different classes with this purpose. Maybe should be implemented a way to add new patterns, maybe in the Miscellaneous
options I guess.I will really appreciate this too.
Comment 4 Jiri Vagner 2008-11-19 10:38:07 UTC
Yes, user was able to configure this inside Advanced Options -> Internationalization -> Expert ... (see the screenshot).
I will reassign this issue to i18n component, maybe there is a some magic commandline workaround switch ...

I will also discuss this issue with form developers.
Comment 5 Jiri Vagner 2008-11-19 10:39:33 UTC
Created attachment 73898 [details]
nb55-internationalization-expert-settings.jpg