holidayregion.cpp - provide translatable strings for the German regions.
ClosedPublic

Authored by winterz on May 9 2020, 9:21 PM.

Details

Summary

The German holiday files now all have a proper country and name
since commits 4bdc6f618e77348eeafa5e802154b95febc27eab
and 8b3f65ed1f40975aa559881fc3116029b7e7677e

this patch allows those names to be translated.

also we can see the subdivision code in the regionName
in the case we have a subdivision but no name.
i.e say we have country "XX-YY" but name field is empty
then we have regionName = countyCode(XX)(yy)

Diff Detail

Repository
R175 KHolidays
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 26653
Build 26671: arc lint + arc unit
winterz created this revision.May 9 2020, 9:21 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 9 2020, 9:21 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
winterz requested review of this revision.May 9 2020, 9:21 PM

I'm guessing it's ok to depend on K5I18N ?

I'm guessing it's ok to depend on K5I18N ?

KHolidays is a Tier 1 framework, so it can't depend on KI18n. Just use QCoreApplication::translate as used already in src/holidayregion.cpp.

winterz updated this revision to Diff 82398.May 9 2020, 9:43 PM

don't try to provide translatable string for unknown subdivisions

winterz updated this revision to Diff 82442.May 10 2020, 2:02 PM

QLatin1-ify

vkrause accepted this revision.May 11 2020, 9:55 AM
This revision is now accepted and ready to land.May 11 2020, 9:55 AM
This revision was automatically updated to reflect the committed changes.