Summary: | kmail mistakenly uses genetive while displaying months only in message list (in Polish, language dependent) | ||
---|---|---|---|
Product: | [Unmaintained] kmail | Reporter: | Marcin Trybus <mtrybus> |
Component: | new message list | Assignee: | Szymon Stefanek <pragma> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kollix, mss, to.roma.from.kdebug, tommi.nieminen |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Illustration of the bug (yellow areas used for privacy) |
Description
Marcin Trybus
2009-06-11 23:42:24 UTC
Could you please post a screenshot of what you see ? It looks like you're talking about strings that come from a call to QDate::longMonthName(), but I need to be sure. Created attachment 34497 [details]
Illustration of the bug (yellow areas used for privacy)
That's how the bug looks like. Since it's all about language I'll briefly describe what's wrong.
1. List of old messages contains month names in genetive, eg. "Maja" in top line. Date in Polish (and other Slavic languages I'm familiar with) uses genetive only for full dates (eg. day+month, or day+month+year). In this instance (month, or month+year only) nominative should be used instead. Both forms are available in language pack, so it's just a matter of picking the right form for each case.
2. In the blue pop-up on the right we read "Wątki z wiadomościami stworzonymi Czerwca 2008." Genetive is used where locative should be. This is not even a grammatical error, it's an abomination. Locative is most likely not included into the language pack, so it could use some thought from the language team(s) on how to rephrase that. At the very least nominative should be used, which is just as wrong but not half as repulsive. That's how the translations of unpolished programs and closed source programs usually handle this. Not that I approve that, but it's done for the sake of lower complexity.
Polish with its 7 noun cases (and again other Slavic languages) don't take word manipulation as lightly as eg. English. I don't expect this to be perfect, but problem #1 is fixable, whereas problem #2 could be improved even without coding.
I think I know how this comes about: KMail seems to obtain the month name by parsing the long date format string, not by directly requesting the month name from the locale. The long date format is set in KDE regional settings. In English with only one (or two) morphological cases, you can use that string to get a month name (eg., “13 July 2009” -> strip date and year -> “July”). In most languages it’s more complicated than that. In Finnish, for instance, the correct long date format would be ”13. heinäkuuta 2009” (where “heinäkuu” ‘July’ – month names are not capitalized in Finnish unless at the beginning of a sentence), and quite as expected, KMail now uses “Heinäkuuta” as the header in aggregation by date, not “Heinäkuu” or even “Heinäkuussa” ‘in July’ which would be acceptable. The solution then is easy: don’t try to parse the long date format string but instead get the month name directly from the locale. It should be possible, since the KDE regional settings configuration module can do it too. What date format do you use (kmails configure dialog / appearance / message list) ? @comment #3: no, we're not parsing a string here. I wonder whether we are talking about two different things. *I* didn’t mean date strigns in the message list, which are controlled in KMail’s settings dialog, but the aggregation and group headers. The former are OK, the latter are not. Currently I’ve set the long date formatting string in KDE’s regional settings to “WEEKDAYna dD. MONTHta YYYY” (the formatting variables are actually localized too but let’s skip that). Now, it’s exactly “MONTHta” that appears in the my KMail aggregations and group headers. If I change the formatting string the regional settings, KMail’s usage follows that change. However, it’s clear that KDE somewhere holds the original, un-case suffixed, month names too, since the formatting variable MONTH can fetch them. I just had a quick look yesterday into the code and I thought it uses the kmail setting - however, I was wrong. I already found the code where the monthname etc. is created for the GroupHeader - and it's currently not using KDE's locale/calendarsystem. I'm checking how to best fix that. *** Bug 191883 has been marked as a duplicate of this bug. *** *** Bug 178754 has been marked as a duplicate of this bug. *** SVN commit 1019109 by mkoller: BUG: 196108 Use KDE's locale/calendar settings for the Group Header in aggregations M +9 -46 model.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1019109 SVN commit 1023670 by vkrause: Merge SVN commit 1019109 by mkoller from trunk: CCBUG: 196108 Use KDE's locale/calendar settings for the Group Header in aggregations M +9 -46 model.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1023670 |