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 137096 - Internationalization
Summary: Internationalization
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Show Data (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Nithya Radhakrishnan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-12 12:53 UTC by Andrei Badea
Modified: 2008-07-17 04:38 UTC (History)
2 users (show)

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 Andrei Badea 2008-06-12 12:53:22 UTC
There are many non-internationalized strings in the dataview module, and NOI18N markers are missing in many places.
Comment 1 Nithya Radhakrishnan 2008-06-27 14:29:59 UTC
Changeset Number changeset:   86600:10927c8151a0.
Please update to get latest changes
Comment 2 Andrei Badea 2008-07-08 12:42:54 UTC
The way to do I18N you used is very uncommon for a NetBeans module. Also, I would discourage key names such as
"DB-DV-RESC182". Instead, the key name should be related to the value, such as "MSG_ShowSQLScript". I would also
discourage code like

    String nbBundle30 = mLoc.t("RESC030: Data:");
    this.setName(nbBundle30.substring(15));

where the variable name contains a magic number, and another magic number is passed to the substring call (and why
should the substring call be needed anyway?).

The NetBeans pattern would be simply:

    this.setName(NbBundle.getMessage("MSG_Data"));

Please have a look at the Bundle.properties files and the usages of the org.netbeans.util.NbBundle class in the db.core
module.
Comment 3 _ ahimanikya 2008-07-08 13:18:43 UTC
We are using some hulp utility (http://blogs.sun.com/fkieviet/entry/server_side_internationaliation_made_easy) to
generate this automatically. Its easy to maintain this way. This will allow developer to modify the text and the bundle
automatically gets generated during build time.

Nithya has sent mail to David on this and he was fine with this. With respect to ID, it is just a unique ID for code
generation, when you have the entire text available a meaningful id does not make much difference. I think this is more
readable than what you are suggesting or the traditional method. The SOA team follow this practice for all the NB
enterprise modules. 

The unique ID will help the tech doc folks explain errors and warning in more descriptive manner. When we are extracting
the text for visual display we are truncating the ID using substring. I agree substring is bit ugly and we have
requested the hulp developer to provide API to access the text directly, we will update this in next release.

I am closing this, since I think what we have is correct and there is nothing to fix.
Comment 4 Andrei Badea 2008-07-08 13:35:08 UTC
No, your way is inconsistent with several hundred existing NetBeans modules in the main repository. In my opinion, this
issue is a blocker for the integration of dataview with NetBeans.
Comment 5 _ ahimanikya 2008-07-08 14:56:29 UTC
May be, I thought we gave a heads up before adapting it. Now I don't have much resource to redo it again, unless you are
willing to clean it up.
Comment 6 Andrei Badea 2008-07-08 15:48:31 UTC
I didn't see any heads up, and I'm pretty sure I would have argued strongly against it if I had seen it. I'm sorry about
the resources thing, but I still view this as an integration blocker. We obviously have no resources to work on it. We
have already spent a lot of time driving the dataview effort, much more than we had originally planned.
Comment 7 _ ahimanikya 2008-07-08 20:00:45 UTC
Making it P3 as discussed. 
Comment 8 _ ahimanikya 2008-07-09 07:04:10 UTC
We can't be responsible if you have not seen the heads up on this before. There seems to be some trust issues here.

Anyway, given the fact that my team may not maintain this code after 6.5, I am willing to fulfill this change request.
Comment 9 Andrei Badea 2008-07-09 10:17:45 UTC
It is not a matter of trust. I just missed that thread, and I wanted to read it, since it relates to this issue.

I managed to find the thread, and here it is.

Message from Nithya:

    As regards the internationalization, we have been using the hulp
    utility to display the loggers and bundle resource information.For
    Dataview, how do you want us to go about the same.Can I proceed along
    the same lines.Any information on the same would prove useful.

Reply from David:

    Hi, Nithya, I talked to Ahi about this, this is fine, whatever works
    for you as long as it results in code that is compliant with NetBeans
    I18N standards.

I guess "code ... compliant with NetBeans I18N standards" is where we differ in our interpretations.
Comment 10 _ ahimanikya 2008-07-09 10:36:16 UTC
hulp is used by all NB enterprise modules, so I would argue it is compliant with NetBeans I18N standards, otherwise the
I18N QE folks would not have approved the NB enterprise modules release.

Anyway, this is all irrelevant now, we will get it fixed the way you wanted it.
Comment 12 Roman Mostyka 2008-07-15 11:38:48 UTC
Verified with build 080714.
Comment 13 Quality Engineering 2008-07-17 04:38:30 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #324 build
Changeset: http://hg.netbeans.org/main/rev/631acbd1aca9
User: rnithya@netbeans.org
Log: Support for Internationalization and 508 compliance(Issue#137096)