<table><tr><td style="">echarruau 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/D18600">View Revision</a></tr></table><br /><div><div><p>We need to have a more generic code.<br />
If you put the data to sort into the ressource directory e.g.</p>
<p>qsTr("a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z")</p>
<p>You don't need this test anymore:</p>
<p>if (mode == "alphabets") {</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);"> //: list containing all the characters separated by a "/"
var letters = qsTr("a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z")
alphabets = letters.split("/")
}</pre></div>
<p>Also creating a new ordering activity (alphabetical / images/ ascending / descending) will be done with the same generic code, the only differences will be in the external reference file.<br />
This external reference file should contain the name of the activity, its objective, different levels, and the data to order.</p>
<p>These data should also be images to be able to order animal sizes for example or planets weights</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R2 GCompris</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D18600">https://phabricator.kde.org/D18600</a></div></div><br /><div><strong>To: </strong>AkshayCHD, GCompris: Activities, jjazeix<br /><strong>Cc: </strong>jjazeix, echarruau, kde-edu, GCompris: Activities, harrymecwan, ganeshredcobra, nityanandkumar, rahulyadav, narvaez, scagarwal, apol, timotheegiet, bcoudoin<br /></div>