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.
In welcome window, not all labels/text come from html or bundle files within welcome.jar Richard mentioned that the third column is from gifs instead, but for ffj localization, this information would need to be in bundle or html files. Also, some of the links under help do not show fully when pseudo translated - that is, their window does not resize to fit; user should not need to resize in other locale if the window shows fully in C locale. (image will be attached - please note, not all parts have multibyte since I just pseudo localzied a few parts of welcome window for testing)
Created attachment 7315 [details] shows welcome window
reassigning to the UI team
Created attachment 8387 [details] proposed patch
I also found out that "Next" button (in Tips section) is not localized at all. The proposed patch fixes these two issues for me - for 3.4.1 RC + Russian L10N: - GIF files for Customizing, Help, Tips are searched with locale in mind. - Next button under tips takes its label from the Bundle. Please, verify.
Adding 3.4.1_CANDIDATE keyword, I'd like this be included in Merak RC2 (approx 3rd January) Please verify the proposed patch soon ;-)
Created attachment 8388 [details] proposed patch 3/3
proposed patch 3/3 additionally resises Help section, so now the solved issues are: - Unresizable Help section - Unlocalizable "Customizing", "Help" and "Tips" images - Unlocalizable "Next" button. Please, verify/review.
Had a few questions about solutions to this issue -- - I'd heard that welcome window will be completely redesigned -- is this solution that redesign ? - Will any gifs have any text as part of it, that would need to be localized ? If so, this is not a good solution for our s1s localization as we are not now localizing gifs - Does this solution not require changes to the welcome.jar html files to point to names of localized gifs, ie xx_ja.gif -- other parts of netbeans or s1s do not require this and find gifs from locale without special changes. - Is this change to be for the netbeans that nevada or dublin s1s is based on ? ken.frank@sun.com
Ken, quick answer is _no_: - this is _not_ a redesign, this is a quick bugfix of this specific issue, which states that Welcome window is not localizable at all. - no, those gif-s with text on them were not removed, I just gave a solution (tested with Russian l10n) to localize these .gifs - no, this solution still requires renaming all used .gifs to _locale.gif - I'm not aware what Dublin or Nevada mean ;-), I may say that my intent to include this bugfix into Merak (nb3.4.1), solely for the purpose of Russian l10n. I'm pro complete redesign, but it must be done by UI people, not by me myself, I just want to be sure that Russian l10n works, and this fix gives such an opportunity. I'm heading Netbeans _volunteer_ translation team: http://translatedfiles.netbeans.org
I am not sure that the patch here is actually addressing the filed issue. Perhaps it should be filed separately. There are too many things mentioned in this issue: 1. Unlocalized labels and text (apparently fixed by patch) 2. GIFs used rather than text, harder to localize (not fixed by patch) 3. Links do not resize properly (fixed by patch?) Ken next time please file one issue per problem to avoid confusion. Ken writes: "Will any gifs have any text as part of it, that would need to be localized ? If so, this is not a good solution for our s1s localization as we are not now localizing gifs" - this seems unwarranted. Maxym's patch is just making it *possible* to localize them. If you don't want to localize them, don't localize them. BTW you filed a P2 DEFECT for me to make all action icons localizable by default, which I implemented... Maxym writes: "no, this solution still requires renaming all used .gifs to _locale.gif" - maybe a misunderstanding; the patch just does a localized lookup, so if there are no localized variants, there is no need to change existing filenames, so don't worry. Re. the patch, some minor requests: 1. In ControlPanel, as far as the icons go, a little nicer to patch both .java and .form; and rather than overriding the non-I18N icon after calling initComponents, do it directly (custom code option for icon property) in the form editor. Will make things cleaner for the next person working on the form using the form editor. 2. In TipPanel, please use NbBundle.getBundle (or .getMessage) rather than ResourceBundle.getBundle; makes things brandable. 3. A couple uses of ResourceBundle.getBundle in ControlPanel.{java,form} ought to be fixed, too; when using the form editor, just set the replacement string option to be the kind using NbBundle (this is a predefined setting for convenience of NB module developers). Otherwise looks fine. Maxym it is probably best to make the fix in the trunk so it can be sanity-checked in some dev build. You checked that the fix is sufficient for Russian localization, I am guessing.
2Jesse: ------- 1 -------------- When .html file contains images, e.g. welcome.html contains new.gif, then when I localize welcome.html, for some unknown reason the image is not displayed (see attached screenshop), so I have to rename new.gif -> new_ru.gif and change the <IMG> tag to use new_ru.fig instead of new.gif in my welcome_ru.gif. I dunno why this happens, maybe because images should belong to the same .jar as .html ? ---------- 2 --------------- What's "custom code option" for icon editor? I didn't find it.
> 3. A couple uses of ResourceBundle.getBundle in > ControlPanel.{java,form} ought to be fixed, too; Jesse, File separate issue, please ;-) > when using the form editor, just set the replacement > string option to be the kind using NbBundle (this > is a predefined setting for convenience of NB > module developers). Ahm, predefined where :-? (for dummies, please) Tools->Options->...
"When .html file contains images, e.g. welcome.html contains new.gif, then when I localize welcome.html, for some unknown reason the image is not displayed" - ah yes, now that I look at the code for ContentPanel, it needs some rewriting. The constructor takes some resource path and then tries to append a language string, then fall back on something else, etc... much too complicated and not really correct. All it needs to do is make a URL of the form "nbresloc:/org/netbeans/modules/welcome/pages/welcome.html" (or welcome_1_3.html or welcome_1_3_lin.html as appropriate) and set that as the URL for the editor pane. This will: 1. Be simpler and easier to read. 2. Work correctly for country & region variants of languages. 3. Work correctly with branding. 4. Not require images to be copied when doing a localized version of a page. So please fix it that way. Same for HelpPanel. "What's "custom code option" for icon editor?" - in the form editor, when setting the 'icon' property for a label, press "..." and select the Advanced button (or something like this) and type in your custom code to use NbBundle.getLocalizedFile. More easily, I think the standard icon editor in the form editor lets you type in a URL; just use a URL of the form "nbresloc:/org/..../welcome/whatever.gif" and it will automatically be localizable. "set the replacement string option to be the kind using NbBundle" - "Internationalization" settings in Options, "I18n String Format" should be: org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}"); Since you're not the original developer of this code, I would recommend waiting for someone more familiar with it to check over your proposed diff before applying it to 3.4.1...depends on how comfortable you are patching it yourself. Note that most Sun employees working on NB have been on vacation for at least a week and will be on vacation until early January, so if you want any help on RC2, this is not a good time.
Created attachment 8417 [details] change to nbresloc use already commited into trunk
Created attachment 8418 [details] unlocalizable images(Customizing,Help,Tips) replaced by new ControlLabel component with text from bundle - patch already in trunk
Richard, thanks a lot, have you commited it into 4.0dev ? I'll look through and integrate it into release341 branch tomorrow. (curr. working on issue 29585).
I'd like to comply with Jesse's suggestion below that separate issues be filed since the original description spoke of more than one situation. Richard and Maxym, based on fixing already done that will be or already are in trunk, are there any other parts of this issue that could need to be filed as separate issues ? (I think UI group doing redesign of welcome window but don't know if an issue has been filed on that task) And a separate question on todays fix using ControlLabel component with text from bundle -- does this fix take care of all welcome window related images, or just those 3 mentioned ? (so that changing names of image files in html file and creation of xx_ja.gif still would be needed for now ?) Thanks - Ken
Maxym, my patches are in trunk. Ken, it is true that core(performance) and HIE think about welcome redesign and I agree that it is necessary. So far, we don't know final decision. ControlLabel component fixes problem with 3 mentioned labels. Using nbresloc fixes problem with the rest of images. So, we don't need to create xx_ja.gifs. It hink here is not more issues to solve so I'm signing this issue as fixed.
I think these are the only CVS logs about Richard's commits: http://ui.netbeans.org/servlets/ReadMsg?msgId=438250&listName=cvs http://ui.netbeans.org/servlets/ReadMsg?msgId=438297&listName=cvs I'll commit the changes to release341 branch too
Patch to TipPanel.java is not applicable to release341 branch of TipPanel. http://ui.netbeans.org/source/browse/ui/welcome/src/org/netbeans/modules/welcome/TipPanel.java.diff?r1=1.16&r2=1.17&f=c So I wander, should I merge the trunk version changes to release341 branch? There're some minor bugfixes there...
From my point of view you can do it.R.
The issue backported to release341 branch CVS logs: http://ui.netbeans.org/servlets/ReadMsg?msgId=438878&listName=cvs http://ui.netbeans.org/servlets/ReadMsg?msgId=438879&listName=cvs
oops, forgot to commit in the new Bundle.properties. Thanks to continious build & Richard Gregor for discovering that! Commit log: Checking in org/netbeans/modules/welcome/Bundle.properties; new revision: 1.8.4.1.4.1; previous revision: 1.8.4.1
will verify though I think welcome window has had redesign since this time anyway. ken.frank@sun.com