Bug 392274

Summary: The library picks the wrong data file for the de_DE locale
Product: [Frameworks and Libraries] frameworks-kholidays Reporter: Tobias Leupold <tl>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED NOT A BUG    
Severity: normal CC: tl
Priority: NOR    
Version: git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

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 ...