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 139277 - //NOI18n comments are not added to code which should not be internationalized
Summary: //NOI18n comments are not added to code which should not be internationalized
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-08 15:51 UTC by Jana Maleckova
Modified: 2009-05-25 20:57 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 Jana Maleckova 2008-07-08 15:51:04 UTC
Product Version: NetBeans IDE Dev (Build 20080708070656)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13
System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)

Description:
============
create new JFrame and place e.g. jLabel
1. invoke custom editor for text property of jLabel
2. check "Do not internationalize this String" and confirm
switch to source editor ->  appropriate code is not marked with //NOI18N comment and e.g. i18n wizard will
internationalize it then
Comment 1 Tomas Pavek 2008-07-08 17:00:05 UTC
True, but for whatever reason, doing any change in the form afterwards, or changing the text itself when checking the
"Do not..." checkbox will fix the generated code.
Comment 2 Jana Maleckova 2008-07-08 18:38:04 UTC
I was just thinking about situation when I want to internationalize string (via i18n wizard - Tools ->
Internationalize)in some custom method which is in a scope of form class but don't want to internationalize string of
some swing component (placed in guarded blocks) from whatever reason.
But workaround is simple, just skip the string in wizard which should not be internationalized or to switch auto i18n on
in form and appropriate comments are automatically set. P4 accepted. But IMHO, scenario described above is handy as well.
Comment 3 Tomas Pavek 2008-07-08 19:13:19 UTC
My point was that the missing NOI18N comment gets fixed once you do one more change in the form - whatever change to 
regenerate code. That's how it behaves now. So it is very unlikely you'll have a missing NOI18N in the end - unless 
setting the "Do not..." checkbox is the very last thing you do in the form - and even then it will be missing only for 
this one property.