[Kexi-devel] QObject::tr in autotests

Friedrich W. H. Kossebau kossebau at kde.org
Mon Jul 13 12:49:15 UTC 2015


Am Montag, 13. Juli 2015, 14:41:08 schrieb Jaroslaw Staniek:
> On 13 July 2015 at 14:22, Friedrich W. H. Kossebau <kossebau at kde.org> wrote:
> > Am Montag, 13. Juli 2015, 11:47:19 schrieb Jaroslaw Staniek:
> >> Hi Friedrich,
> >> In (master) ConnectionTest::testConnectionData I'm using
> >> QObject::tr(). Should I use something else?
> >> Asking since you apparently have played with such stuff already.
> > 
> > Picking that up in the rebase of my related review request right now. By
> > using the same KDbConnection::tr call as used for the original strings,
> > so the "class" context is the same.
> > 
> > Then, I wonder if autotests would ever have access to the translation
> > catalogs. For that I still need to learn in which places the catalogs are
> > looked for :)
> 
> OK thanks. Maybe we could assume here, again that we have no
> translations available and just skip tr() in autotests? I probably
> asked about that once already :)

Ah, than I misunderstood the last time. I thought you might also want to be 
able to test things work localized.

In any case, we first need checking how catalogs are looked for. If the 
catalog loader knows about the install prefix it might try to simply get any 
catalogs found there, so when running in a localized env the tests will fail 
if translations are not used on both side of the tests. Unless we enforce C as 
env or something like that.

Time to go out to Qt expert circles and ask, to make educated decisions :)

Cheers
Friedrich


More information about the Kexi-devel mailing list