-
Notifications
You must be signed in to change notification settings - Fork 53
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
Support chinese traditional #1245
Conversation
Currently translated at 99.2% (541 of 545 strings) Translation: OTP-react-redux/OTP-RR Main UI Translate-URL: https://hosted.weblate.org/projects/otp-react-redux/otp-rr-main-ui/es/
Currently translated at 93.3% (509 of 545 strings) Translation: OTP-react-redux/OTP-RR Main UI Translate-URL: https://hosted.weblate.org/projects/otp-react-redux/otp-rr-main-ui/zh_Hant/
Currently translated at 93.3% (509 of 545 strings) Translation: OTP-react-redux/OTP-RR Main UI Translate-URL: https://hosted.weblate.org/projects/otp-react-redux/otp-rr-main-ui/zh_Hant/
…), Simplified as either zh or z
// (The lang is the first portion of the locale.) | ||
const lang = matchedLocale.split('-')[0] | ||
document.documentElement.lang = lang | ||
document.documentElement.lang = matchedLocale |
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.
The HTML lang
tag can be a locale (language-suffix format) so we should be good here. See for instance https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang.
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.
Packages updated and looking good to me!!
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!
Thanks for updating the OTP-UI packages! |
Description
Requires opentripplanner/otp-ui#741.
This PR adds support for Chinese Traditional (
zh-Hant
in config,zh_Hant.yml
for the content), including translated content from #1243 and code changes needed to enable that language. The Chinese (Simplified) file is renamed tozh_Hans.yml
.Config changes:
zh
is still supported by itself, i.e. if no other Chinese languages are configured such as Chinese (Traditional).zh-Hans
.PR Checklist