On Sun, 2010-10-03 at 12:59 +0000, Alan Campbell wrote:
> One of uses of an underscore is to pick out the shortcut character in 
> a menu item:
> (script-fu-register  "wrdhb_create_half_blind_dovetail"
>   "_Half blind dovetail..."   ;menu label
>   "Create Template for Half blind Dovetail" 
> ....
> )
> There also appears to be
> (script-fu-register  "wrdhb_create_half_blind_dovetail"
>   _"Half blind dovetail..."   ;menu label
> ...
> )
> whch I gather has something to do with translation: I assume it would 
> have no effect in this particular case because it's sadly 
> unreasonable to expect translation dictionaries (po files??) to know 
> "blind" or "dovetail".  That so?

If you want your scripts to be translated, then you need to put your
scripts into a separate translation domain and ship the translations
with them. You can of course not expect the strings from your scripts to
be part of the standard script-fu translation domain.

> Also, I've been using this style of getting a script registered for 
> use in create menu:
> (script-fu-menu-register "wrdhb_create_template_half_blind_dovetail" 
> "<Image>/File/Create/Woodrat")
> (a)  Can I combine the two, putting path in second parameter of 
> script-fu-register?

Using a path in the script-fu-register call is deprecated. Please use

> (b) Is there anyway of getting a letter of the submenu "Woodrat" to 
> be a shortcut key?  I've tried variations of underscore in the 
> "<Image>/File/Create/Woodrat" parameter, doesn't work.

You need to explicitly create the submenu using
gimp-plugin-menu-branch-register. This procedure should accept mnemonics
marked with an underscore.


Gimp-user mailing list

Reply via email to