Accelerators missing from dialogs in KDE 4.3

Albert Astals Cid aacid at kde.org
Mon Jul 27 20:45:47 BST 2009


A Dilluns, 27 de juliol de 2009, Stephan Kulow va escriure:
> Am Samstag 25 Juli 2009 schrieb Albert Astals Cid:
> > A Dimarts, 7 de juliol de 2009, Stephan Kulow va escriure:
> > > Am Montag 29 Juni 2009 schrieb Albert Astals Cid:
> > > > A Dilluns, 29 de juny de 2009, Andreas Pakulat va escriure:
> > > > > On 29.06.09 12:19:18, David Faure wrote:
> > > > > > On Friday 05 June 2009, Andreas Pakulat wrote:
> > > > > > > Apart from that this is actually not the purpose (and never has
> > > > > > > been) of KAcceleratorManager - at least not in the way it used
> > > > > > > right now. The purpose was to use this during development to
> > > > > > > easily find good accelerator keys and then assign them in
> > > > > > > code/ui files.
> > > > > >
> > > > > > Did coolo confirm that? Because it doesn't match what I remember
> > > > > > from kde3 times. I distinctly remember that the goal was to have
> > > > > > it done automatically when no accels were specified by the app
> > > > > > developer explicitely.
> > > > >
> > > > > Well, that was what I gathered from the commits and source code,
> > > > > when it was broken some time ago and fixed by Albert. There's a
> > > > > comment in the code that activates the auto-assignment that
> > > > > suggests it wasn't meant to be used during runtime, but during
> > > > > development to find good accelerators.
> > > > >
> > > > > Can't find the commits easily at the moment and neither remember
> > > > > the code file where the comment was.
> > > >
> > > > Stephan, can you clarify if the goal for KAcceleratorManager
> > > > automatic accelerator assignment was:
> > > >  a) have it done automatically when no accels were specified by the
> > > > app developer explicitely and so should be always enabled
> > > >  b) have a translators/developers tool but KAcceleratorManager
> > > > automatic accelerator assignment should be generally disabled
> > >
> > > Hi Albert,
> > >
> > > The assignment should be done automatically as history proved that it's
> > > impossible for a developer and even less possible for a translator to
> > > pick accelerators that do not clash all the time. So my goal was to
> > > remove the accelerators from the code in general and only leave those
> > > that are really essential to the user, e.g. always have them on
> > > standard actions and assign the free letters by an algorithm.
> >
> > Ok, so we can see here that Coolo's intention was to remove accelerators
> > altogether from code and let KAcceleratorManager manage everything.
> >
> > From the i18n point of view not having accelerators in strings to
> > translate is not good as non latin1 languages like Japanese do things
> > like
> >
> > msgid "&Source:"
> > msgstr "ソース(&S):"
> >
> > And without the & marker they can't know if they have to add one.
> >
> > So having automatic accelerator assignment is good for developers and
> > latin1 users but not for the broad i18n community.
> >
> > So I see three possibilities here:
> >  a) Always use automatic accelerator assignment and ignore the i18n
> > problem b) Try to add as much accelerators in code as possible but leave
> > the automatic accelerator enabled so that it somehow works if the
> > developer is not careful enough
> >  c) Disable the automatic accelerator altogether and force developers to
> > put correct accelerators
> >
> > I'm on b) because c) is asking for the impossible.
>
> d) use dummy accelators in code to mark the string to be translated into
> (&X) by !latin languages and change the automatic acclerator to translate
> '(&X)' into '(&<fitting letter)'
>
> Then what you ask from the programmers is simple, what you ask from the
> "latin translators" is simple (either leave it out completly or use dummy
> as well) and what you ask from !latin translators is possible too.
>
> The only challenge left is how to mark dummy so that the automatic will
> know. I would suggest pick the last letter in the word - this is so unusual
> that it's a good choice to mark.

What's the benefit of a dummy marker over a correctly positioned marked?

Albert

>
> Greetings, Stephan





More information about the kde-core-devel mailing list