user-avatar
Today is Saturday
February 4, 2012

Tag: opale

May 2, 2009

how to handle translations for an application that is both qt-only and KDE ?

by Thomas Capricelli — Categories: KDE — Tags: , , 11 Comments

I have the problem for my application Opale, which used to be KDE only and is now both Qt and KDE.

The first thing I’ve done is to switch from *.po (gettext) to *.ts (qt), because Qt can not (or can it ?  tell me how !) handle gettext files. Then, I needed to use qApp->addTranslator() to load the Qt translation files (the *.qm generated from *.ts). So far it’s easy.

But then I had a problem : if I start the application, the strings from KDE are not translated. Especially the menu entries created using KStandardAction::*. The reason is that the application does not load any *.mo, and this is what triggers the loading of KDE messages.

The solution is to give “kdeinit4″ as second argument to KAboutData::KAboutData() instead of 0 as is usually done. Instead of trying to load your application translation, fail, and finally not load anything at all, it will load the ones for KDE directly. And you can still use qApp->addTranslator() , isn’t it great ? :-)

Thanks a lot to tsdgeos and Chusslove on #kde-devel for their help, they are the ones who found out.

If you want an example of how to do, you can refer to Opale’ source, and most importantly to the following files:

February 12, 2009

First release candidate for Opale

by Thomas Capricelli — Categories: Gentoo, KDE — Tags: , Leave a comment

One of my pet projects (A simple bank account manager focused on graphs and planning) is about to reach 1.0. This first release candidate has been tested on several Linux systems and Windows. It can compile against KDE, but Qt is enough. (no, i have not yet tested with KDE/Windows…).

So far, the only big problem with this RC is that translations are broken. This will be fixed in -rc2, to be released soon.

By the way, I could use some help with:

  • getting a logo
  • translations
  • writing an ebuild for gentoo
  • compilation/tests on MacOS X
  • compilation using msvc on Windows

If you feel like you could help me, please contact me.

November 12, 2008

Full blown kde-aware opale version

by Thomas Capricelli — Categories: KDE — Tags: , 1 Comment
KDE version of opale

KDE version of opale

Since the release of opale-0.9, I have mostly worked on improving the (optional) KDE integration. And now if KDE is available, opale will use things like : KMainWindow, KApplication (session management..), XML GUI, KFileDialog and specific menu entries (Switch application language, configure shortcuts/toolbars, KDE-aware recent files submenu,…).

While I was there, the Qt-only version now also has a ‘recent files’ dialog popping-up at the start if no file is given on the command line (my personal top-missing feature).

Now, some people noticed that I want to port Opale to the Mac. I have an old ibook lying here, but MacOS has died and I need to re-install it before trying qt/Mac (that I have never tested yet).

As an answer to your blog entry, Orville (I guess that’s your first name, right?):

  • The kde version is now really finished, please try if you want.
  • I guess there’s no menu on the screenshot because Mac still has those on the top of the screen, right ?
  • I would be delighted if you could provide testing on the mac. You can find me on freenode as orzel.
  • I’m also interested with hints about the interface, I’m not afraid of you being mean.
  • What’s the problem with my help menu ? Everything’s fine here. Use the ‘report a bug’ entry in the very same menu!
  • Don’t be scared by a photo :-)

Opale homepage

Project page

November 11, 2008

Opale ported to qt4 and kde4

by Thomas Capricelli — Categories: Gentoo, KDE — Tags: , , , 4 Comments

Opale was an application written using koffice that I use to handle my personal accounts. Long ago I have dropped support for koffice (mainly because of the crappy/undocumented/buggy chart API) and since then opale was a kde-based application.

One year ago, i have started porting it to kde4, and, meanwhile, made it a Qt4 application. Using configuration, you can now have either a qt4 or a kde4 application. Actually, I have to say the kde4 stuff is not thoroughly tested. Anyway, the qt4 port is done and I now have Opale working under windows. Not that I really care, but that can be useful for others.

It was not until few weeks ago that kde4 was good enough for me (copyright me) so I can actually use this version of opale (yes, I know about running kde4 application under kde3, but no, thanks). Now that this version is tested enough, i release it as 0.9.

The roadmap for 0.10 is

  • macintosh version
  • well-tested kde4 application
  • template editing/removing

Opale homepage

Opale project on freehackers’laboratories.

© 2012 Thomas Capricelli All rights reserved - Wallow theme v0.46.5 by ([][]) TwoBeers - Powered by WordPress - Have fun!