Show upper & lowercase letters in KLettres

Authored by bigpresh on Feb 5 2019, 5:17 PM.



I've started using KLettres to help teach my little boy to recognise letters and associate their sounds, and to find them on the keyboard, and I'm finding KLettres most useful - so thank you!

One point I notice that makes it a little tricky is the difference between the upper-case letter displayed, and the lower-case version on the kid-friendly keyboard I got him (in hindsight, I kinda wish I'd got an alternative model which has both upper and lowercase labels!)

I think it'd be a really useful if KLettres displayed both the upper and lowercase version of the letter, e.g. "A / a" - both to teach the association that both of those are the same letter, even though they look a bit different, and also to make it easier to match with the label on the keyboard.

What do you think? I'm mostly a backend Perl guy at heart, so I'm sure there's a cleaner/better way to do it than what I've done, but I've tested it and it does work.

The only potential sticking point I can see is that for some writing systems, upper/lower case might not make sense for certain scripts - Arabic/Hebrew etc, as far as I'm aware, don't really have a concept of capital letters. That said, I don't think any such unicameral scripts are currently supported - but I've made it only append the lowercase version if toLower() returned something different, so it should be safe if any are added in future.

Diff Detail

R333 KLettres
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
bigpresh created this revision.Feb 5 2019, 5:17 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptFeb 5 2019, 5:17 PM
Restricted Application edited subscribers, added: kde-edu; removed: KDE Edu. · View Herald Transcript
bigpresh requested review of this revision.Feb 5 2019, 5:17 PM
shubham added a subscriber: shubham.Feb 5 2019, 5:26 PM
shubham added inline comments.
75 ↗(On Diff #50960)

Sorry, but you can not credit yourself unless you are a maintainer, developer or a documenter who has done significant amount of contribution to the project.

No problems, I'm find with that being removed.

shubham removed a subscriber: shubham.
aacid added inline comments.
75 ↗(On Diff #50960)

@shubham While what you say is true that it is our custom I would have preferred if you would have been a bit more tactful while conveying the information. Something like

"Thanks for the patch, our current practices say that we only add people with significant contributions to the credits, so if we accept the patch we would do it without your name in the credits"

or something similar. It says the same but i think it's easier to read by the other person.

shubham added a comment.EditedFeb 5 2019, 6:50 PM

@bigpresh Humble sorry from my side if I sounded a bit too rude, which I didn't meant
@aacid Thanks for guiding, will keep that in mind in future.

@shubham No problems at all, no offence taken. I'm not fussed with the credit, and thinking about it, I'd agree that it's too trivial a change to really warrant a mention - particularly in an About dialog where space is limited.

aacid added a comment.Feb 5 2019, 11:44 PM

We do support both arabic and hebrew, going to do a quick test with them

aacid added a comment.Feb 5 2019, 11:52 PM

Hebrew and arabic work fine (i.e. no / appears)
I think this is probably useful, or at least not unuseful.

The code inside the if should be better as

prompt = i18nc("%1 is uppercase letter, %2 is lowercase one", "%1 / %2", m_currentLetter, m_currentLetter.toLower());

so that if some language wants to be fancy and change the / they can.

If noone disagrees i'll commit this next week wednesday.

aacid accepted this revision.Feb 13 2019, 11:10 PM

Noone complained, so landing it (with small improvements from my side and without the addCredits)

This revision is now accepted and ready to land.Feb 13 2019, 11:10 PM
This revision was automatically updated to reflect the committed changes.