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 140368 - I18N - Restful WS Client Stubs wizard creates Readme.txt in English without encoding tag
Summary: I18N - Restful WS Client Stubs wizard creates Readme.txt in English without e...
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Ayub Khan
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2008-07-16 17:41 UTC by kaa
Modified: 2008-09-10 17:49 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
image (75.96 KB, image/jpeg)
2008-07-16 17:41 UTC, kaa
Details
test stub (72.89 KB, image/jpeg)
2008-08-11 17:32 UTC, kaa
Details
wsdl file (3.69 KB, text/xml)
2008-09-05 16:01 UTC, kaa
Details
web app (66.37 KB, application/octet-stream)
2008-09-09 16:14 UTC, kaa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kaa 2008-07-16 17:41:05 UTC
Product Version: NetBeans IDE Dev (Build 0710)
Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22
System: Windows XP version 5.1 running on x86; MS932; ja_JP (nb)
I'm running in the Japan locale, using a pseudo localized Netbeans with font size 16 option. 

1. Create Web App
2. Create Restful WS Client Stubs

In the project there is Readme.txt file. It has content in English without without encoding tag. Is it possible to store
the content in html format with encoding data and place it in localized jar?

The reason is that text files have no encoding tag but there are multiple sub locales for ja and zh so using just one
encoding in a text file will not work, whereas there is one common encoding tag that will work in html file for each of
ja and zh.
Comment 1 kaa 2008-07-16 17:41:49 UTC
Created attachment 64728 [details]
image
Comment 2 Peter Liu 2008-07-16 18:53:25 UTC
Ken, is there an example of a file with such encoding tag so we have an idea how this work? Thanks.
Comment 3 Ken Frank 2008-07-16 19:07:47 UTC
Peter,

look at most olh docs or just a new html file created by nb -it has
the meta charset tag in it; translation people would change that tag themself.

the more complex part might be - when user is in locale for which has been translated;
ie there are localized jars, will this modules code get the readme.html from
the localized jar, and show it, and not the en one ?

usually there are few readmes that come with a project or they are from some other provided
s/w, like for rails project

thus we don't have examples that I know of of how to code this part.

ken.frank@sun.com
Comment 4 Ayub Khan 2008-07-30 14:09:16 UTC
All html files (Test*.html, Readme.html) are now localized. The mechanism we use here is, 

- html file templates has tokens that get replaced with contents from Bundle.properties. So
a user generating the stubs will see the html files in their locale.
- There is no provision to create Readme files in multiple locales as you will see 
in Readme files of major software distributions.

Changes, see
http://hg.netbeans.org/main/rev/5542b06a54fc
Comment 5 kaa 2008-08-11 17:31:53 UTC
The fix has side effects:

Product Version: NetBeans IDE Dev (Build 200808101401)
Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22

Readme file is now in the html format and mbyte chars were shown ok there. TestStubs.html contains bad mbyte in its
source (see image). View action from the pop-up menu opens browser with incorrect url (I tried it also with IE - the
same result).
The behavior is the same for UTF-8 and Windows-31j project encoding.
Comment 6 kaa 2008-08-11 17:32:42 UTC
Created attachment 67053 [details]
test stub
Comment 7 kaa 2008-08-11 17:36:38 UTC
Charset value in Readme.html and TestStub.html doesn't depend on the project encoding. It is always UTF-8.
Does it expected behavior?
Comment 8 Ayub Khan 2008-08-26 21:22:34 UTC
Fixed

1. Charset value in Readme.html and TestStub.html now depend on the project encoding. 
2. TestStubs.html contains bad mbyte in its source (see image). <-- I couldn't find a cause (did a od -c TestStubs.html
in unix), but I tried to add processing instruction <?xml, and changed the <!DOCTYPE to look like Readme.html's.

Following I think is not related to this issue.

- View action from the pop-up menu opens browser with incorrect url (I tried it also with IE - the
same result).

So closing this bug as fixed. Please reopen if you think there are still I18n issues. Also please attach the
TestStubs.html as well as the Bundle.properties file that has the translation text for TestStubs.html. I believe it
could be a user error.
Comment 9 Quality Engineering 2008-08-28 06:19:56 UTC
Integrated into 'main-golden', available in build *200808280201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/59b715b2372e
User: Ayub Khan <ayubskhan@netbeans.org>
Log: Fix issue#140368 - I18N - Restful WS Client Stubs wizard creates Readme.txt in English without encoding tag
Comment 10 kaa 2008-09-05 16:01:02 UTC
Product Version: NetBeans IDE Dev (Build 200809040201)
Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22
System: Windows XP version 5.1 running on x86; MS932; ja_JP (nb)

Steps:
1. Create WebApp
2. Open Restful WS Client Stubs wizard
3. Specify WADL file to Generates stubs (the file is attached)
4. Press Finish

All files are using project encoding, but I see the following:

1. TestStubs.html contains bad mbyte in its source. The image looks the same.
2. There is RestProxyServlet.txt file. It looks like a java file but it has txt extension (not sure its ok).
Comment 11 kaa 2008-09-05 16:01:59 UTC
Created attachment 69164 [details]
wsdl file
Comment 12 Ayub Khan 2008-09-08 22:13:24 UTC
>All files are using project encoding, but I see the following:

>1. TestStubs.html contains bad mbyte in its source. The image looks the same.
I don't know why Readme.html is OK, but TestStubs.html is not. Both use the same text from the Bundle.properties
Can you please attach the TestStubs.html with the those bad mybyte.

>2. There is RestProxyServlet.txt file. It looks like a java file but it has txt extension (not sure its ok).
This is fine, it is documented in the Readme, on how to use this file.
Comment 13 kaa 2008-09-09 16:13:40 UTC
In attachment there is my web application.
Files stored in と粮い/web/rest folder.
Comment 14 kaa 2008-09-09 16:14:41 UTC
Created attachment 69425 [details]
web app
Comment 15 Ayub Khan 2008-09-09 20:16:58 UTC
I have checked in a fix (http://hg.netbeans.org/main/rev/f6f031d22067). Please try the latest build to test this.
Comment 16 Ayub Khan 2008-09-09 22:29:53 UTC
Closing as fixed, please reopen if there are issues.
Comment 17 Quality Engineering 2008-09-10 05:44:08 UTC
Integrated into 'main-golden', will be available in build *200809100201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f6f031d22067
User: Ayub Khan <ayubskhan@netbeans.org>
Log: Fix issue#140368 - bad mbyte in TestStubs.html
Comment 18 kaa 2008-09-10 17:49:41 UTC
verified: build 0910 (WinXP, Ja and OpenSolaris, zh)