Bug 114882 - Some strings in the glossary are not translated
Summary: Some strings in the glossary are not translated
Status: RESOLVED FIXED
Alias: None
Product: kalzium
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Kalzium Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-22 18:50 UTC by Francesco Bresciani
Modified: 2006-03-08 01:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Bresciani 2005-10-22 18:50:36 UTC
Version:           1.4.2 (using KDE 3.4.92 (beta2, >= 20051010), compiled sources)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.10-5-386

I'm the italian translator of kalzium. While testing my translation I've found that some strings doesn't appear translated in the glossary. After some testing I've found that apparentely if there is an image before the string, it's not translated. For example the description of the extractor hood in the glossary does not appear translated because there is an image before it, while the description of the buret appears correctly translated (and there isn't an image indeed)...

I've tested with the spanish and german po files and there is the same problem, so it's not related with the italian po files.
Comment 1 Pino Toscano 2005-10-23 01:29:35 UTC
SVN commit 473231 by pino:

Translate the description at the right point.

CCBUG: 114882


 M  +1 -3      kdeeduglossary.cpp  


--- branches/KDE/3.5/kdeedu/libkdeedu/kdeeduui/kdeeduglossary.cpp #473230:473231
@@ -130,7 +130,7 @@
 		QString picName = itemElement.namedItem( "picture" ).toElement().text();
 		QDomElement refNode = ( const QDomElement& ) itemElement.namedItem( "references" ).toElement();
 
-		QString desc = descNode.toElement().text();
+		QString desc = i18n( descNode.toElement().text().utf8() );
 		if ( !picName.isEmpty() )
 			desc.prepend("[img]"+picName +"[/img]" );
 
@@ -146,8 +146,6 @@
 		item->setDesc( item->desc().replace("[/sup]", "</sup>" ) );
 		item->setDesc( item->desc().replace("[br]", "<br />" ) );
 		
-		item->setDesc( i18n( item->desc().utf8() ) );
-
 		refNodeList = refNode.elementsByTagName( "refitem" );
 		for ( uint it = 0; it < refNodeList.count(); it++ )
 		{
Comment 2 Pino Toscano 2005-10-23 01:34:19 UTC
SVN commit 473233 by pino:

Forwardport: translate the description at the right point.

BUG: 114882


 M  +1 -1      kdeeduglossary.cpp  


--- trunk/KDE/kdeedu/libkdeedu/kdeeduui/kdeeduglossary.cpp #473232:473233
@@ -162,7 +162,7 @@
 		QString picName = itemElement.namedItem( "picture" ).toElement().text();
 		QDomElement refNode = ( const QDomElement& ) itemElement.namedItem( "references" ).toElement();
 
-		QString desc = descNode.toElement().text().toUtf8();
+		QString desc = i18n( descNode.toElement().text().toUtf8() );
 		if ( !picName.isEmpty() )
 			desc.prepend("[img]"+picName +"[/img][brclear][br]" );
 
Comment 3 Nicola Ruggero 2006-03-05 14:53:50 UTC
"References" string in glossary is still not translated. There are also some other entries still not translated (ie. electron, magnetic moment).

Is this due to kdelibs that can not handle properly msgid's with non latin1 characters, as for Bug#: 123118 ?

In that case feel free to close this report again.
Comment 4 Pino Toscano 2006-03-05 22:43:06 UTC
SVN commit 516076 by pino:

Load also the libkdeedu catalog.
BUG: 114882


 M  +3 -0      kalzium.cpp  


--- trunk/KDE/kdeedu/kalzium/src/kalzium.cpp #516075:516076
@@ -93,6 +93,9 @@
 	setupSidebars();
 	setupActions();
 
+	// adding the libkdeedu catalog
+	KGlobal::locale()->insertCatalog( "libkdeedu" );
+
 	// creating the glossary dialog and loading the glossaries we have
 	m_glossarydlg = new GlossaryDialog( true, this );
 	m_glossarydlg->setObjectName( QLatin1String( "glossary" ) );
Comment 5 Pino Toscano 2006-03-08 01:40:33 UTC
> There are also some other entries still not translated (ie. electron,
> magnetic moment).
>
> Is this due to kdelibs that can not handle properly msgid's with non latin1
> characters, as for Bug#: 123118 ?


Yes, forgot to say that those entries contains non-Latin1 characters, so they 
suffer of the same issue as bug #123118.