Calendar: Use correct language for month and day names
ClosedPublic

Authored by drosca on Apr 8 2017, 8:41 AM.

Details

Summary

Apply fix for bug 353715 also on QML side.

Test Plan

I have English ui language + Czech time format. Months and days are now in English and not Czech.

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
drosca created this revision.Apr 8 2017, 8:41 AM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptApr 8 2017, 8:41 AM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
mck182 accepted this revision.Apr 11 2017, 2:54 AM

...provided the usage of uiLanguages[0] is safe like this.

src/declarativeimports/calendar/qml/DaysCalendar.qml
315

Now I'm not entirely sure but can the uiLanguages[0]
possibly return null?

This revision is now accepted and ready to land.Apr 11 2017, 2:54 AM
drosca added inline comments.Apr 11 2017, 7:24 AM
src/declarativeimports/calendar/qml/DaysCalendar.qml
315

It's used exactly the same on the C++ side (without the bounds check), so I assume it's safe as that code is now over 2 years old.

This revision was automatically updated to reflect the committed changes.
markg added a subscriber: markg.Apr 11 2017, 3:13 PM

I'm just curious. Why is the day name determined in QML (in the lines you edited, but was there before as well) and on the C++ side?
It smells like a redundancy.

As far as i can tell (only looked for a moment), the dayName on the C++ side isn't used "in" the C++ side. It's sole purpose is to be used by QML.
I'm fine with whatever you do though :)