Helping translators by putting widget's text into clipboard

Nick Shaforostoff shaforostoff at
Wed Sep 10 23:40:56 BST 2008

2008/9/11 Albert Astals Cid <aacid at>:
> A Dimecres 10 Setembre 2008, Nick Shaforostoff va escriure:
>> I'd like to reimplement QApplication::x11EventFilter in KApplication
>> to detect some special action (e.g. middle mouse button double
>> clicking), then, if the widget under the mouse (via qwidget::find())
>> is qlabel, qmenu, qbutton, qcheckbox etc, put it's text into clipboard
>> and (optionaly) run some qprocess (defined in hidden config property -
>> for example run lokalize and try to find this message).
>> This hack will only be enabled when e.g. --clicktocopy option is specified.
>> of course this won't work for special cases like %1 substituions, but
>> still i believe this would ease translator's life a lot - bacause this
>> way he/she knows the context of the message so can translate it better
>> (higher quality)
>> ok for me to proceed?
> Seems quite a big and ugly hack to have in KApplication imho.
The common case overhead is checking one bool variable on each X event
and additional commandline option. This is really small overhead. And
when --clicktocopy is on - this is certainly faster then typing text

> It's that difficult to read and write that our translators need this?
> Have you had any input asking for this?
> I've not seen anything in kde-i18n-doc but i'm a bit slow lately :-/
Well yes, I got this request in early days when I just started to work
on KAider(Lokalize).

Imagine you're translating app and have to switch back and forth
between the app and lokalize, hit ctrl+f and type each message. at
least i'd definitely like to have it for myself.

I'm CC'ing kde-i18n-doc@ to have community input.

More information about the kde-core-devel mailing list