Show all available holiday regions
ClosedPublic

Authored by vkrause on May 4 2020, 3:35 PM.

Details

Summary

The previous approach was forcing unique labels, which fails in many cases
where we have multiple holiday files for a country. In most cases their
disambiguation is only in the description, not the (country) name.

This would be nicer if name() would actually contain the full region name,
not just the country, but lacking that I didn't see an alternative to
squeezing the description into the combo box as well.

As a result I can now actually pick from about a dozen holiday regions for
Germany for example, rather than getting a random one of those.

Diff Detail

Repository
R210 KOrganizer
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vkrause created this revision.May 4 2020, 3:35 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptMay 4 2020, 3:35 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
vkrause requested review of this revision.May 4 2020, 3:35 PM
dvratil accepted this revision.May 6 2020, 11:56 AM
This revision is now accepted and ready to land.May 6 2020, 11:56 AM
This revision was automatically updated to reflect the committed changes.
winterz added a subscriber: winterz.May 6 2020, 8:02 PM

I understand the motivation for this change. However, it is pretty ugly and verbose.

maybe we can do something in KHolidays API itself to provide a prettier string.

Ideally "German (German) - Feiertage fur Deutschland (Bayern)" would become tr("Germany/Berlin (German)")?
I don't think we need to see "Feiertage fur Deutschland"

knauss added a subscriber: knauss.May 6 2020, 11:08 PM

Ideally "German (German) - Feiertage fur Deutschland (Bayern)" would become tr("Germany/Berlin (German)")?
I don't think we need to see "Feiertage fur Deutschland"

"Germany/Bavaria (German)" would be the translation for that. "Germany/Berlin (German)" would be the holidays for Berlin.

I think to have access to the description somehow is very helpful, as it may be not clear what is included in a calendar. So I see for Sweden, that "flag days" are included in that calendar.

But why not simply change the name for those holidays? I checked Plasma settings I see that UK and Australia just named calendars like "England and Wales", "Queensland" or "Nothern Ireland", so they workaround this issue by having unique names. Also Sweden has the names-day calendar with a unique name. So it seems that not everyone is on the same page, that name should only reflect the name of the country. So why not do the same for Germany rename the calendars and add note at the documentation, that names need to be unique?

renaming the description to "Feiertage für Bayern" this also would improve the readability in Plasma settings, if the description does not repeat the countries name.

I understand the motivation for this change. However, it is pretty ugly and verbose.

maybe we can do something in KHolidays API itself to provide a prettier string.

Ideally "German (German) - Feiertage fur Deutschland (Bayern)" would become tr("Germany/Berlin (German)")?
I don't think we need to see "Feiertage fur Deutschland"

I completely agree, I just didn't find anything better available right now. Are all holiday regions we have matching ISO 3166-2 regions? If so, iso-codes should have translations for all of them already.