[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: Using Qt5 translation rules in sources code instead KDE...
From:       Albert Astals Cid <aacid () kde ! org>
Date:       2015-02-05 0:05:54
Message-ID: 2058985.bpWPzzcIGS () xps
[Download RAW message or body]

El Dimecres, 4 de febrer de 2015, a les 17:16:27, Gilles Caulier va escriure:
> Hi all,

Hi
 
> I have just a technical questions about internationalization.
> 
> libkface for KF5 used by digiKam and KPhotoAlbum is ported to Qt5 and
> do not depend of KDE in source code, excepted for
> internationalization.

There's no such thing as "KDE" to depend on, you mean libkface depends on the 
ki18n framework.

> https://techbase.kde.org/Projects/Digikam/CodingSprint2014#Libkface
> 
> If i use Qt translation rules in source code, i can transform this lib
> as pure Qt. Typically, to resume quickly, this want mean to change
> i18n("...") by tr("...") strings.
> 
> I think that KDE internationalization support both methods. As i can
> see, Marble use tr() rules in source code, and marble KF5 strings
> extraction script search for tr("") wrapping in source code.
> 
> Something similar can be done to libkface ?

It can, but personally i wouldn't suggest it, ki18n is a very small library 
that depends on nothing else than Qt, so it's a very small dependency.

> If yes, what are the limitations about translations strings formatting ?

Qt method is much more limited, doesn't support scripted translations, doesn't 
support Semantic Markup, also ki18n makes it really much simpler to load the 
translation catalogs than Qt::tr

> 
> And finally, why both method exists ? 

Because ki8n is superior

> Why not to plan in the future to
> use Qt translations rules ?

Because Qt::tr is inferior

> Thanks for your explanations

Hope i made sense, don't hesitate to shout if i didn't.

Cheers,
  Albert

> 
> Best
> 
> Gilles Caulier

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic