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

Ralf Habacker noreply at phabricator.kde.org
Mon Aug 20 11:19:55 BST 2018


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 installed will be performed at KDE CI and running tests with kcoreaddons language package mainly happens on developers desktop systems, where KF5 is installed and a developer is working on kcoreaddons.
  
  From what I read on Qt doc ui string with plurals always need to use a translation string with "%n millisecond(s)"  (cleaned with  D14940 <https://phabricator.kde.org/D14940>), but in the test code there are two cases
  
    QCOMPARE(format.formatDecimalDuration(1 * MSecsInDay + 10 * MSecsInHour, 3), QStringLiteral("1.417 days"));
  
  This one requires to have a translation installed, which translates "day(s)" to "days"
  
  and this one
  
    QCOMPARE(format.formatDecimalDuration(10), QStringLiteral("10 millisecond(s)"));
  
  This fails with a translation installed because an installed english translation translates this to "10 milliseconds"
  
  How to proceed ?

REPOSITORY
  R244 KCoreAddons

REVISION DETAIL
  https://phabricator.kde.org/D14779

To: habacker, #frameworks
Cc: dfaure, aacid, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180820/6556dac7/attachment.html>


More information about the Kde-frameworks-devel mailing list