Re: [Celestia-developers] i18n issue with DSO types
Real-time 3D visualization of space
Status: Beta
Brought to you by:
cjlaurel
From: vincent <vin...@fr...> - 2009-12-09 12:22:52
|
Chris, Fridger, ... Does anyone have an objection with this change ? @+ Vincent Selon vincent <vin...@fr...>: > So far, the "Nebula" and "Open cluster" DSO types are not translated > in the Selection information text, whereas "Galaxy" and "Globular" are. > > This is because these types don't appear in the string returned by > the getDescription methods, and thus, they're not marked for gettext > translation: > - in nebula.cpp, line 47: > return snprintf(buf, bufLength, _("%s"), getType()); > - in openculster.cpp, line 44: > return snprintf(buf, bufLength, _("%s"), getType()); > > On the contrary, the "Galaxy" and "Globular" types appear in the > getDescription methods and thus, they're marked for gettext translation: > - in galaxy.cpp, line 197: > return snprintf(buf, bufLength, _("Galaxy (Hubble type: %s)"), getType()); > - in globular.cpp, line 255: > return snprintf(buf, bufLength, _("Globular (core radius: %4.2f', King > concentration: %4.2f)"), r_c, c); > > Also, no "special" type is implemented so far neither for nebulae nor for > open > clusters > -- which is not the issue here. So the getDescription methods shouldn't use > the > getType() call. > > For these reasons, I'd suggest to make the following change: > http://vincent.giangiulio.perso.sfr.fr/celestia/dev/dsos_i18n.patch > > Please note that I stuck with the use of snprintf even if there's no variable > anymore. > This to keep coherent with galaxie and globular descriptions that are of > size-t > type. > > @+ > Vincent |