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.
Summary: | I18N - page directive with pageEncoding attribute is needed in the default index.jsp | ||
---|---|---|---|
Product: | javaee | Reporter: | Keiichi Oono <keiichio> |
Component: | Spring | Assignee: | Rohan Ranade <rohanranade> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | blaha, jf4jbug, kaa, pslechta, sustaining |
Priority: | P2 | Keywords: | I18N, RELNOTE |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | IDE screeshot when opening index.jsp |
Description
Keiichi Oono
2008-05-13 12:04:11 UTC
Created attachment 61324 [details]
IDE screeshot when opening index.jsp
See also #128595 looks like 128595 did not have complete fix - it got the html tags but not the page directive one. also added whiteboard entry for fixing in patch 2 and added RELNOTE keyword so this could be mentioned in release note. as to the text for the file being in bundle, its probably not needed to be since text in project created files (from templates) like java, jsp, html are not translated. ken.frank@sun.com The decision was not to translate the contents of index.jsp. The contents are generated by a template. Also, now, integrated in the trunk, a change was made so the text no longer comes from a bundle file. Please try a trunk build. Changeset was aaec9e965b2a John, just confirming that template file itself does not need to be translated and thus should not be in l10n kits, since we don't translate template files. (probably nothing needs to be done since template file names don't match global pattern of .html or .properties so it won't be in kit anyway) ken.frank@sun.com That's right, the template file is not to be translated. That is what I meant to say in desc5 but I referred to index.jsp If no other template files are translated then shouldn't make an exception. Since this is marked as 61fixes2-candidate then do you need to transplant aaec9e965b2a to patch 2 ? John, I have added sustaining to cc list. I know that it needs to be verified in trunk and then sustaining does other actions, but I don't know specific answer to the question and think sustaining can tell about it. ken.frank@sun.com Please let me reopen because I would like to request to add page directive with "pageEncoding" attribute. I agree with you to implement not to translate index.jsp contents by Bundle.properties. However, even if the default page is generated with English message, user will modify that initial page with native language, and they need to add page directive to display non-ascii characters. Would you add pageEncoding attribute to help users to modify default index.jsp? It's really helpful if the generated page has pageEncoding attribute. If some changes will be made in templates let me know where can I find them. Now I see the following: 1. index.jsp doesn't have the line suggested in the description: <%@page contentType="text/html" pageEncoding="UTF-8"%> there is only: <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> 2. In the description I see that the content of index.jsp now comes from a template. I don't see any separate template for this under Spring Framework templates. There is only JSP template under Web category. It has encoding value as a parameter: <%@page contentType="text/html" pageEncoding="${encoding}"%> Probably it will be used for index.jsp in Spring project. The fix proposed by changeset http://hg.netbeans.org/main/rev/aaec9e965b2a basically removes localized Spring welcome message from the l10n bundle and places English welcome message into template. So Spring welcome page will be always in English language. Is it the proper fix for this issue? Is it OK if welcome page won't be localized? Petr, it is ok since comments in template files are not translated. However, as keiichio and kaa mention, the pageEncoding directive is not in this index.jsp file and it should be, since other jsp files created for user by various nb projects, have such a notation. even if this file might not be meant to be used in same way as other jsp files it still should have this directive in it in case user wanted to have characters of other encoding in it. can that be added as part of this fix ? ken.frank@sun.com Fixing template for Spring index.jsp page... http://hg.netbeans.org/main/rev/2db26c0e4fcf QA, please verify this fix till 09-Jun-2008, so it can be part of NB 6.1 patch 2. Reporter, please verify the bug in the trunk. Thanks. kaa, please verify this now in next trunk build so can be in patch, mark as resolved in issue when it happens please. ken.frank@sun.com Checked with trunk build 0603: index.jsp now has the line <%@page contentType="text/html" pageEncoding="UTF-8"%>. The encoding was chooses from the project one. Checked also with win-31j. I confirmed the fixing, too. It works fine. Thanks! The fix has been ported into the release61_fixes repository. http://hg.netbeans.org/release61_fixes/rev/c42b7900afe1 http://hg.netbeans.org/release61_fixes/rev/d764f4c986c7 |