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 - Tips in Welcome Screen is not localizable | ||
---|---|---|---|
Product: | usersguide | Reporter: | Keiichi Oono <keiichio> |
Component: | Code | Assignee: | Richard Gregor <rgregor> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | jf4jbug, jglick, rgregor |
Priority: | P2 | Keywords: | I18N |
Version: | 3.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: | Possible patch |
Description
Keiichi Oono
2002-07-25 12:54:18 UTC
Welcome screen reads Tips from Default System Folder "TipsOfTheDay". If IDE is runing on ja locale I assume that there should be localized html files.If there aren't ja pages then problem is either in layer_ja.xml in usersguide or this layer is not loaded. I have tried it and it works fine for me. Problem is that there should be org/netbeans/modules/usersguide/tips/*_ja.html files in usersguide_ja.jar instead of your usersguide/src/org/netbeans/modules/usersguide/tips/*_ja.html. I still see tips not coming from localized usersguide_ja.jar and I am using the org/netbeans/modules/usersguide/tips/*_ja.html I do see in some usersguide layer xml file hardcoded references to the tips .html files, so perhaps it is using that hardcoded files ? layer files are not usually localized - they point to bundle files and the code interprets locale so that correct messages or other files are used per locale. I do see in the layer.xml some reference to layer_ja.xml near the listing of tips but in past, don't think anything special had to be done for tips to show from locale. Can this be implemented for this area ? I'd like to reopen bug if so; if it can't be, then we'd need explicit instructions for localization center (and our i18n testing) on exactly where in layer files changes need to be made and what those changes are. I think when you use ja locale then layer_ja from usersguide is used. I simply copied usersguide_ja.jar builded by usersguide module and put it to modules/locale . If I run IDE in ja locale then I can see japanese tips. If there is problem of localization of usersguide itself, please reasign this bug to usersguide module. Am transferring to usersguide since Richard mentioned that tooltips and how they find localized files are from usersguide and just shows in welcome window. He mentioned about localizing of the layer.xml in usersguide - if this is needed, please provide specific instructions; since tips used to be in core.jar and layer there did not need special processing, this is a new item for us and the instructions will allow us to properly test and localize. But we hope that there would be no need to have to modify any xml file; most parts of nb and ffj don't require modification of xml files and have code find things based on locale. Also, localizing an xml file is more complex and prone to possible syntax errors than modifying bundle files. Can code be changed so that layer xml not need modification ? ken.frank@sun.com *** Issue 26010 has been marked as a duplicate of this issue. *** Consistent use of the I18N keyword. I am marking as p2 as still see the issue. If there is some special localization needed, please tell us soon, since doing the usual translation of html tip files and calling them xxx_ja.html is not causing them to be seen when run in ja locale. We need to know exactly what do to for S1S localization. Thanks - Ken Jesse, please what is your opinion? Handling of Tips in new welcome is from my point of view the same as in old WelcomePanel in core. Didn't I already respond to this question in detail? There are two options I know of: 1. Create layer_ja.xml which points to the *_ja.html. In that case you can name the Japanese HTML files whatever you please, since you are overriding the <file>s in the English layer.xml according to their layer names. 2. Change layer.xml to use the nbresloc: URL protocol to refer to the HTML files, rather than simple relative URLs (which point directly to other JAR entries and do not locale search). Then the tips can be localized just by adding _ja variants, which is probably preferred. Attaching untested patch for that, maybe Richard can handle this. Created attachment 9078 [details]
Possible patch
BTW this is an RFE, not a bug - the tips *are* localizable as they stand. The request is just to make it easier. Fixed. I've applied Jesse's patch. It works for me fine. Checking in src/org/netbeans/modules/usersguide/layer.xml; /cvs/usersguide/src/org/netbeans/modules/usersguide/layer.xml,v <-- layer.xml new revision: 1.17; previous revision: 1.16 done Removing src/org/netbeans/modules/usersguide/layer_ja.xml; /cvs/usersguide/src/org/netbeans/modules/usersguide/layer_ja.xml,v <-- layer_ja.xml new revision: delete; previous revision: 1.5 done Verified at NetBeans 3.5 RC1. Thank you very much for your enhancement. Keiichi |