D9360: Adding feature to change letters to capital and back (Ref: T5936)

Johnny Jazeix noreply at phabricator.kde.org
Tue Dec 26 19:38:18 UTC 2017

jjazeix added inline comments.


> LetterInWord.qml:69
>              property alias wordsModel: wordsModel
> +            property bool isCaps
>              property int currentMode: normalModeWordCount

not a good variable name

> LetterInWord.qml:143
> +                            width: column.width - 50
> +                            text: items.isCaps ? qsTr("Change to small letters") : qsTr("Change to capital letters")
> +                            checked: (items.isCaps) ? true : false

We can have a combobox with the 3 possible values instead: lowercase, uppercase and mixed (we randomly choose if lower or upper) and we can be more precise telling it's only the letter to find that will be in lower/uppercase (the words won't be affected by this setting).

> LetterInWord.qml:152
> +                                }
> +                                Activity.initLevel();
> +                            }

you should only reload the level on onSaveData where you need to store the value

> letter-in-word.js:121
>      currentLetter = questions[currentSubLevel];
> -    items.question = currentLetter
> +    items.question = items.isCaps ?  currentLetter.toUpperCase() : currentLetter;
>      items.animateX.restart();

if I'm not wrong (I didn't tested), there is a global configuration option to set all the texts in uppercase.
If we choose lowercase for this activity (but there is uppercase in global configuration), we should check here that the letter is displayed in lowercase

  R2 GCompris


To: rohitdas, #gcompris, #gcompris_improvements, jjazeix
Cc: jjazeix, #kde_edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20171226/83636114/attachment.html>

More information about the kde-edu mailing list