kscd i18n bug, outdated documentation

Burkhard Lück lueck at hube-lueck.de
Thu Jun 18 09:43:20 BST 2009


Am Donnerstag 18 Juni 2009 10:21:31 schrieb Aurélien Gâteau:
> Burkhard Lück wrote:
> > Am Montag 16 März 2009 12:20:53 schrieb Burkhard Lück:
> >> Hello list,
> >>
> >> with the new version of kscd written by Mohamed-Amine Bouchikhi,
> >> there is a i18n bug in kscd, please have a look at
> >> https://bugs.kde.org/show_bug.cgi?id=186867.
> >>
> >> Any idea how to fix this and make the button tooltips translatable?
> >
> > attached patch fixes the untranslatable tooltips.
> >
> > Improvements?
> > Objections to commit?
>
> I have not tried the patch, but I have a question: are the buttons
> sometimes instantiated with different labels? In this case, are those
> labels already using i18n? That is, do you have this somewhere:
>
>   new CloseButton(parent, i18n("Foo"));
>
> or this:
>
>   new CloseButton(parent, "Foo");
>
> If you have the first one, then your patch is wrong because you will
> call i18n() on the translated text.
>
> If you have the second one, your patch is ok, but this looks fragile
> since class users have to remember *not to* call i18n().
>
None of both:
$ wcgrep "new CloseButton" kdemultimedia/kscd/
kdemultimedia/kscd/gui/kscdwindow.cpp:58:       m_closeB = new 
CloseButton(this);

> If the code never changes the text, I suggest to get rid of the
> parameter and hard-code the text inside the constructor.
>
I can't do that with my limited C/C++ skills, i am just a poor translator who 
wants to have a fully translatable GUI.
And with my patch I get that.

-- 
Burkhard Lück



More information about the kde-multimedia mailing list