<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/129568/">https://git.reviewboard.kde.org/r/129568/</a>
     </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On December 14th, 2016, 1:37 a.m. MSK, <strong>Albert Astals Cid</strong> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  


<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://git.reviewboard.kde.org/r/129568/diff/2/?file=487106#file487106line43" style="color: black; font-weight: bold; text-decoration: underline;">src/Gui/SmartSpinBox.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
   <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">43</font></th>
   <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">setSuffix</span><span class="p">(</span><span class="n">i18n</span><span class="p">(</span><span class="s">" second"</span><span class="p">));</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">43</font></th>
   <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">setSuffix</span><span class="p">(</span><span class="n">i18np</span><span class="p">(</span><span class="s">" second"</span><span class="p">,</span> <span class="s">" seconds"</span><span class="p">,</span> <span class="kt">int</span><span class="p">(</span><span class="n">val</span><span class="p">)));</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">is there a reason this really needs to be a double?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Is it critical to be able to take a screenshot in 2.4 seconds?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">If it is, this thing should probably look like</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">if (val == (int)val) {
  // it's an integer
  setSuffix(i18np(" second", " seconds", int(val)));
} else {
  // it's a decimal number
  setSuffix(i18n(" seconds")); 
}</p></pre>
 </blockquote>



 <p>On December 16th, 2016, 3:18 a.m. MSK, <strong>Peter Wu</strong> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Being able to take a screenshot after 100ms (ASAP, but allowing the cursor to be moved for example) might be a valid use case.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">What is the reason for adding a special case for decimal numbers? I am following the suggestion from https://bugs.kde.org/show_bug.cgi?id=341692#c5 to use <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">floor(val)</code>. Your suggestion would result in "1.1 seconds" while Alexander thinks it should be "1.1 second".</p></pre>
 </blockquote>





 <p>On December 16th, 2016, 3:50 a.m. MSK, <strong>Albert Astals Cid</strong> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I don't know why you reopened that bug.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The solution was clear, the only people that need different forms for plurals are scottish gaelic, and they are using scripted translations to handle that, so i18n(" seconds") is fine for them.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Please tell me why what I suggested doesn't work.</p></pre>
 </blockquote>





 <p>On December 16th, 2016, 5:24 p.m. MSK, <strong>Peter Wu</strong> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I reopened that bug since <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">i18np(" second", " seconds", double(val))</code> does not work when the value is a real number instead of an integer (bug?). The API silently ignores the value and assumes value zero IIRC.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Now that I read Alexander's comment again, it seems that some languages really have a different translations for non-integer values (point "2" in his comment, the "else" branch in your suggestion). Is that a correct understanding?</p></pre>
 </blockquote>





 <p>On December 17th, 2016, 1:07 p.m. MSK, <strong>Alexander Potashev</strong> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The solution was clear, the only people that need different forms for plurals are scottish gaelic, and they are using scripted translations to handle that, so i18n(" seconds") is fine for them.</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Albert,</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I don't think it's scriptable because the string " seconds" (as in your i18n(" seconds")) does not have enough information to determine the plural form for Scottish Gaelic.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">What Chusslove suggested in https://bugs.kde.org/show_bug.cgi?id=341692#c1 does only work when you have i18np("some string", value).</p></pre>
 </blockquote>





 <p>On December 27th, 2016, 7:59 p.m. MSK, <strong>Albert Astals Cid</strong> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">So basically you're saying we can't produce a proper plural for Scottish Gaelic if using decimal numbers, i don't see how this should block this code review specifically since there's probably lots of places in our code with this issue.</p></pre>
 </blockquote>





 <p>On January 13th, 2017, 2:25 a.m. MSK, <strong>Albert Astals Cid</strong> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">ping?</p></pre>
 </blockquote>





 <p>On January 14th, 2017, 7:23 p.m. MSK, <strong>Alexander Potashev</strong> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">So basically you're saying we can't produce a proper plural for Scottish Gaelic if using decimal numbers,</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Wrong. Like said in https://bugs.kde.org/show_bug.cgi?id=341692 , "real numbers behave like their floors in respect to plural forms", thus you can produce proper plurals for Scottish Gaelic if using integer numbers. But you can't produce proper Russian plurals using integers.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">BTW, decimal != integer.</p>
<blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">i don't see how this should block this code review specifically since there's probably lots of places in our code with this issue.</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This code review can be merged as it probably doesn't make things much worse for most languages. However, for English "0.5 second" becomes "0.5 seconds" which may be bad.</p></pre>
 </blockquote>





 <p>On January 15th, 2017, 1:48 a.m. MSK, <strong>Albert Astals Cid</strong> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Like said in https://bugs.kde.org/show_bug.cgi?id=341692 , "real numbers behave like their floors in respect to plural forms", thus you can produce proper plurals for Scottish Gaelic if using integer numbers. But you can't produce proper Russian plurals using integers.</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I can't parse this sentence.</p>
<blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">However, for English "0.5 second" becomes "0.5 seconds" which may be bad.</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">0.5 seconds is the correct way to say it</p></pre>
 </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">To clear this up I made this table which tells how many word forms we should have for these languages:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">N     | Russian form              | Scottish Gaelic form
0     | Z                         | D
0.5   | Y (same for all decimals) | D (same as for 0)
1     | X                         | A
1.5   | Y (same for all decimals) | A (same as for 1)
2     | Y                         | B
2.5   | Y (same for all decimals) | B (same as for 2)
3     | Y                         | C
5     | Z                         | C
100   | Z                         | D
100.5 | Y (same for all decimals) | D (same as for 100)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This may work:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">if (val == (int)val) {
  // it's an integer
  setSuffix(i18ncp("integer number", " second", " seconds", int(val)));
} else {
  // it's a decimal number
  setSuffix(i18ncp("decimal number, %1=floor of the number", " seconds", " seconds", int(val))); 
}</p></pre>
<br />




<p>- Alexander</p>


<br />
<p>On December 6th, 2016, 9:58 p.m. MSK, Peter Wu wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for KDE Graphics, Albert Astals Cid and Boudhayan Gupta.</div>
<div>By Peter Wu.</div>


<p style="color: grey;"><em>Updated Dec. 6, 2016, 9:58 p.m.</em></p>









<div style="margin-top: 1.5em;">
 <strong style="color: #575012; font-size: 10pt;">Repository: </strong>
spectacle
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Change strings to address i18n issues</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Change "Preferences" to "Configure" (window title) and use a
KStandardAction::preferences item (and get the "Configure Spectacle..."
text for free).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Add TODO comment for inconsistent use of "screen" and "monitors", this
requires more changes beyond changing text.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Checked text under Save menu (icon has also changed), Configure dialog.</p></pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>doc/index.docbook <span style="color: grey">(5ad5ef08d8834d4b8ac982ea5c1c928cdac5ecab)</span></li>

 <li>src/Gui/ExportMenu.cpp <span style="color: grey">(4b894c7d991140f08912a90eb41571108439264b)</span></li>

 <li>src/Gui/KSMainWindow.cpp <span style="color: grey">(5a4dd77564e98b961adcadcec18e5d5fad4d4bb4)</span></li>

 <li>src/Gui/KSWidget.cpp <span style="color: grey">(380bff6809131477446aaecb947c2d7b7dde3289)</span></li>

 <li>src/Gui/SettingsDialog/SettingsDialog.cpp <span style="color: grey">(7cfe8e2ca676a414d7a84a20b134b2e1ae89a9b3)</span></li>

 <li>src/Gui/SmartSpinBox.cpp <span style="color: grey">(4938f84f62b194fcbd2461915e628dfb45c4abb4)</span></li>

</ul>


<p><a href="https://git.reviewboard.kde.org/r/129568/diff/2/" style="margin-left: 3em;">View Diff</a></p>










  </td>
 </tr>
</table>







  </div>
 </body>
</html>