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 - mnemonic key doesn't work with translated. | ||
---|---|---|---|
Product: | nblocalization | Reporter: | Hiroshi Nakatsubo <hn131207> |
Component: | Code | Assignee: | Hiroshi Nakatsubo <hn131207> |
Status: | CLOSED WORKSFORME | ||
Severity: | blocker | CC: | jf4jbug, mbudris, mpetras, pkuzel |
Priority: | P2 | Keywords: | A11Y, I18N |
Version: | 3.x | ||
Hardware: | Sun | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Image1.gif
Image2.gif Image3.gif Image1(Select).gif Image2(Filesystem).gif Image3(ReplaceCodeFormat).gif |
Description
Hiroshi Nakatsubo
2002-01-11 12:19:22 UTC
Created attachment 4102 [details]
Image1.gif
Created attachment 4103 [details]
Image2.gif
Created attachment 4104 [details]
Image3.gif
Resource Bundle editor is from i18n module... Case 1, 2 is caused by OpenIDE bug. x I think I don't understand where the bug is..what you mean by saying "mnemonic has stopped moving"? Do you mean that after pressing mnemonic key, nothing hapenned? Would you check if the first character is not used as mnemonic key? By localization, the first character becomes no-ascii character. As a result, the mnemonic key doesn't work by localization. To fix this problem, we need to set two resource bundle messages, one is for caption, another is for mnemonic. Example=TestString Example_Mnemonic=T And we should use like this: myButton.setText(myBundle.getString("Example")); myButton.setMnemonic(myBundle.getString("Example_Mnemonic").charAt(0). I guess other many objects are implemented like above. The following line does not work with localized version, because the first character is not an alphanumeric because it's replaced to multi-byte Japanese character. myButton.setMnemonic(myResourceBundle.getString("Example").charAt(0)); It is not corrected now, either. Again,Please see attched image file. Mnemonic Keys which was mistaken on the Japanese is attached. [case1] ---Image1(Select).gif [case2] ---Image2(Filesystem).gif [case3] ---Image3(ReplaceCodeFormat).gif OS:Solaris 5.8 Orion Build:orion_ml_020519 JDK:JDK1.4.0 locale:ja Created attachment 5867 [details]
Image1(Select).gif
Created attachment 5868 [details]
Image2(Filesystem).gif
Created attachment 5869 [details]
Image3(ReplaceCodeFormat).gif
Please refer to this page. http://ministop.japan/Products/Forte/ffj-qa-i18n/docs/misc/mnemonic.html yes, now I think I understand, I'll try to figure out... Passing back to i18n module. P. Kuzel is wrong - there is no openide bug, Petr can you explain? Here is what is needed to fix the bug: 1) add '&' mnemonic markers to the labels of filesystem combo boxes in dialogs in english bundles. I already did it in main trunk (i18n.Bundle.properties) 2) synchronize japanese bundle BundleKey=<japanese text which means label of fs combo>(&<mnemonic key>) Hope it's clear now. There are tens of similar reports related to NodeOperation's dialogs. I have wrongly routed the first bunch of them to OpenIDE. Passing to translated files because it is localization bug. Set target milestone to TBD putting as P2 since A11Y issue and needs to be fixed for next S1S release. But why is this in translated files section - the issue reported was an i18n one and not a localization one, and its not about any localization being done of netbeans -- so wouldn't this one belong in some other module ? Thanks - Ken ken.frank@sun.com It's localization issue, localized text must contain '&' to highlight mnemonics. Just clarifying, I think that part of fix will be to add the & to lines that do not have it -- the localization activities does not do this; other similar issues that have '&' used as mnemonic that did not have '&' there, have had it added by development. ken.frank@sun.com Do you mean that development have to explicitly add '&' marks to default characters (first nonconflicting one it none is marked by '&'). i.e. a Bundle.properties: PROP_node_select_1=&Filesystem PROP_aux=F&antasy instead of PROP_node_select_1=Filesystem PROP_aux-Fantasy Marian could you update i18n policy to mention this? Yes, there needs to be '&' in any mnemonics assigned using this approach (vs the 2 key/val approach). This is because, if there is no '&', the first character of the value is used, which, in a localized release, will be a multibyte character and is not what is intended; they want to use same assigned mnemonics as base product. I'll send separate doc explaining this to you in case it is helpful for i18n policy doc. ken.frank@sun.com I looked again and trunk code is already properly i18n-ed including mnemonics. I will update the I18N policy as soon as I get permission to do so. Hello, I found that, this issue is no longer re-appeared by suitable translation. Therefore, I agree with current specs. But, this may be re-appeared in l10n works into other language, in nearly future. And I hope that, all developers put "&" which shows mnemonic in the string, even if mnemonic is an initial character of the string. Then, all translators can understand that exists of mnemonic. Thank you - Hiroshi. closed. And I've verified, '&' sign was inserted suitably in "Bundle.properies". Therefore, this issue will never re-appear. Thank you all !! Hiroshi. |