[Kalzium] Element names and origin of names in Kalzium

Eloy Cuadra ecuadra at eloihr.net
Sat Dec 1 11:39:39 CET 2007


On Saturday 01 December 2007, Burkhard Lück wrote:
> Am Samstag 01 Dezember 2007 07:45:40 schrieb Yukiko Bando:
> > Element names and origin of the names in Kalzium are all displayed in
> > English in Japanese locale. It seems that translations from libkdeedu.po
> > are not used. Does anyone else see the same problem?
>
> You mean strings like "Greek 'hydro' and 'gennao' for 'forms water'"?
>
> They are extracted to libkdeedu, there is
> kdeedu/kalzium/src/kalzium.cpp:148: KGlobal::locale()->insertCatalog(
> "libkdeedu" ); in the source, but I also see no translation in german.

It seems there's a bug in libkdeedu/libscience/elementparser.cpp

I think this patch against current SVN version should work (not tested!).

@@ -197,7 +197,7 @@
                 for (int i = 0; i < attrs.length(); ++i) 
                 {
                     if (attrs.localName(i) == "value") {
-                        d->currentDataObject.setData( attrs.value(i) ); 
+                        d->currentDataObject.setData( i18n( 
attrs.value(i) ) ); 
                         d->currentDataObject.setType( 
ChemicalDataObject::name );
     
                         if ( d->currentElement )
@@ -289,7 +289,7 @@
         d->inPeriodTableBlock = false;
     }
     else if (d->inNameOrigin) {
-        value = ch; 
+        value = i18n( ch ); 
         type = ChemicalDataObject::nameOrigin; 
         d->inNameOrigin = false;
     }

-- 
Eloy Cuadra


More information about the Kalzium mailing list