[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: Helping translators by putting widget's text into clipboard
From:       Burkhard =?utf-8?q?L=C3=BCck?= <lueck () hube-lueck ! de>
Date:       2008-09-11 8:09:49
Message-ID: 200809111009.50600.lueck () hube-lueck ! de
[Download RAW message or body]

Am Donnerstag 11 September 2008 00:40:56 schrieb Nick Shaforostoff:
> 2008/9/11 Albert Astals Cid <aacid@kde.org>:
> > 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, 

This should work also for caption, whatsthis, tooltip..., every visible 
string, which has to be translated or can be used writing docs.
 
> >> 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.
> >>
This is an option for the application?
There should be two copy modes, on with accellerator ("&") eg MMB, and one 
without eg Ctrl+MMB.

> >> 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
> manually.
>
> > 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.

I see a lot of use cases for me:

1. GUI translating in copy mode with accelerator.
Searching in the po file, in database, grepping for untranslated msgs in the 
code, use it as input for my scripts ..., eg to see how a string or term is 
already translated and to keep it consistent.

2. Doc translation in copy mode without accelerator with a translated GUI.
Would be easy to insert the text from the clipboard between all <gui...> 
</gui..> elements.

3. Doc writing/fixing  in copy mode without accelerator in KDE_LANG=en_US.
Would be easy to insert the text from the clipboard between all <gui...> 
</gui..> elements. Should also work for every visible string in the app 
(menu, label, caption, whatsthis tooltip etc.

It would be very helpfull for me.

-- 
Burkhard Lück

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic