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 103697 - I18N - bundle browser for resource id's needs improvement.
Summary: I18N - bundle browser for resource id's needs improvement.
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: I18N (show other bugs)
Version: 6.x
Hardware: Sun All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords: I18N
: 98811 106090 143554 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-05-10 22:35 UTC by _ pcw
Modified: 2008-11-11 09:33 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sketch of possible solution (5.59 KB, text/plain)
2008-08-13 00:54 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ pcw 2007-05-10 22:35:35 UTC
Given a label on a form, select the label, click the ... next to the text
property and set the editor to "select from Resource Bundle".

Now click the ... to the right of the bundle input field to get the bundle chooser.

Problem #1: This panel lists all source packages from all imported projects
FIRST.  Bundles local to the project are listed at the very bottom, even though
they are the most likely candiates.  Local sources should be first.

Problem #2: The panel does not preselect anything.  What it should do is open
the local source path to either (a) the current specified bundle, if it exists,
or the path to where the source file being edited is, if there is a bundle there.

Use case:  If you copy a form + bundle from one project to another and the
package name changes, you have to redo all the localized fields via this editor.
 It's very painful the way it is currently written.

There are better improvements we could make for copying/refactoring to avoid
even this, but these issues should still be fixed -- there are other use cases
as well.
Comment 1 _ pcw 2007-05-10 22:40:31 UTC
Problem #3:  Suppose you perform the above tasks to fix one field on such a
form.  Now to avoid all this, you copy the bundle path so you can just paste it
in directly for each of the remaining labels on the form, well...

If you open up the text property editor for another label, set it to "resource
bundle" if necessary and then paste in the new bundle path into to the bundle
input field (assume it was blank before -- it will be in the use case dictated
above), the editor _does not_ reevaluate the list of available resources from
this new bundle.  It will reevaluate the list if you use the chooser, but that
means dealing with #1, #2 above.

So you have to go through the chooser steps for every localized field in the
panel, even if all resources are in the local bundle.
Comment 2 Tomas Pavek 2007-05-23 09:49:52 UTC
All these are usability issues that are hard to fix in the existing i18n 
support (due to the way it is implemented). That is one of the reason why I 
created the automatic support - I wonder if could fix the problems for you. 
Note it should work even with older forms that use the "manual" i18n - it will 
i18n all newly added string. Does it work for you?

You're right about the copying/refactoring - that should be fixed, but that's 
another issue.

BTW if you have the entire form under auto-i18n you can use a simple workaround 
when copying/moving the files (until the refactoring is fixed). Simply turn off 
the auto-i18n on the form before you're going to move it. This will suck in all 
strings from the properties file into the form (i.e. make them hardcoded), so 
you no longer need to copy the properties file and keep the reference to it. 
Once the form is refactored to the new place, turn the auto-i18n back on and it 
will recreate the properties file.
Comment 3 John Baker 2007-06-01 07:12:32 UTC
I just updated this issue, clicked submit but seems updates gone
Comment 4 John Baker 2007-06-01 07:24:16 UTC
ditto to comments from submitter and more.  i think this should be a P2

* package containing the form is not labeled with the package name (or selected
as mentioned in subitter's comments)

* "create new" - how to use, it's disabled and does this allow me to create 
a new module to store my bundle file ?

* No Help button, but may not be needed if dialog were more user-friendly

other comments, but more general bundle property issues

* I'm really perplexed by this but maybe this is a bug.
If the form's bundle file is set , the child components of the form can be set
to another bundle file.  This is confusing and extremely unproductive 

* There must be an intuitive, explicit way to display the current bundle file
used by the Form

* Need a real easy way to edit bundle properties and easily bind components to keys

* Not all properties of a form are set in the bundle but the properties do not
let the user know which property is set to a bundle file and which file
Comment 5 Tomas Pavek 2007-06-08 14:05:21 UTC
*** Issue 106090 has been marked as a duplicate of this issue. ***
Comment 6 Tomas Pavek 2008-03-25 19:37:56 UTC
*** Issue 98811 has been marked as a duplicate of this issue. ***
Comment 7 Tomas Pavek 2008-08-12 12:43:44 UTC
*** Issue 143554 has been marked as a duplicate of this issue. ***
Comment 8 David Konecny 2008-08-13 00:52:51 UTC
Could this be re-evaluated please? I accept that automatic internationalization helps and I will use it since now. But I
would argue that it is not obvious workaround and as a result of that potentially lots of users face issues described in
this report quite frequently. It is a type of issue which looks like P4 but because it's frequency fixing it is
potentially very beneficial for end user!

I'm attaching a patch which is not perfect but solves problem #1 and partially #2 (always preselects Bundle in package
of form being edited). It slightly improves the situation but there is more to be still fixed like e.g. if no bundle is
set then automatically preselect one from form's package; there should be also a way to create a new Bundle; etc.
Comment 9 David Konecny 2008-08-13 00:54:15 UTC
Created attachment 67198 [details]
sketch of possible solution
Comment 10 Jiri Vagner 2008-10-07 08:08:26 UTC
Problem #3 was fixed, but fix will be available in next nb version and in dev version after 6.5 branch. Issue 139712
Comment 11 Jiri Vagner 2008-11-11 09:33:14 UTC
Problems #1 and #2 were fixed, problem #3 was fixed in Issue 139712.
Modified files: http://hg.netbeans.org/main/rev/d8e9632fef9a

I will file a new issue for a strange "Create New" button and missing help.
I think that the other problems are "fixed" using auto-i18n feature.