New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[locale] zh-cn: Improve next/prev week #5447
[locale] zh-cn: Improve next/prev week #5447
Conversation
@ulion Do you need to fix |
Probably we need ask some contributors who are actually in those areas,
since the usage maybe different due to different culture.
Alan Wang <notifications@github.com> 于2020年4月20日周一 上午10:56写道:
… @ulion <https://github.com/ulion> Do you need to fix zh-hk.js and zh-tw.js
simultaneously?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5447 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABKYHNXS5PAACRGUB6EDSTRNO2V5ANCNFSM4MLWX5TQ>
.
--
Ulion
|
@zenozeng can you comment on that please. |
if (now.week() !== this.week()) { | ||
return '[下]dddLT'; | ||
} else { | ||
return '[本]dddLT'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to explicitly mention 本
for the current week?
return '[本]dddLT'; | |
return 'dddLT'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is about accurate, when your are in Saturday, you say Sunday, it will be the next week's Sunday, means '下'(next) week, not '本'(this) week
But this nearest rule is not explicated, so you probably don't know which week it is. while on the other hand, if you say Monday of this week (本周一), Sunday of this week(本周日), it's explicated located an accurate day which refer to current day, share the same week, in certain culture (with the Sunday belong to previous week or next week rule setup).
And before the commit mentioned in my PR which resulted wrong calendar output, the code did this too, which is the proper way to make the representation of the day as explicated accurate as possible and simple. Just as you said Monday of next week (下周一),the Monday of this week(本周一) is simply same rule and same clear. while just "Monday" would be unclear if you are in a day which is more close to the next Monday.
I already mentioned @ben-lin @hehachris @skfd who authored that two locale. I'm not sure the culture of that two region indeed, so can not decide for them. let them help themselves would be best. |
2af84df
to
563b898
Compare
@marwahaha updated. |
@ulion You may need to run eslint fix and prettier
|
563b898
to
b961799
Compare
Done.
Kunal Marwaha <notifications@github.com> 于2020年5月19日周二 下午9:20写道:
… @ulion <https://github.com/ulion> You may need to run eslint fix and
prettier
./node_modules/eslint/bin/eslint.js Gruntfile.js tasks src --fix
npm run prettier-fmt
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5447 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABKYHL6NA3FMGUGR4QBL33RSKBQFANCNFSM4MLWX5TQ>
.
--
Ulion
|
@ulion I am not sure we will get the original locale authors to approve. If you like, please add yourself as a locale author for zh-cn. |
Ok. |
Thank you for asking, I would love to be a locale author of 'zh-cn' language, hope to help you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This error was introduced by f38d69c
This PR mostly restore the calendar output to the most common formats, which is almost quite same with what it was before above commit.
This PR passed the test and will fix:
#4097
#4149
#4354
#5414
And you can close other invalid PR like: #5357