Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

Pressing Alt underlines English capital letters even in localized words

Open gril002 opened this issue 9 years ago • 2 comments

javaw_2017-10-12_17-42-42 javaw_2017-10-12_17-43-01

As the title suggests when you press Alt in the editor it underlines the English capital letters not the local ones. This is true in Arduino IDE 1.8.4 and 1.9

gril002 avatar Oct 12 '17 15:10 gril002

The effort is probably feasible but it involves preparing another bunch of (uncorrelated) translation for the mnemonics (if i understood well the content of this tutorial http://uic.sourceforge.net/tutorials/i18n/). Adding "Help needed" tag.

facchinm avatar Oct 17 '17 16:10 facchinm

Never mind, it appears that it's quite easy :smile:

for example:

-    fileMenu.setMnemonic(KeyEvent.VK_F);
+    fileMenu.setMnemonic(trm("File"));

with trm defined as

  public static int trm(String s) {
          try {
             if (i18n == null)
               return s.charAt(0);
             else
               return i18n.getString(s).charAt(0);
           } catch (MissingResourceException e) {
               return s.charAt(0);
          }
  }  

The Help tag is still there if someone wants to speedup the effort and prepare a PR with the converted mnemonics.

facchinm avatar Oct 17 '17 17:10 facchinm