<table><tr><td style="">habacker added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D14779">View Revision</a></tr></table><br /><div><div><p>Thanks for this pointer - with this setting the german translation is not fetched anymore.</p>

<p>But there is still the question open how to deal with plurals with and without installed kcoreaddons language package.</p>

<p>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.</p>

<p>From what I read on Qt doc ui string with plurals always need to use a translation string with "%n millisecond(s)"  (cleaned with  <a href="https://phabricator.kde.org/D14940" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D14940</a>), but in the test code there are two cases</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">QCOMPARE(format.formatDecimalDuration(1 * MSecsInDay + 10 * MSecsInHour, 3), QStringLiteral("1.417 days"));</pre></div>

<p>This one requires to have a translation installed, which translates "day(s)" to "days"</p>

<p>and this one</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">QCOMPARE(format.formatDecimalDuration(10), QStringLiteral("10 millisecond(s)"));</pre></div>

<p>This fails with a translation installed because an installed english translation translates this to "10 milliseconds"</p>

<p>How to proceed ?</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R244 KCoreAddons</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D14779">https://phabricator.kde.org/D14779</a></div></div><br /><div><strong>To: </strong>habacker, Frameworks<br /><strong>Cc: </strong>dfaure, aacid, kde-frameworks-devel, michaelh, ngraham, bruns<br /></div>