Hi,
along with the new SDK we got the possibility to use the new menu class to implement application menus. This seems to be very powerful and flexible tool compared to the traditional menu routines. Especially handy is the feature of dynamic menu localization using the MenuStringMessage and the associated hook. But, both according to the SDK Wiki http://wiki.amigaos.net/wiki/Intuition_Menu_Class article and my testing, it seems to be impossible to give NULL translation to menu item keyboard shortcut. This is always shown as "????" in the place of shortcut in the menu. For the future menuclass version it would be nice to be able to choose not to have the menu shortcut in the catalog translation level. Of course, the programmer can leave the MA_Key attribute away and make the decision for all languages.
Marko
Menuclass localization hook: also empty result
- nbache
- Beta Tester
- Posts: 1716
- Joined: Mon Dec 20, 2010 7:25 pm
- Location: Copenhagen, Denmark
- Contact:
Re: Menuclass localization hook: also empty result
In general, menu shortcut keys should never be changed when translating. So there is no good reason to set a menu shortcut key, which was present in the original, to null in a translation.blmara wrote:it seems to be impossible to give NULL translation to menu item keyboard shortcut. This is always shown as "????" in the place of shortcut in the menu. For the future menuclass version it would be nice to be able to choose not to have the menu shortcut in the catalog translation level. Of course, the programmer can leave the MA_Key attribute away and make the decision for all languages.
The reason you should not change the menu shortcut keys is one of safety. If a user has learnt the shortcuts (s)he uses most, and maybe one day uses a machine with a different locale, it would be potentially dangerous to have a well-known shortcut take on a different meaning. Imagine you wanted to print, but R-Amiga P suddenly means Delete. And remember, you can't see the menu shortcuts when you use them. Only when you don't (i.e. you open the actual menu).
I don't know if that is the reason for not making it possible in the menu class, but it makes sense to me.
Best regards,
Niels
Re: Menuclass localization hook: also empty result
@nbache
Is there a list available with 'preferred shortcuts'? Like these ones used in virtually all textrelated software: RAmiga+C = Copy, RAmiga+X = Cut and RAmiga+V = Insert (or is it: Amiga+C = Copy, Amiga+X = Cut and Amiga+V = Insert)? Some programs use a plethora of shortcuts and mostly nobody knows/remembers or even cares about. The risk with such wildgrowth in shortcuts is the one you described: the hazardous potential inflicted by the difference of meaning although not within the same program but between programs.
I would not mind having some form of 'automated' shortcut generation, say by prefixing the character with an underscore.
On a side note: there seems to be a number of shortcuts for Workbench, but however hard I tried to document them, I never got far as every now and again someone comes up with another one previously unheard of.
OldFart
Is there a list available with 'preferred shortcuts'? Like these ones used in virtually all textrelated software: RAmiga+C = Copy, RAmiga+X = Cut and RAmiga+V = Insert (or is it: Amiga+C = Copy, Amiga+X = Cut and Amiga+V = Insert)? Some programs use a plethora of shortcuts and mostly nobody knows/remembers or even cares about. The risk with such wildgrowth in shortcuts is the one you described: the hazardous potential inflicted by the difference of meaning although not within the same program but between programs.
I would not mind having some form of 'automated' shortcut generation, say by prefixing the character with an underscore.
On a side note: there seems to be a number of shortcuts for Workbench, but however hard I tried to document them, I never got far as every now and again someone comes up with another one previously unheard of.
OldFart
X5000, appears to be sick. Dismantled jan 1, 2024.
Dead MicroA1
A1200 in ElBox, c/w Blizzard '040 @ 50MHz + SCSI module, ZIV-board c/w (o.a.) cv64/3d + flickerdoubler + FastATA-ZIV + Lots of SCSI gear, sitting idle.
RaspBerry Pi 2B, 3B, 4B/4Gb, 4B/8Gb
OrangePi 5+ 8Gb
ACER Windows 10
Dead MicroA1
A1200 in ElBox, c/w Blizzard '040 @ 50MHz + SCSI module, ZIV-board c/w (o.a.) cv64/3d + flickerdoubler + FastATA-ZIV + Lots of SCSI gear, sitting idle.
RaspBerry Pi 2B, 3B, 4B/4Gb, 4B/8Gb
OrangePi 5+ 8Gb
ACER Windows 10
Re: Menuclass localization hook: also empty result
@nbache
The confusion about this may originate - surprise, surprise! - from the Amiga User Interface Style Guide, which (in the Application Keyboard Shortcuts / Menus section) reads the following:nbache wrote:In general, menu shortcut keys should never be changed when translating.
Perhaps the sentence I've marked in bold above should be removed in the respective wiki page? And an explicit note about not localizing keyboard shortcuts should be added?Use a Right-Amiga combination as the default keyboard shortcut for a menu item. Here is a list of the defaults in the English language for an application that has standard menus. This should be localized to the language at hand for non-English applications.
The Rear Window blog
AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Re: Menuclass localization hook: also empty result
@OldFart
http://wiki.amigaos.net/wiki/UI_Style_G ... oard#Menus
But the list is rather basic, it doesn't specify the preferred shortcut for "About" (most programs use RAmiga + ?) or "Iconify". Plus, the RAmiga + A combination for "Save As" is IMHO very debatable because the shortcut should normally be used for a "Select All / Mark All"-type operation, as is the convention on other systems.
Edit: added RAmiga + ? to the list in the wiki.
See here:Is there a list available with 'preferred shortcuts'?
http://wiki.amigaos.net/wiki/UI_Style_G ... oard#Menus
But the list is rather basic, it doesn't specify the preferred shortcut for "About" (most programs use RAmiga + ?) or "Iconify". Plus, the RAmiga + A combination for "Save As" is IMHO very debatable because the shortcut should normally be used for a "Select All / Mark All"-type operation, as is the convention on other systems.
Edit: added RAmiga + ? to the list in the wiki.
Last edited by trixie on Sun Sep 13, 2015 9:39 am, edited 1 time in total.
The Rear Window blog
AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Re: Menuclass localization hook: also empty result
Reasonable explanation. I can live with it.nbache wrote:...
The reason you should not change the menu shortcut keys is one of safety. If a user has learnt the shortcuts (s)he uses most, and maybe one day uses a machine with a different locale, it would be potentially dangerous to have a well-known shortcut take on a different meaning. Imagine you wanted to print, but R-Amiga P suddenly means Delete. And remember, you can't see the menu shortcuts when you use them. Only when you don't (i.e. you open the actual menu).
I don't know if that is the reason for not making it possible in the menu class, but it makes sense to me.
Best regards,
Niels
Marko
Marko
- nbache
- Beta Tester
- Posts: 1716
- Joined: Mon Dec 20, 2010 7:25 pm
- Location: Copenhagen, Denmark
- Contact:
Re: Menuclass localization hook: also empty result
Yes, this is actually a very unfortunate suggestion. I guess they simply hadn't thought through the potential consequences back when it was written. The debate which originally alerted me to the problem took place within ATO (back in the late nineties I think), and we ended up making it a standard, at least in the Danish department, but I think also in others.trixie wrote:The confusion about this may originate - surprise, surprise! - from the Amiga User Interface Style Guide, which (in the Application Keyboard Shortcuts / Menus section) reads the following:Use a Right-Amiga combination as the default keyboard shortcut for a menu item. Here is a list of the defaults in the English language for an application that has standard menus. This should be localized to the language at hand for non-English applications.
Sounds like a very good idea.Perhaps the sentence I've marked in bold above should be removed in the respective wiki page? And an explicit note about not localizing keyboard shortcuts should be added?
Best regards,
Niels
- nbache
- Beta Tester
- Posts: 1716
- Joined: Mon Dec 20, 2010 7:25 pm
- Location: Copenhagen, Denmark
- Contact:
Re: Menuclass localization hook: also empty result
True. Iconification wasn't really a common feature back then, though, I think it was MUI which made it so later on. The About box has been a standard from the start, I believe, but maybe not giving it a shortcut. The question mark is definitely a de facto standard by now which ought to be canonized.trixie wrote:But the list is rather basic, it doesn't specify the preferred shortcut for "About" (most programs use RAmiga + ?) or "Iconify".
True, but unfortunately it is already in very common use in Amiga programs - old as well as newer - as "Save as". It probably wouldn't be a good idea to change it now.Plus, the RAmiga + A combination for "Save As" is IMHO very debatable because the shortcut should normally be used for a "Select All / Mark All"-type operation, as is the convention on other systems.
Best regards,
Niels
- nbache
- Beta Tester
- Posts: 1716
- Joined: Mon Dec 20, 2010 7:25 pm
- Location: Copenhagen, Denmark
- Contact:
Re: Menuclass localization hook: also empty result
I believe we got most of them covered in Workbench.guide - available by clicking your big friendly WBHelp lightbulb in AmiDock . Check out section III.OldFart wrote:On a side note: there seems to be a number of shortcuts for Workbench, but however hard I tried to document them, I never got far as every now and again someone comes up with another one previously unheard of.
Best regards,
Niels
Re: Menuclass localization hook: also empty result
@nbache
Updated the Keyboard chapter of the Style Guide:
http://wiki.amigaos.net/wiki/UI_Style_Guide_Keyboard
Updated the Keyboard chapter of the Style Guide:
http://wiki.amigaos.net/wiki/UI_Style_Guide_Keyboard
Fortunately, not all Amiga programs need to implement "Select/mark all". But if I were to write, for example, a text editor I'd use "RAmiga-A" for "Select all text" (to stay in line with the convention in other OSes) and leave the "Save as" menu item with no shortcut.True, but unfortunately it is already in very common use in Amiga programs - old as well as newer - as "Save as". It probably wouldn't be a good idea to change it now.
The Rear Window blog
AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition