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 54649

Summary: I18N - some messages/labels in bundle files not clear if to be lcoalized
Product: javaee Reporter: Ken Frank <kfrank>
Component: CodeAssignee: Martin Grebac <mgrebac>
Status: CLOSED FIXED    
Severity: blocker CC: jf4jbug
Priority: P2 Keywords: I18N
Version: 4.x   
Hardware: Sun   
OS: SunOS   
Issue Type: DEFECT Exception Reporter:

Description Ken Frank 2005-02-08 05:52:26 UTC
I did a very quick review of Bundle.properties
files in enterprise1
install subdirs looking for strings that maybe
should not be translated
but didnt have NOI18N comment. Questions about
some that were not completely clear to me
are below.

Since only developer knows for sure if some string
should
not be translated, I suggest please review bundle
files ongoing
to make sure any such strings are marked with
NOI18N comment on line
above or just removed from bundle and handled in
code if thats possible. With the many hundreds
of messages in the jar files in enterprise1,
I was not able to really review each message.

Especially tricky are some values that look like a
regular message
or label, but are used in some programattic
comparison or action,
wherein its the english value that is expected,
and exceptions
tend to happen if the translated one is used - I'm
not saying there are any, just pointing out
from experiences with other modules.

Here are the questions:

1. from bundle file in
org-netbeans-modules-j2ee-refactoring.jar

It seems these most values are some keywords and
not to be translated
but I'm not sure - can you clarify ?


TXT_WebXmlServletWhereUsed=&lt;servlet-class&gt;<b>{0}</b>&lt;/servlet-class&gt;
TXT_WebXmlListenerWhereUsed=&lt;listener-class&gt;<b>{0}</b>&lt;/listener-class&gt;
TXT_WebXmlFilterWhereUsed=&lt;filter-class&gt;<b>{0}</b>&lt;/filter-class&gt;
TXT_WebXmlRefHomeWhereUsed=&lt;home&gt;<b>{0}</b>&lt;/home&gt;
TXT_WebXmlRefRemoteWhereUsed=&lt;remote&gt;<b>{0}</b>&lt;/remote&gt;
TXT_WebXmlRefLocalWhereUsed=&lt;local&gt;<b>{0}</b>&lt;/local&gt;
....
..... many more ....

2. from a bundle in org-netbeans-modules-web-core,
since these words are together without a space or
all lower case,
I think maybe they are not to be translated - can
you clarify ?


org-netbeans-modules-web-core/
FMT_DefaultName_servlet=NewServlet
org-netbeans-modules-web-core/:FMT_DefaultName_filter=NewFilter
org-netbeans-modules-web-core/:FMT_DefaultName_listener=NewListener
org-netbeans-modules-web-core/:FMT_DefaultPath1=com
org-netbeans-modules-web-core/:FMT_DefaultPath2=mycompany
org-netbeans-modules-web-core/:FMT_DefaultName_jsp
=index
org-netbeans-modules-web-core/FMT_DefaultName_jspdoc=index
org-netbeans-modules-web-core/:FMT_DefaultName_jspf=segment


OPT_emptyBodyContent=empty

OPT_scriptlessBodyContent=scriptless

OPT_tagdependentBodyContent=tagdependent

. from same module - the ### at first of this and
some other lines
make me guess that this is going into some
generated script
and the ### are for comment lines ?

if so, what file(s) are these to be part of ? 
I think a comment in bundle if so could give a
background for l10n
if these are to go in some script as part of comments

TXT_DOC_contextListener_m1=\#\#\# Method from
ServletContextListener \#
\#\#\n\nCalled when a Web application is first
ready to process request
s\n(i.e. on Web server startup and when a context
is added or reloaded)
.\n\nFor example, here might be database
connections established\nand a
dded to the servlet context attributes.\n

...... several such others ....
Comment 1 Martin Grebac 2005-02-09 12:34:43 UTC
As for 1) - refactoring; you're right that strings that do not contain
any other text than just text enclosed with <> should not be
translated. Others should be. Should I mark them somehow? How?

As for 2)
 
 - I removed unused labels (those starting with FMT_...)
 - bundles starting with OPT_ should be translated, they are shown in
tag file wizard
 - also bundles with ### should be translated, those are generated as
comments to listener (when you create listener from wizard)


Comment 2 Ken Frank 2005-02-09 18:23:27 UTC
for item 1 - can they be removed from bundle and just handled in code ?
If not, then each line needs to have a
#NOI18N comment before it
or, if all of these can be grouped into one section, and that
section clearly marked with some delimiters and #NOI18N and
#DO NOT TRANSLATE this section


for the values that start with ###, I suggest a comment saying
to make sure that no translation happens until after the ###;
it may be obvious but it can't hurt, since the lines will end
up in some code or script.

ken.frank@sun.com
Comment 3 Martin Grebac 2005-02-10 09:37:19 UTC
It's better to have these strings in bundles, so I created marked
section. Fixed in trunk.
Comment 4 Ken Frank 2005-03-13 18:30:09 UTC
as to the comment of the ### comments for the TXT_DOC keys, suggest
changing comment to something like

###Start translation after the \#\#\# for each of the TXT_DOC keys below
since these messages will be inserted into the code


All items in this issue have been verified.