Taiwanese holidays
ClosedPublic

Authored by shrapnel on Apr 16 2020, 5:35 AM.

Details

Reviewers
Zren
winterz
Group Reviewers
VDG
Commits
R175:4d947fa1ca59: Taiwanese holidays
Summary

Added file containing taiwanese holidays in holidays/plan2/holiday_tw_zh

Diff Detail

Repository
R175 KHolidays
Lint
Lint Skipped
Unit
Unit Tests Skipped
shrapnel created this revision.Apr 16 2020, 5:35 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 16 2020, 5:35 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
shrapnel requested review of this revision.Apr 16 2020, 5:35 AM
shrapnel edited the summary of this revision. (Show Details)Apr 16 2020, 5:40 AM

you need to add the change to holidays.qrc to this patch

shrapnel updated this revision to Diff 80277.Apr 16 2020, 2:16 PM
shrapnel edited the summary of this revision. (Show Details)

Added holiday_tw_zh to holidays.qrc-file (I'm new to git/phabricator so hopefully it makes sense)

Zren added a comment.Apr 16 2020, 2:58 PM

Now you're missing holidays/plan2/holiday_tw_zh which can still be seen here: https://phabricator.kde.org/D28874?id=80260

git add holidays/holidays.qrc
git add holidays/plan2/holiday_tw_zh
git diff --staged > D28874.diff
shrapnel updated this revision to Diff 80288.Apr 16 2020, 3:12 PM

Hopefully the changes to both files are there now

winterz requested changes to this revision.Apr 16 2020, 3:30 PM

testing fails. don't know why yet.

This revision now requires changes to proceed.Apr 16 2020, 3:30 PM

problems:

  • "religous" should be "religious"
  • missing ':' at the start of Constitution Day
    • missing ':' at the start of Christmas Day
Zren added a comment.Apr 16 2020, 4:31 PM

There's a few extra spaces at the end of "植樹節 " and "中秋節 補假 " too.

Not sure how well you know git, but make sure to run git add holidays/plan2/holiday_tw_zh again after making your changes, before running git diff --staged to upload the modified diff.

shrapnel updated this revision to Diff 80303.Apr 16 2020, 5:17 PM

Fixed the typos

Zren added a comment.Apr 16 2020, 5:48 PM

Phab only understands .diff. Phab does not recognize .patch.

git diff --staged > D28874.diff

Or:

git diff origin/master > D28874.diff
shrapnel updated this revision to Diff 80346.Apr 17 2020, 5:01 AM

Uploaded .diff instead of .patch

remove holidays/0001-added-holiday_tw_zh-and-updated-holiday.qrc.patch

shrapnel updated this revision to Diff 80415.Apr 17 2020, 5:44 PM

Removed patch-file

winterz accepted this revision.Apr 17 2020, 6:53 PM

looks good. all tests pass.

could someone commit this for us?

This revision is now accepted and ready to land.Apr 17 2020, 6:53 PM

Do you not have commit access? I thought you were the maintainer based on the repo's history!

Do you not have commit access? I thought you were the maintainer based on the repo's history!

Yes of course.
I'm asking for assistance at this time.

Sure, I can do it.

This revision was automatically updated to reflect the committed changes.
nhiga added a subscriber: nhiga.EditedApr 26 2020, 12:48 PM

Thank you for your attempt to add Taiwanese holidays to KDE. However, I am afraid that this patch has to be reviewed again.

The dates for some holidays (including, but not limited to, Spring Festival (also known as "Lunar New Year") and the Mid-Autumn Festival) are different every year because some holidays are determined based on the Lunar Calendar (農曆). That means one has to specify the exact dates for each year, just like the holiday_hk_* files.
If you look at the table in the English Wikipedia entry for Public holidays in Taiwan carefully, you will notice that some holidays follow Chinese calendar instead of the Gregorian calendar.

Therefore, we should try to refer to the relevant laws and regulations, and use government-published documents as sources for accuracy. In this case, we should refer to the law "紀念日及節日實施辦法" (only available in Chinese). In addition, the Ministry of the Interior, R. O. C. (Taiwan) publishes a document listing the exact dates of public holidays each year ("public" here means "放假", carrying the meaning of being a day off). The document for 2020 can be found here (Note that the ROC era is used, so Year 109 means 2020).

The public holidays as well as the official commemorative holidays are already complicated, so I think for the time being it would be better to exclude non-official holidays such as Halloween or Christmas.

Thank you for your attention.

holidays/plan2/holiday_tw_zh
16

Shouldn't this line be zh (or zh_TW) instead? It looks like the format for the "language" metadata entry has been <language> or <language>_<region>.

nhiga added a comment.Apr 27 2020, 1:42 AM

By the way, the holiday file for People's Republic of China (i.e. mainland China) also needs update too because the dates of Lunar calendar based holidays are only available for 2009.
The comment in the file says "these have to wait for lunar calendar support", but it looks like Qt and KDE have yet to support Lunar calendar, so we have to update the dates manually for the time being.

I will see whether I can update the holiday files for both Taiwan and mainland China to make them more accurate.

I just wanted to say thank you to everybody for taking the time. Taiwan is available in the clock/calendar settings now, really cool!