D26196: Add multiple dataset in guessnumber activity
Johnny Jazeix
noreply at phabricator.kde.org
Thu Dec 26 10:04:44 GMT 2019
jjazeix added a comment.
In D26196#582682 <https://phabricator.kde.org/D26196#582682>, @echarruau wrote:
> 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.
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 https://phabricator.kde.org/M146/541/
INLINE COMMENTS
> AnswerArea.qml:71
> onUserEntryChanged: {
> - if(userEntry != "")
> + if(userEntry != "")
> Activity.setUserAnswer(parseInt(userEntry))
remove the added space at the end
> Guessnumber.qml:173
> onNextLevelClicked: Activity.nextLevel()
> - onHomeClicked: activity.home()
> + onHomeClicked: activity.home()
> }
remove added space
> guessnumber.js:71
> +function splitAnswer(userEntry) {
> + return userEntry.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1 ");
> +}
add a comment to specify what this line does, the name of the function is not relevant enough to understand what it does.
Why not directly use the Qt function to do this (https://doc.qt.io/qt-5/qml-qtqml-number.html)?
> Data.qml:31
> + {
> + "level" : "1",
> + "objective" : qsTr("Guess a number between 1 and 25"),
is this attribute really useful?
> Data.qml:32
> + "level" : "1",
> + "objective" : qsTr("Guess a number between 1 and 25"),
> + "minNumber" : 1,
can you replace all of these with:
//: first number is the minimum number and second the maximum number
qsTr("Guess a number between %1 and %2").arg(1).arg(25)?
This way, translators will only have one string to translate and this could avoid a lot of typo.
What would be the best (but not sure if it works) would be to be able to use the minNumber/maxNumber directly, something like:
qsTr("Guess a number between %1 and %2").arg(minNumber).arg(maxNumber)
> Data.qml:56
> +}
> \ No newline at end of file
add a newline at the end of the file
REVISION DETAIL
https://phabricator.kde.org/D26196
To: sambhavkaul, #gcompris_improvements
Cc: jjazeix, echarruau, kde-edu, sanjayshetty, parimalprasoon, harrymecwan, ganeshredcobra, asagtani, nityanandkumar, andreask, rahulyadav, narvaez, scagarwal, apol, timotheegiet, bcoudoin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20191226/42a20246/attachment-0001.html>
More information about the kde-edu
mailing list