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 26009 - I18N - Tips in Welcome Screen is not localizable
Summary: I18N - Tips in Welcome Screen is not localizable
Status: VERIFIED FIXED
Alias: None
Product: usersguide
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: Richard Gregor
URL:
Keywords: I18N
: 26010 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-07-25 12:54 UTC by Keiichi Oono
Modified: 2003-05-19 10:55 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Possible patch (10.54 KB, patch)
2003-02-21 15:56 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keiichi Oono 2002-07-25 12:54:18 UTC
NetBeans IDE 3.4 Beta 3 (Build 200207111250)
JDK 1.4.0

I've created usersguide_ja.jar which includes
usersguide/src/org/netbeans/modules/usersguide/tips/*_ja.html.
And copied usersguide_ja.jar into modules/locale
directory.

The translated contents are not displayed. Please
read the above *_ja.html in usersguide_ja.jar when
IDE is running in 'ja' locale.

It seems that the Welcome Screen reads only
usersguide.jar because the translated contents are
displayed when I translate usersguide.jar directly.
Comment 1 Richard Gregor 2002-09-24 10:07:21 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.
Comment 2 Richard Gregor 2002-09-24 10:30:39 UTC
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.


Comment 3 Ken Frank 2002-09-25 22:38:17 UTC
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.
Comment 4 Richard Gregor 2002-09-26 09:21:56 UTC
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.  
Comment 5 Ken Frank 2002-09-26 16:40:18 UTC
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
Comment 6 Richard Gregor 2002-10-01 08:59:11 UTC
*** Issue 26010 has been marked as a duplicate of this issue. ***
Comment 7 Jesse Glick 2002-12-23 16:36:02 UTC
Consistent use of the I18N keyword.
Comment 8 Ken Frank 2003-01-29 21:32:32 UTC
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
Comment 9 Richard Gregor 2003-02-21 08:00:20 UTC
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.
Comment 10 Jesse Glick 2003-02-21 15:55:48 UTC
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.
Comment 11 Jesse Glick 2003-02-21 15:56:37 UTC
Created attachment 9078 [details]
Possible patch
Comment 12 Jesse Glick 2003-02-21 15:58:11 UTC
BTW this is an RFE, not a bug - the tips *are* localizable as they
stand. The request is just to make it easier.
Comment 13 Richard Gregor 2003-02-24 09:20:05 UTC
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
Comment 14 Keiichi Oono 2003-05-19 10:55:59 UTC
Verified at NetBeans 3.5 RC1.
Thank you very much for your enhancement.

Keiichi