By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 1864

Summary: tdelocale warning messages from various apps
Product: TDE Reporter: Darrell <darrella>
Component: tdeutilsAssignee: Timothy Pearson <kb9vqf>
Status: RESOLVED FIXED    
Severity: normal CC: bugwatch, darrella, slavek.banko
Priority: P5    
Version: R14.0.0 [Trinity]   
Hardware: Other   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Attachments: tdeutils: patch to eliminate tdelocale warning messages in PCMCIA kcontrol module
gtk-qt-engine: patch to eliminate tdelocale warning messages

Description Darrell 2014-01-24 13:46:33 CST
While testing help handbooks, I noticed the following in my .xsession-errors log:

kcontrol: WARNING: TDELocale: trying to look up "" in catalog. Fix the program
kcontrol: WARNING: TDELocale: trying to look up "" in catalog. Fix the program
kcontrol: WARNING: TDELocale: trying to look up "" in catalog. Fix the program

The messages occurs when I select KControl->Peripherals-Information->PCMCIA.

The events are repeatable.

Investigating revealed the warning message string is from tdelibs/tdecore/tdelocale.cpp.

The root cause is from tdeutils/klaptopdeamon/portable.cpp. The PCMCIA module is installed from the tdeutils package.

In portable.cpp, there are four instances where the message "No PCMCIA controller detected" is used. Immediately after each of those instances the TQLabel is reset (returned) to "", which is the cause of the tdelibs warning message in the .xsession-errors log. For example:

return(new TQLabel(i18n("No PCMCIA controller detected"), parent));
return(new TQLabel(i18n(""), parent));

As the tdelibs warning is about TDELocale, I tried the attached patch, which removes the i18n qualifier when returning the empty string (""). For example:

return(new TQLabel(i18n("No PCMCIA controller detected"), parent));
return(new TQLabel("", parent));

I tested another patch that completely removed the second return statement. The KControl PCMICA module crashed immediately upon access.

I don't know whether the attached patch is technically correct, but the patch works for me. The original warning messages no longer appear and the PCMCIA module does not crash.

I do not have a PCMCIA card to test further.
Comment 1 Darrell 2014-01-27 17:29:37 CST
Created attachment 1899 [details]
tdeutils: patch to eliminate tdelocale warning messages in PCMCIA kcontrol module
Comment 2 Darrell 2014-01-27 17:30:54 CST
This warning message appears for other apps too, for example gtk-qt-engine.

After accepting a resolution we can apply the same type of patch. Or perhaps the final solution involves a one-time global patch to tdelibs.
Comment 3 Darrell 2014-01-27 17:31:40 CST
Created attachment 1900 [details]
gtk-qt-engine: patch to eliminate tdelocale warning messages
Comment 4 Slávek Banko 2014-02-02 11:52:43 CST
Comment on attachment 1899 [details]
tdeutils: patch to eliminate tdelocale warning messages in PCMCIA kcontrol module

Pushed to GIT in hash 97bd137c
Comment 5 Slávek Banko 2014-02-02 11:55:54 CST
Comment on attachment 1900 [details]
gtk-qt-engine: patch to eliminate tdelocale warning messages

Pushed to GIT in hash f2d81120
Comment 6 Darrell 2014-02-02 12:28:50 CST
I use a script running in the background to watch for various stdout/stderr messages to help debugging. I added this particular message. Now that you pushed the patches we know how to fix other occurrences. We also probably could grep the source tree.
Comment 7 Darrell 2014-02-02 18:03:35 CST
I found one more in khotkeys. Patch pushed in commit 4e411d2b.

I searched the entire source tree and could find only these possible instances:

tdepim/kmail/kmfilteraction.cpp:188:  // return i18n("").arg( );
tdepim/kmail/kmfilteraction.cpp:239:  // return i18n("").arg( );
tdepim/kmail/kmfilteraction.cpp:846:  // return i18n("").arg( );
tdepim/kmail/kmfilteraction.cpp:941:  // return i18n("").arg( );
tdepim/kmail/kmfilteraction.cpp:1126:  // return i18n("").arg( );
tdepim/kmail/kmfilteraction.cpp:1302:  // return i18n("").arg( );
tdepim/kmail/kmfilteraction.cpp:1881:  // return i18n("").arg( );
tdepim/kmail/kmfilteraction.cpp:1958:  // return i18n("").arg( );

They are all comments.

I'll close this report as resolved.