[Kstars-devel] i18n bugs in kstars

Akarsh Simha akarshsimha at gmail.com
Wed Jan 21 18:18:15 CET 2009


> 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

Oh yes, that's right. Will fix it. Thanks for pointing out.

> 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" ) );

I don't think that is correct. Could you give me a test case where
this results in a bug?

KStars' way of handling i18n is a terrible mess. We frequently do
findByName() calls that fail miserably with translated names. As far
as I know, the Sun and Moon are called the Sun and Moon internally,
but the planets use the translated names internally. So, as of now in
trunk, i18n("Mercury") is correct, but i18n("Sun") isn't, AFAIK.

I've made a whole bunch of cheap work-arounds for the KDE 4.2 release,
but I think the whole architecture must be revamped. I hope I'll have
some time to fix it this weekend.

> 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?

Will look into the other bugs in a while, maybe over the weekend.

Thanks for letting me know.

> 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
> _______________________________________________
> Kstars-devel mailing list
> Kstars-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kstars-devel
> 

Regards
Akarsh


More information about the Kstars-devel mailing list