Version: 1.4.3 (using KDE KDE 3.5.1) Installed from: SuSE RPMs OS: Linux Hi, I'm using Kalzium on a German SuSE 10.0 / KDE 3.5.1 system. In German, a point is used to separate thousands, while commas are used as a decimal separator. In English, it's the other way round. Although my Kalzium shows German texts, the commas and points are used as in the English version. This is wrong and irritating, so it would be nice if someone could fix this. Please see http://en.wikipedia.org/wiki/Decimal_separator for examples of how to use decimal separators in different languages. But I guess KDE already has routines which handle this. Daniel
Hi, I'm just working on this problem! Probably in the next version of kde-i18n all GUI messanges will be available in german. Incl. the last missing messanges ... See http://i18n.kde.org/stats/gui/trunk/de/kdeedu/index.php for the actual situation of translating Kalzium.
> In German, a point is used to separate thousands, while commas are used as a > decimal separator. In English, it's the other way round. Not only in German, but also in Italian. So, it's not an issue of the German translation, nor of any other Kalzium translation. > Please see http://en.wikipedia.org/wiki/Decimal_separator for examples of > how to use decimal separators in different languages. But I guess KDE > already has routines which handle this. No need to look at Wikipedia (for this time), as KDE already provides us all the things we need. Sadly, they were not applied before.
I' am working on a localisation patch to fix this and will post it soon for review by the developers. Stay tuned. :)
Created attachment 20057 [details] Localize numeric values
Created attachment 20063 [details] Localize numeric values The previous patch had a serious bug. So please do not use it. This is a corrected version.
The patch may work, but it needs some massage here and there: > v = QString::number( value ); >+ v = KalziumUtils::localizedValue( v, 6 ); What's this nonsense? >+ static QString localizedValue( const QString& string, int precision, unsigned long options = 0 ); Why the format from string? We use numbers everywhere, and strings just when displaying, so this function and the other one that takes the QString as parameter are completely useless, IMHO. +QString KalziumUtils::localizedValue( int val ) +{ + return KGlobal::locale()->formatLong( val ); +} What's this function for? Just merge it into the other one, and for example use a flag to determine whether use KLocale::formatNumer() or KLocale::formatLong().
SVN commit 645428 by johach: Show numeric values in local format. Patch reviewed by Pino Toscano. BUG: 122760 M +7 -4 detailedgraphicaloverview.cpp M +22 -17 detailinfodlg.cpp M +20 -18 element.cpp M +9 -8 isotope.cpp M +2 -1 kalzium.cpp M +2 -1 kalziumtip.cpp M +14 -0 kalziumutils.cpp M +13 -0 kalziumutils.h M +2 -1 periodictableview.cpp M +2 -1 spectrumwidget.cpp
Created attachment 20070 [details] Final patch applied to svn. Reviewed by Pino Toscano. Just for the records. The committed patch.