Bug 392274 - The library picks the wrong data file for the de_DE locale
Summary: The library picks the wrong data file for the de_DE locale
Alias: None
Product: frameworks-kholidays
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
Depends on:
Reported: 2018-03-24 15:16 UTC by Tobias Leupold
Modified: 2018-03-25 08:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Leupold 2018-03-24 15:16:01 UTC
The holidays displayed by the default calendar widget are apparently calculated using resource files embedded into the kholidays library (why do we use resouces for this btw?).

For my "de_DE" German locale, the library chooses the "holiday_de-by_de" resource file and not the (exactly matching) "holiday_de_de" file (After all, "de-by_de" should not be accessible at all, because I can't choose such a locale).

I think the problem is located somewhere in HolidayRegion::defaultRegionCode(), but I don't know (yet) how to debug this.

I'm trying to track this down on my own, but any help would be greatly appreciated, as simply adding some qDebug() calls won't help here ...
Comment 1 Tobias Leupold 2018-03-24 19:12:31 UTC
After writing a small test application that uses kholidays, I have no idea why this happens.

KHolidays::HolidayRegion::defaultRegionCode() returns the correct "de_de", and after instatiating a KHolidays::HolidayRegion object, I also get the parsed contents of holiday_de_de when using e. g. HolidayRegion::holidays(2018), not those listed in holiday_de-by_de.

So how can it be that my system calendar (whereever that code may live) ever requests holiday_de-by_de?
Comment 2 Tobias Leupold 2018-03-25 08:51:22 UTC
Nevermind. The "wrong" locale is requested directly by the task bar's calendar plasmoid. Sorry for the spam ...