-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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
fix language-not-found issues on repo page with simplified and traditional Chinese #3015
Conversation
…ional Chinese The author of github-readme-stats uses the non-standard code "cn" for simplified Chinese, see [here](https://github.com/anuraghazra/github-readme-stats?tab=readme-ov-file#available-locales). While for traditional Chinese the author only provides "zh-tw". The github-readme-stats functions on repo page will break if the user sets the site language to ALL variants of Chinese except for zh-tw. This hack is to make all sub-variants of simplified Chinese fall back to "cn" and all sub-variants of traditional Chinese fall back to "zh-tw".
✅ Deploy Preview for relaxed-lollipop-b6bc17 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
try to satisfy Prettier requirement
switch to the `case-when` structure to make code eaiser to maintain in the future.
switch to the `case-when` structure to make code eaiser to maintain in the future.
You should use Line 18 in 10d007a
Also, you are missing the use of the |
Implemented the requested changes. |
implemented the requested change
implemented the requested change
fixed a typo
impleted the requested change
implemented the requested change
tried my best to make prettier happy...
tried my best to make prettier happy...
Thanks for your contribution! |
The author of github-readme-stats uses the non-standard code "cn" for simplified Chinese, see here. While for traditional Chinese the author only provides "zh-tw". The github-readme-stats functions on repo page will break if the user sets the site language to ALL variants of Chinese except for zh-tw. This hack is to make all sub-variants of simplified Chinese fall back to "cn" and all sub-variants of traditional Chinese fall back to "zh-tw".
This patch fixes the problem and has been tested locally & with GitHub pages.