[Gambas-devel] Question about translation

Benoit Minisini gambas at ...1...
Sun Mar 23 17:20:13 CET 2008


On dimanche 23 mars 2008, Robert Rowe wrote:
> A while back I pulled the hot key definitions out of the tooltips of the
> editor buttons because it broke the translation. You later taught me
> that including a string in braces would allow the string to be
> translated. If I assigned the tooltips in code and used braces would
> this be translation safe? I think that this would go a long way toward
> making gambas easier to use and I'd really like to implement it but I
> don't want to endanger translation.
>
> Robert Rowe
>

It will work, but I want to do that in different way:

As you may have noticed, many controls have an "Action" property, that is a 
string. The goal of this property is to group all controls (button, toolbar 
buttons, menus) that can run the same action.

The actions are accessed through the Action class. Each action have properties 
that are applied to each control associated with the action.

For example, Action["push"].Visible = FALSE will hide all the controls 
associated with the "push" action.

I want to add a "Shortcut" property, and when setting this property, the 
tooltips of the associated controls would be automatically set with the 
tooltip string and the shortcut string between braces. The shortcut are a 
string that can be translated too, so that different languages can have 
different defautl shortcuts!

Then I want to add to the IDE an "action editor", like the "menu editor", so 
that you don't have to define action properties by code.

Then I want to have in the gb.form component (or another one) a dialog that 
let the user defines its own shortcut for the program.

People live with fixed shortcuts since the first version of Gambas. They can 
wait for the 3.0 version. :-)

Regards,

-- 
Benoit Minisini




More information about the Devel mailing list