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 79066 - I18N: properties of AWT colorname are used for both UI and generated codes
Summary: I18N: properties of AWT colorname are used for both UI and generated codes
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2006-06-26 10:07 UTC by Masaki Katakai
Modified: 2008-12-22 17:15 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch (1.43 KB, patch)
2006-06-27 10:05 UTC, Stanislav Aubrecht
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki Katakai 2006-06-26 10:07:20 UTC
This problem was reported from user who is using NetBeans 5.0 German.

There are some properties for color naming that will be shown on UI
at color chooser.

src/core/src/org/netbeans/beaninfo/editors/Bundle.properties

# ColorEditor:AWT color names
LAB_White=white
LAB_LightGray=lightGray
LAB_Gray=gray
LAB_DarkGray=darkGray
LAB_Black=black
LAB_Red=red
LAB_Pink=pink
LAB_Orange=orange
LAB_Yellow=yellow
LAB_Green=green
LAB_Magenta=magenta
LAB_Cyan=cyan
LAB_Blue=blue

Once we translate these string above in Bundle_<lang>.properties, this value
will be into generated codes too, like 

        jButton1.setBackground(java.awt.Color.<localized_string_of_green>);

It will fail at compiling.

The problem is that we use the same values for UI and code generation.
I'd like to ask you to separate them and just extract UI's properties into
Bundle.properties.

If there is still specific reason that these values (that will be into generated
codes) need to be in Bundle.properties, please put #NOI18N keyword so that
translators can find it's not localizable.
Comment 1 Ken Frank 2006-06-26 16:25:30 UTC
Marking as p2, since this directly impacts user experience and they
may not know that these words need to be changed in the code.

From looking at the keyname of these, LAB_ I think these
are meant to be displayed to user, so think that
they would stay and just not use these same words
for being placed in generated code but hardcoded ones
that stay in english.

Also, can this be fixed for 5.5 also - I don't know the keyword
or status whiteboard word to put in to get it requested.

ken.frank@sun.com
Comment 2 Stanislav Aubrecht 2006-06-27 09:54:02 UTC
fixed in trunk

Checking in ColorEditor.java;
/cvs/core/src/org/netbeans/beaninfo/editors/ColorEditor.java,v  <-- 
ColorEditor.java
new revision: 1.60; previous revision: 1.59
Comment 3 Stanislav Aubrecht 2006-06-27 10:05:36 UTC
Created attachment 31411 [details]
Patch
Comment 4 Stanislav Aubrecht 2006-07-03 15:01:59 UTC
fixed in release55 branch

Checking in ColorEditor.java;
/cvs/core/src/org/netbeans/beaninfo/editors/ColorEditor.java,v  <-- 
ColorEditor.java
new revision: 1.53.66.1.2.2; previous revision: 1.53.66.1.2.1
Comment 5 Pavel Rehak 2006-08-23 12:44:52 UTC
Verified.