Summary: | calendar popup ignores language locale for month/day names | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | arne anka <kde-bugs> |
Component: | Digital Clock | Assignee: | Martin Klapetek <mklapetek> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kde, kde, plasma-bugs |
Priority: | NOR | ||
Version: | 5.3.2 | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/plasma-framework/6f3fed77d59227a9b3ec85d343ffb2443086f7fa | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | screenshot showing calendar using de_DE while context menu uses the expected english (C) texts |
Description
arne anka
2015-10-09 11:24:57 UTC
Created attachment 94906 [details]
screenshot showing calendar using de_DE while context menu uses the expected english (C) texts
Looks like a Qt bug, iirc we ask it for the month names. Kinda, I looked into this. On Unix there are multiple locales used - one for text one for dates. However, when we do QLocale's date to string - that uses the qlocale that we set for dates, not for lang - and then naturally we get translated text. We could force it to use the locale from $LANG - but then it's technically the wrong locale Git commit 6f3fed77d59227a9b3ec85d343ffb2443086f7fa by Martin Klapetek. Committed on 18/11/2015 at 17:38. Pushed by mklapetek into branch 'master'. [calendar] Use ui language for getting the month name Simple QDate::longMonthName(..) won't do the job as it will return the month name using LC_DATE locale which is used for date formatting etc. So for example, in en_US locale and cs_CZ LC_DATE, it would return Czech month names while it should return English ones. So here we force the first ui language locale and take the month name from that. REVIEW: 125705 M +12 -1 src/declarativeimports/calendar/calendar.cpp http://commits.kde.org/plasma-framework/6f3fed77d59227a9b3ec85d343ffb2443086f7fa |