[Gambas-user] New experimental feature in revision #5964
Fabien Bodard
gambas.fr at ...626...
Mon Nov 18 15:08:34 CET 2013
And if the traducer want to change the shortcut letter position ?
2013/11/18 Benoît Minisini <gambas at ...1...>:
> Hi,
>
> In revision #5964, I added an experimental feature that may break your
> projects, so read carefully:
>
> As I found stupid to translate the strings "&Open file", "Open file",
> "Open file..." in menus, buttons and equivalent controls, now the IDE
> automatically remove the "..." and the "&" from the translated strings,
> so that only the "Open file" string has to be translated.
>
> Moreover, now, opening a popup menu automatically assigns underscore
> shortcuts to menu entries not having one, so you don't have to define
> them anymore.
>
> I have now about 7% less strings to translate in the IDE. I updated all
> the translations so that normally no translation has been lost.
>
> Of course, all that is based on little tricks:
>
> - A new Shortcut class defined in the gb.gui.base class that is used by
> the IDE to remove "underscore" shortcuts from the translated string, and
> add it back after the string has been translated (if possible!).
>
> - Some Gambas code called in the gb.gui.base components by the Menu
> class to automatically assign underscore shorcuts.
>
> - A new hidden _Text property in the Menu class to remember the original
> Text value so that automatically assigned shortcuts are not visible to
> the Gambas code. Of course, don't use that property for your own needs!
>
> I added a "Update all forms" entry in the "Tools" menu, so that you can
> update your project in one shot. If you use it, you will lose
> translations! But you can recover them by using the "Import" feature of
> the translation dialog that you will run on the original *.po files that
> you will find in the project backup you had carefully done. Did you?
>
> So, save your projects carefully, and tell me if you encounter problems
> with that new feature...
>
> Only the IDE and one example have been updated at the moment.
>
> Regards,
>
> --
> Benoît Minisini
>
> ------------------------------------------------------------------------------
> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
> Free app hosting. Or install the open source package on any LAMP server.
> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fabien Bodard
More information about the User
mailing list