Autore Topic: Nuova funzionalità sperimentale nella rev. #5964  (Letto 279 volte)

Offline vuott

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 11.264
  • Ne mors quidem nos iunget
    • Mostra profilo
Nuova funzionalità sperimentale nella rev. #5964
« il: 18 Novembre 2013, 02:08:58 »
Vi riporto questo messaggio di Minisini apparso nella M.L. ufficiale:


" 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
"
« Chiunque, non ricorrendo lo stato di necessità, nel proprio progetto Gambas fa uso delle istruzioni Shell o Exec, è punito con la sanzione pecuniaria da euro 20,00 a euro 60,00. »

Offline vuott

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 11.264
  • Ne mors quidem nos iunget
    • Mostra profilo
Re: Nuova funzionalità sperimentale nella rev. #5964
« Risposta #1 il: 18 Novembre 2013, 17:35:49 »
...continua...


" And if the traducer want to change the shortcut letter position ?

Fabien Bodard
"
« Chiunque, non ricorrendo lo stato di necessità, nel proprio progetto Gambas fa uso delle istruzioni Shell o Exec, è punito con la sanzione pecuniaria da euro 20,00 a euro 60,00. »