Menuclass localization hook: also empty result

AmigaOS users can make feature requests in this forum.
blmara
Posts: 76
Joined: Thu Jun 23, 2011 9:03 am
Location: Vantaa, Finland

Menuclass localization hook: also empty result

Post by blmara »

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
Marko
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Menuclass localization hook: also empty result

Post by nbache »

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.
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.

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
User avatar
OldFart
Posts: 100
Joined: Tue Jul 12, 2011 2:56 pm
Location: Groningen, Netherlands

Re: Menuclass localization hook: also empty result

Post by OldFart »

@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
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
User avatar
trixie
Posts: 409
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: Menuclass localization hook: also empty result

Post by trixie »

@nbache
nbache wrote:In general, menu shortcut keys should never be changed when translating.
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.
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?
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
User avatar
trixie
Posts: 409
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: Menuclass localization hook: also empty result

Post by trixie »

@OldFart
Is there a list available with 'preferred shortcuts'?
See here:
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
blmara
Posts: 76
Joined: Thu Jun 23, 2011 9:03 am
Location: Vantaa, Finland

Re: Menuclass localization hook: also empty result

Post by blmara »

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
Reasonable explanation. I can live with it.

Marko
Marko
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Menuclass localization hook: also empty result

Post by nbache »

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.
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.
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?
Sounds like a very good idea.

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Menuclass localization hook: also empty result

Post by nbache »

trixie wrote:But the list is rather basic, it doesn't specify the preferred shortcut for "About" (most programs use RAmiga + ?) or "Iconify".
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.
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.
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.

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Menuclass localization hook: also empty result

Post by nbache »

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.
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.

Best regards,

Niels
User avatar
trixie
Posts: 409
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: Menuclass localization hook: also empty result

Post by trixie »

@nbache

Updated the Keyboard chapter of the Style Guide:
http://wiki.amigaos.net/wiki/UI_Style_Guide_Keyboard
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.
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.
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
Post Reply