D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-21 Thread Ralf Habacker
habacker abandoned this revision. habacker added a comment. superseeded by D14967 (tried to updated this review with arc diff, but forgot to add the annoying --verbatim argument to let phabricator know that I have a changed commit message :-/) REPOSITORY

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-21 Thread Ralf Habacker
habacker added a comment. In D14779#311871 , @habacker wrote: > Thanks for this pointer - with this setting the german translation is not fetched anymore. A further look into the windows implementation of the qm loader part (https://cgit

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-20 Thread Ralf Habacker
habacker added a comment. Thanks for this pointer - with this setting the german translation is not fetched anymore. But there is still the question open how to deal with plurals with and without installed kcoreaddons language package. I guess running tests without kcoreaddons-lang

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-20 Thread David Faure
dfaure added a comment. Use qputenv instead of setenv. Example: kio/autotests/kdirmodeltest.cpp:qputenv("LC_ALL", "en_US.UTF-8"); REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D14779 To: habacker, #frameworks Cc: dfaure, aacid, kde-frameworks-devel, m

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-20 Thread Ralf Habacker
habacker added a comment. In D14779#311511 , @aacid wrote: > Can you please replace your setLocale call in initTestCase for > > void initLocale() > { > setenv("LC_ALL", "en_US.utf-8", 1); Just to inform you: this will not w

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-19 Thread Albert Astals Cid
aacid added a comment. Can you please replace your setLocale call in initTestCase for void initLocale() { setenv("LC_ALL", "en_US.utf-8", 1); } Q_CONSTRUCTOR_FUNCTION(initLocale) This should make it work (or at least it does here) REPOSITORY R244 KCoreAddons REVISI

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-17 Thread Ralf Habacker
habacker added a comment. In D14779#310116 , @aacid wrote: > Did you have that problem when you made ecm not create a translator? no, therefore I created D14778 > > >> What is the drawback t

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-16 Thread Albert Astals Cid
aacid added a comment. In D14779#309943 , @habacker wrote: > With the drawback that the qm file need to be generated on each build and the po file needs to be updated on any translations change in the test app > > BTW: I tried your approach

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-16 Thread Ralf Habacker
habacker added a comment. With the drawback that the qm file need to be generated on each build and the po file needs to be updated on any translations change in the test app BTW: I tried your approach by 1. downloaded po file from https://websvn.kde.org/trunk/l10n-kf5/en/messages/

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-15 Thread Albert Astals Cid
aacid added a comment. In D14779#309643 , @habacker wrote: > In D14779#308603 , @aacid wrote: > > > I think that in the test we just need to call > > > > bool QCoreApplication::installTranslator

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-15 Thread Ralf Habacker
habacker added a comment. In D14779#308603 , @aacid wrote: > I think that in the test we just need to call > > bool QCoreApplication::installTranslator(QTranslator *translationFile) > > with the location of the fake translation

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-15 Thread Christoph Feck
cfeck removed a reviewer: cfeck. REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D14779 To: habacker, #frameworks Cc: aacid, kde-frameworks-devel, michaelh, ngraham, bruns

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-15 Thread Christoph Feck
cfeck resigned from this revision. REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D14779 To: habacker, #frameworks Cc: aacid, kde-frameworks-devel, michaelh, ngraham, bruns

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-14 Thread Albert Astals Cid
aacid added a comment. In D14779#308593 , @habacker wrote: > You have remembered that in this case the loader created by ecm_create_qm_loader(kcoreaddons_QM_LOADER kcoreaddons5_qt) must be adjusted to find this - not installed - fake translation

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-14 Thread Ralf Habacker
habacker added a comment. You have remembered that in this case the loader created by ecm_create_qm_loader(kcoreaddons_QM_LOADER kcoreaddons5_qt) must be adjusted to find this - not installed - fake translation by default ? REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-14 Thread Albert Astals Cid
aacid added a comment. Personally i would include (and use) a fake translation as part of the tests and then it would just evaluate to the actual result, i.e. QCOMPARE(format.formatSpelloutDuration(361), QStringLiteral("1 hour(s)")); would end up being QCOMPARE(format.f

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-14 Thread Ralf Habacker
habacker updated this revision to Diff 39684. habacker edited the summary of this revision. habacker added a comment. - after feedback from ecm maintainers the fix could be refactored to not be depending on ecm patch REPOSITORY R244 KCoreAddons CHANGES SINCE LAST UPDATE https://phabricat

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-13 Thread Nathaniel Graham
ngraham added reviewers: Frameworks, cfeck. REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D14779 To: habacker, #frameworks, cfeck Cc: kde-frameworks-devel, michaelh, ngraham, bruns

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-13 Thread Nathaniel Graham
ngraham edited the summary of this revision. REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D14779 To: habacker Cc: kde-frameworks-devel, michaelh, ngraham, bruns

D14779: Fix 'kformattest fails with installed kcoreaddons language package'

2018-08-13 Thread Ralf Habacker
habacker created this revision. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: kde-frameworks-devel. habacker requested review of this revision. REVISION SUMMARY See D14778 for the related extra-cmake-modules p