Native gettext support for Qt (was: Intended organization of KDE Frameworks)

Manuel "Sput" Nickschas sputnick at quassel-irc.org
Tue Jun 7 10:51:29 BST 2011


On Tuesday 07 June 2011 08:46:54 Albert Astals Cid wrote:

> This means that if you want Tier 1 frameworks to be translatable you need
> either to teach Qt to understand gettext files natively or to make Tier 1
> frameworks use pure based Qt/Linguist solutions which does not fit either in
> what scripty is able to do neither in what our translators are used to.

Wouldn't that be a sane thing anyway? I never really understood why Qt needs 
to have its own, completely incompatible translation system while the rest of 
the world happily uses gettext. In Quassel, this has hurt us a lot because we 
cannot easily tap into existing translation teams and resources. As it turns 
out (and understandably so), translation teams like that of KDE have their 
established workflows centered around gettext, and are not too willing to 
start using Linguist or other tools to translate an application that is Qt-
based.

A while ago, we have tweaked Quassel's build system to accept .po files and 
generate .qm files at build time from those. But this is error-prone and 
requires tools (e.g. lrelease) that are not found on all systems by default. 
Still, offering gettext translations has significantly increased translator 
contributions for us...

This whole situation is such a mess that we actually looked into taking KDE's 
i18n stuff and friends, and port it over to Qt (by way of deriving 
QTranslator), just to be able to reap the benefits of KDE's translation 
resources. Turned out that i18n() depends on too much of other kdelibs stuff 
to make that a feasible, maintainable option though.

I really think one should look into the opportunity given to us by the move to 
Qt5 to bring native gettext support to Qt, and retire the old tr() system, or 
at least make it just another option. This would tremendously help Qt-based 
apps to get good localization support, and even more so applications like 
Quassel that can be built with and without KDE support.

~ Sputnick
-- 
Manuel "Sputnick" Nickschas ("Sput" on Freenode)                  |  (o<
Member of the Quassel IRC Project - http://quassel-irc.org        |  //\
Come visit us in #quassel!                                        |  V_/_




More information about the kde-core-devel mailing list