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 104074 - I18N - Collapsed code has a box with text not from pseudo localized bundle file
Summary: I18N - Collapsed code has a box with text not from pseudo localized bundle file
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Petr Pisl
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2007-05-16 15:10 UTC by kaa
Modified: 2007-09-18 18:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
pic (27.54 KB, application/octet-stream)
2007-05-16 15:10 UTC, kaa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kaa 2007-05-16 15:10:00 UTC
1. Create Sevlet
2. Open its code in editor
3. Collaps HttpServlet methods

Collapsed code has a box with text not from pseudo localized bundle file.
I'm running in the Japan locale, using a pseudo localized Netbeans. The message
does not come from the pseudo localized jar file.
Comment 1 kaa 2007-05-16 15:10:22 UTC
Created attachment 42471 [details]
pic
Comment 2 Petr Pisl 2007-05-16 16:21:53 UTC
The description is comming from a template file and the template files are not
localized. If you try create a form, which also contains descriptions for editor
folds, does the description contain the localized text? 

The same javadoc, which comes from the template files. Is it required to have
localized javadoc in the templates?

Probably it's doable, but I don't know any general approach, which is used in
the IDE.
Comment 3 Ken Frank 2007-05-16 16:39:42 UTC
Since we don't have templates localized, I dont think javadoc of them needs to
be either.

(if its the from the jdk javadoc, there is a localized version of that, for ja
at least, so in that case
probably the localzied javadoc should be seen)

In general, about templates, I have not heard about requests from users that
they be translatable.

ken.frank@sun.com
Comment 4 Petr Pisl 2007-05-16 16:54:07 UTC
So can be this issue closed as WONTFIX? Basically for fixing this issue we need
need to localized templates or find out some other solution.
Comment 5 Ken Frank 2007-05-16 17:18:32 UTC
Let me back up a bit here.

Are the words
"Click on the + sign on the left to edit the code"

part of the template file itself.

It seems such messages would be part of other code, since shown dymamically to
the user
depending on if collapse/expand.

Its that kind of message that seems it should come from bundle file,
since normally info in template files is not about such instructions to the user
as this msg is.

ken.frank@sun.com
Comment 6 Petr Pisl 2007-05-17 09:22:22 UTC
>Are the words
>"Click on the + sign on the left to edit the code"

>part of the template file itself.

Yes, unfortunately it is.

The line in the servlet.template file looks:

// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the
+ sign on the left to edit the code.">

There is a way how to fix it. The line can be changed to:

// <editor-fold defaultstate="collapsed" desc="__REPLACE_ME__">

And when the file is created from template, replace the text __REPLACE_ME__ with
localized message. It's doable. On the other hand I think it should be fixed in
all templates. So all the templates, which have an editor fold with a description.

>Its that kind of message that seems it should come from bundle file,
>since normally info in template files is not about such instructions to the 
>user as this msg is.

I agree.

Comment 7 Ken Frank 2007-05-17 18:20:28 UTC
a form has such a message at + sign,  Generated Code, coming from bundle file.

what other kinds of projects or file->new choices  or code types (java, jsp,
html, etc) have in general such messages
seen when one collapses the code and then hovers over the + sign  ?

Then we can ask dev about it and see which of those use bundle vs from template
file.
And then have discussion if in general these kind of msgs can come from bundle file
in future.

But since at least form is using from bundle, can it use bundle for the web
project/file types
(or at least the kind of file described in this issue) ?

ken.frank@sun.com
Comment 8 Petr Pisl 2007-05-18 09:24:56 UTC
I'm going to fix this issue to use bundled files. 

IMHO the right solution is to have possibility that we can localized the
templates itself. The we even the javadoc can be localized. 
Comment 9 Petr Pisl 2007-08-29 12:22:07 UTC
Fixed in the trunk.
Checking in wizards/Bundle.properties;
/cvs/web/core/src/org/netbeans/modules/web/wizards/Bundle.properties,v  <--  Bundle.properties
new revision: 1.9; previous revision: 1.8
done
Checking in wizards/ServletIterator.java;
/cvs/web/core/src/org/netbeans/modules/web/wizards/ServletIterator.java,v  <--  ServletIterator.java
new revision: 1.6; previous revision: 1.5
done
Checking in core/resources/templates/Servlet.template;
/cvs/web/core/src/org/netbeans/modules/web/core/resources/templates/Servlet.template,v  <--  Servlet.template
new revision: 1.13; previous revision: 1.12
done
Comment 10 kaa 2007-09-18 18:29:31 UTC
verified: build 0912