<table><tr><td style="">jjazeix 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/D26196">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
          color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D26196#582682" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D26196#582682</a>, <a href="https://phabricator.kde.org/p/echarruau/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;">@echarruau</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><p>Just a point, in config display the menu are not exclusive, I can select option 1 and option 2. It could be good when I select option 2 that option 1 would be disabled.</p></div>
</blockquote>

<p>We added this possibility in the whole multiple dataset, it's to be able to select multiple levels. If you think on some activities they should be exclusive, let's discuss it in <a href="https://phabricator.kde.org/M146/541/" class="remarkup-link" target="_blank" rel="noreferrer">https://phabricator.kde.org/M146/541/</a></p></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D26196#inline-147647">View Inline</a><span style="color: #4b4d51; font-weight: bold;">AnswerArea.qml:71</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; ">    <span style="color: #aa4000">onUserEntryChanged:</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">        <span style="color: #aa4000">if</span><span class="p">(</span><span style="color: #004012">userEntry</span> <span style="color: #aa2211">!=</span> <span style="color: #766510">""</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span style="color: #aa4000">if</span><span class="p">(</span><span style="color: #004012">userEntry</span> <span style="color: #aa2211">!=</span> <span style="color: #766510">""</span><span class="p">)<span class="bright"></span></span><span class="bright"> </span>
</div><div style="padding: 0 8px; margin: 0 4px; ">            <span style="color: #004012">Activity</span><span class="p">.</span><span style="color: #004012">setUserAnswer</span><span class="p">(</span><span style="color: #304a96">parseInt</span><span class="p">(</span><span style="color: #004012">userEntry</span><span class="p">))</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">remove the added space at the end</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D26196#inline-147648">View Inline</a><span style="color: #4b4d51; font-weight: bold;">Guessnumber.qml:173</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; ">            <span style="color: #aa4000">onNextLevelClicked:</span> <span style="color: #004012">Activity</span><span class="p">.</span><span style="color: #004012">nextLevel</span><span class="p">()</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span style="color: #aa4000">onHomeClicked:</span> <span style="color: #004012">activity</span><span class="p">.</span><span style="color: #004012">home</span><span class="p">()</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">            <span style="color: #aa4000">onHomeClicked:</span> <span style="color: #004012">activity</span><span class="p">.</span><span style="color: #004012">home</span><span class="p">()<span class="bright"></span></span><span class="bright"> </span>
</div><div style="padding: 0 8px; margin: 0 4px; ">        <span class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">remove added space</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D26196#inline-147649">View Inline</a><span style="color: #4b4d51; font-weight: bold;">guessnumber.js:71</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #aa4000">function</span> <span style="color: #004012">splitAnswer</span><span class="p">(</span><span style="color: #004012">userEntry</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #aa4000">return</span> <span style="color: #004012">userEntry</span><span class="p">.</span><span style="color: #004012">replace</span><span class="p">(</span><span style="color: #bb6688">/(\d)(?=(\d\d\d)+(?!\d))/g</span><span class="p">,</span> <span style="color: #766510">"$1 "</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">add a comment to specify what this line does, the name of the function is not relevant enough to understand what it does.</p>

<p style="padding: 0; margin: 8px;">Why not directly use the Qt function to do this (<a href="https://doc.qt.io/qt-5/qml-qtqml-number.html" class="remarkup-link" target="_blank" rel="noreferrer">https://doc.qt.io/qt-5/qml-qtqml-number.html</a>)?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D26196#inline-147650">View Inline</a><span style="color: #4b4d51; font-weight: bold;">Data.qml:31</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">            <span style="color: #766510">"level"</span> <span style="color: #aa2211">:</span> <span style="color: #766510">"1"</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">            <span style="color: #766510">"objective"</span> <span style="color: #aa2211">:</span> <span style="color: #004012">qsTr</span><span class="p">(</span><span style="color: #766510">"Guess a number between 1 and 25"</span><span class="p">),</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">is this attribute really useful?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D26196#inline-147652">View Inline</a><span style="color: #4b4d51; font-weight: bold;">Data.qml:32</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">            <span style="color: #766510">"level"</span> <span style="color: #aa2211">:</span> <span style="color: #766510">"1"</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">            <span style="color: #766510">"objective"</span> <span style="color: #aa2211">:</span> <span style="color: #004012">qsTr</span><span class="p">(</span><span style="color: #766510">"Guess a number between 1 and 25"</span><span class="p">),</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">            <span style="color: #766510">"minNumber"</span> <span style="color: #aa2211">:</span> <span style="color: #601200">1</span><span class="p">,</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">can you replace all of these with:</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);">//: first number is the minimum number and second the maximum number
qsTr("Guess a number between %1 and %2").arg(1).arg(25)?</pre></div>

<p style="padding: 0; margin: 8px;">This way, translators will only have one string to translate and this could avoid a lot of typo.</p>

<p style="padding: 0; margin: 8px;">What would be the best (but not sure if it works) would be to be able to use the minNumber/maxNumber directly, something like:</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);">qsTr("Guess a number between %1 and %2").arg(minNumber).arg(maxNumber)</pre></div></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D26196#inline-147646">View Inline</a><span style="color: #4b4d51; font-weight: bold;">Data.qml:56</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">add a newline at the end of the file</p></div></div></div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D26196">https://phabricator.kde.org/D26196</a></div></div><br /><div><strong>To: </strong>sambhavkaul, GCompris: Improvements<br /><strong>Cc: </strong>jjazeix, echarruau, kde-edu, sanjayshetty, parimalprasoon, harrymecwan, ganeshredcobra, asagtani, nityanandkumar, andreask, rahulyadav, narvaez, scagarwal, apol, timotheegiet, bcoudoin<br /></div>