[Kstars-devel] i18n bugs in kstars

Burkhard Lück lueck at hube-lueck.de
Wed Jan 21 14:01:50 CET 2009


Hi,

I found some i18n bugs in recent kstars (trunk) compiled from sources:

Caption "Set Time" in time dialog untranslated
kdeedu/kstars/kstars/timedialog.cpp:43:
setCaption( i18nc( "set clock to a new time", UTCNow ? "Set UTC Time" : "Set 
Time" ) );
The i18nc macro does not understand this construct, only this is extracted:
#: timedialog.cpp:43
msgctxt "set clock to a new time"
msgid "Set UTC Time"
There is no msgid "Set Time" in kstars.pot

Missing i18n call here?
$ svn diff kdeedu/kstars/
Index: kdeedu/kstars/kstars/skycomponents/skymapcomposite.cpp
===================================================================
--- kdeedu/kstars/kstars/skycomponents/skymapcomposite.cpp      (Revision 
913932)
+++ kdeedu/kstars/kstars/skycomponents/skymapcomposite.cpp      (Arbeitskopie)
@@ -440,7 +440,7 @@
 **/

 KSPlanetBase* SkyMapComposite::planet( int n ) {
-    if ( n == KSPlanetBase::SUN ) return (KSPlanetBase*)
(m_SolarSystem->findByName( "Sun" ) );
+    if ( n == KSPlanetBase::SUN ) return (KSPlanetBase*)
(m_SolarSystem->findByName( i18n("Sun") ) );
     if ( n == KSPlanetBase::MERCURY ) return (KSPlanetBase*)
(m_SolarSystem->findByName( i18n( "Mercury" ) ) );
     if ( n == KSPlanetBase::VENUS ) return (KSPlanetBase*)
(m_SolarSystem->findByName( i18n( "Venus" ) ) );
     if ( n == KSPlanetBase::MOON ) return (KSPlanetBase*)
(m_SolarSystem->findByName( "Moon" ) );

In kstars settings dialog, on the page Guides, the sky culture names in the 
dropdown box (Western, Chinese, Egyptian etc) are untranslated.
In kstars.pot these messages have the prefix "C ", eg "C Western", but in the 
box only "Western" without prefix is displayed.
Just a wild guess:
At runtime kstars cuts off the prefix "C " while loading these names and then 
asks gettext for a translation of "Western", but there is none, only "C 
Western" in the message catalog?

I have checked these i18n bugs with the language x-test 
(http://techbase.kde.org/Development/Tutorials/Localization/Building_KDE's_l10n_Module#Step_3:_Test_An_Application), 
invented by Coolo for this purpose. 
The caption of time dialog and the entries in the sky culture drop down box 
have no surrounding "xx", so there are definitely two i18n bugs in kstars.

-- 
Burkhard Lück


More information about the Kstars-devel mailing list