[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: Re: kplato missing strings
From: Albert Astals Cid <aacid () kde ! org>
Date: 2008-11-30 21:38:06
Message-ID: 200811302238.06778.aacid () kde ! org
[Download RAW message or body]
A Diumenge 30 Novembre 2008, Burkhard Lück va escriure:
> Am Sonntag 30 November 2008 16:01:35 schrieb Albert Astals Cid:
> > A Divendres 28 Novembre 2008, Burkhard Lück va escriure:
> > > Am Freitag 28 November 2008 19:56:33 schrieb Dag Andersen:
> > > > Had a closer look and it seems that all catalogs are inserted, also
> > > > the krossmodulekplato.
> > > > Of course, I don't have a krossmodulekplato file yet, so can't say if
> > > > I would get any translated messages.
> > >
> > > You don't need to wait for someone translating krossmodulekplato.po for
> > > you, please install Coolo's language x-test:
> > >
> > > http://techbase.kde.org/Development/Tutorials/Localization/Building_KDE
> > >'s _l 10n_Module
> > >
> > > Every KDE-Developer should have this language installed and check his
> > > application for i18n bugs.
> >
> > That's a problem whitin kross itself, i've mailed kross maintainer to see
> > if the patch i've created is ok for him.
>
> Thanks a lot Albert for keeping an eye on this.
>
> The patch is not in kdelibs/kross so far?
Not yet
>
> Please cc me via pm or this list, so I can check if the translations in
> kplato are displayed and then fix the other koffice modules with kross
> scripting (kword, kspread...).
The patch works in kplato, i've checked, but if you want to check the others,
here it comes.
Albert
["i18n.patch" (text/x-diff)]
Index: core/action.cpp
===================================================================
--- core/action.cpp (revision 890819)
+++ core/action.cpp (working copy)
@@ -167,8 +167,8 @@
d->version = QVariant( element.attribute("version",QString(d->version)) \
).toInt();
- setText( element.attribute("text") );
- setDescription( element.attribute("comment") );
+ setText( i18n( element.attribute("text").toUtf8() ) );
+ setDescription( i18n( element.attribute("comment").toUtf8() ) );
setEnabled( true );
setInterpreter( element.attribute("interpreter") );
setEnabled( QVariant(element.attribute("enabled","true")).toBool() && \
isEnabled() );
Index: core/actioncollection.cpp
===================================================================
--- core/actioncollection.cpp (revision 890819)
+++ core/actioncollection.cpp (working copy)
@@ -30,6 +30,7 @@
#include <QtXml/QDomAttr>
#include <kicon.h>
+#include <klocalizedstring.h>
using namespace Kross;
@@ -284,16 +285,16 @@
if( elem.tagName() == "collection") {
const QString name = elem.attribute("name");
- const QString text = elem.attribute("text");
- const QString description = elem.attribute("comment");
+ const QByteArray text = elem.attribute("text").toUtf8();
+ const QByteArray description = elem.attribute("comment").toUtf8();
const QString iconname = elem.attribute("icon");
bool enabled = QVariant(elem.attribute("enabled","true")).toBool();
ActionCollection* c = d->collections.contains(name) ? \
d->collections[name] : QPointer<ActionCollection>(0); if( ! c )
c = new ActionCollection(name, this);
- c->setText( text.isEmpty() ? name : text );
- c->setDescription( description.isEmpty() ? c->text() : description );
+ c->setText( text.isEmpty() ? name : i18n( text ) );
+ c->setDescription( description.isEmpty() ? c->text() : i18n( description \
) ); c->setIconName( iconname );
if( ! enabled )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic