[Kstars-devel] Need advice on fixing localization issues in KStars

Akarsh Simha akarshsimha at gmail.com
Thu Jan 22 12:56:56 CET 2009


Hi

As you might have noticed if you are using a localized version, KStars
has a whole lot of deficiencies when it comes to localization of
object names.

The trouble is that we don't maintain both translated and untranslated
versions of the name of an object. We need to have both - because we
use untranslated names to refer to the object internally (eg: to find
the Sun, you would always use findByName( "Sun" )) and we need to have
an index of translated names to present the user with translated names
in the find dialog.

I'd like some advice on what the best way to implement this. 

I thought of introducing additional TranslatedName, TranslatedName2,
TranslatedLongName fields for each SkyObject.

The other way I can think of, is to use the US English name internally
and i18n() when presenting to the user. Now how do we search? For
this, we could probably have a QHash<QString, QString> that gives the
US English name for a given localized name. Given that only a small
fraction of the number of objects that KStars displays will actually
have translated names, the hash won't occupy a lot of memory.

Regards
Akarsh


More information about the Kstars-devel mailing list