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 52141 - cannot create WebApp by New Project wizard in ja locale
Summary: cannot create WebApp by New Project wizard in ja locale
Status: RESOLVED FIXED
Alias: None
Product: nblocalization
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: Sun SunOS
: P1 blocker (vote)
Assignee: issues@nblocalization
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2004-12-07 08:51 UTC by hatakyon
Modified: 2004-12-14 03:00 UTC (History)
3 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 hatakyon 2004-12-07 08:51:01 UTC
I have got the following exception, when I create
Web Application by New Project Wizard in ja locale.


java.io.FileNotFoundException: JAR entry
org/netbeans/modules/web/core/resources/templates/JSP.template
not found in
/import/near/IAPT/Forte4J/NetBeans40/dist/200412061800/ide4/modules/locale/org-netbeans-modules-web-core_ja.jar


repeoduce:
  1. intstall the follwing ML build:
   
/net/smetiste.czech.sun.com/space/builds/netbeans/4.0/daily_ml/200412061800/netbeans-4_0-daily_ml-bin-200412061800-solaris-sparc-ml_ja_zh_CN-6_Dec_2004_1800.bin


  2. run netbeans in ja locale
  3. File -> New Project -> Web -> Web Application
-> Next
  4. enter valid project name such as "webapp1" ->
Finish
  5. got exception.
Comment 1 rbalada 2004-12-07 10:23:10 UTC
I will look into this issue as well
Comment 2 _ mihmax 2004-12-08 15:42:05 UTC
Rudolf,
I think I found the source of a problem:

Japanese l10n team doesn't translate templates, but they do translate
layer.xml, which references this template.

There can be two solutions, and both are to be done by Japanese l10n team:
1) Don't translate layer.xml - and then the names of templates are
maybe unlocalizable

2) Copy JSP.template to JSP_ja.template and reference it in layer_ja.xml 
(and also other templates should be done the same way)

There can be one solution that involves web module coders - have them
NOT to use this hardly localizable layer.xml, but it's unrealistic for
4.0, and maybe unrealistic at all.
As you are an insider, please talk to web/core programmers and let
them advise the solution
Comment 3 hatakyon 2004-12-09 05:46:08 UTC
Yes. I have created Japanese version of layer.xml, layer_ja.xml
and committed to repository. It it the cause of this problem ?

l10n kit for web module contain layer.xml file, so I
created localized version, layer_ja.xml.
Contens of layer_ja.xml are the same as English one,
just copied English layer.xml file to layer_ja.xml.

We don't need translation of this ?

I don't know right way of the localization of this layer.xml file.
Could you explain please ?
Comment 4 rbalada 2004-12-13 14:42:16 UTC
Fixed on release40 branch. Build is now enforcing addition of whole
nb_all/web/core/src/./org/netbeans/modules/web/core/resources/templates
directory into localized jar files.

Please verify as there might be issues with "post-processed" jar files
as my midnight commander was core dumping when attempting to step into
jarfile, on the other hand the 'jar' utility worked fine with those
jarfiles.

Checking in build.xml;
/cvs/translatedfiles/build.xml,v  <--  build.xml
new revision: 1.94.4.5; previous revision: 1.94.4.4
done
Processing log script arguments...
Mailing the commit message to cvs@translatedfiles.netbeans.org (from
rbalada@netbeans.org)
Comment 5 Ken Frank 2004-12-13 16:21:41 UTC
I'll file issue in webapps subcat asking that

- any layer or other xml files be removed from l10n.list
- but to make sure that functionality is ok if they are removed

We're trying to follow the way where l10n needs to translate only
bundle and html files (and .url files)

ken.frank@sun.com
Comment 6 Ken Frank 2004-12-13 17:00:26 UTC
Rudolf,

wrt your comment below:

Fixed on release40 branch. Build is now enforcing addition of whole
nb_all/web/core/src/./org/netbeans/modules/web/core/resources/templates
directory into localized jar files.

--> can you explain more about this ?

Why do any templates or other xml files need to be in localized
jar (unless we are talking about template descriptor html files
which already are in localized jar)

if its something that can be done in module code, l10n should
not need to just rename some file and put in localized jar.

I filed 52344 on this specific issue of web apps,
but I want to understand more about this situation
and does it apply to other modules.

Thanks - Ken

ken.frank@sun.com
Comment 7 rbalada 2004-12-13 20:35:59 UTC
Ken,

web/core module japanese localization file
ide4/modules/locale/org-netbeans-modules-web-core_ja.jar
contains layer file
org/netbeans/modules/web/core/resources/layer_ja.xml which references
a lot of files relatively from subdirectory "templates". The list of
referenced files starts with JSP.template files, which was the very
first cause why this issue has been filled.

in order of appearance:
$ grep "\"templates/" layer_ja.xml | cut -f4 -d '"'
templates/JSP.template
templates/JSPDoc.template
templates/JSPF.template
templates/JSPDocX.template
templates/TagFile.template
templates/TagFileX.template
templates/TagFileF.template
templates/TagFileFX.template
templates/Servlet.template
templates/ServletListener.template
templates/BlankTagLibrary.template
templates/BlankTagLibrary_1_2.template
templates/SimpleFilter.template
templates/AdvancedFilter.template
templates/SimpleTagHandler.template
templates/BodyTagHandler.template
$ 


There are two options:
#1 remove layer_ja.xml file and not add includes of "templates"
#2 keep layer_ja.xml a add "templates" subdir

BTW: the templates dir is being added  to localized jar "as-is", no
file renaming or whatever modifications, it's realy just adding of
original english resources to localized jar to prevent
FileNotFoundException.
Comment 8 Ken Frank 2004-12-14 02:13:34 UTC
I filed 52344 to have xml/layer kind of file removed
from l10n.list. IMO there is no reason l10n should need to
do this kind of manipulation; code should handle it and 99% of all
modules dont require this. (the few others I've also filed bugs
recently).

But I think for nb4.0 things should stay the way they are
since its late in cycle but please fix for 4.1.

ken.frank@sun.com
Comment 9 Jesse Glick 2004-12-14 03:00:57 UTC
Claimed fixed for 4.0.