-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[docs] Add internationalization #13066
Conversation
@@ -7,6 +7,9 @@ import AppWrapper from 'docs/src/modules/components/AppWrapper'; | |||
import initRedux from 'docs/src/modules/redux/initRedux'; | |||
import findPages from /* preval */ 'docs/src/modules/utils/findPages'; | |||
import { loadCSS } from 'fg-loadcss/src/loadCSS'; | |||
import acceptLanguage from 'accept-language'; | |||
|
|||
acceptLanguage.languages(['en', 'zh']); |
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.
I'd suggest we constrain this to en
for now, get the CrowdIn l10n
branch going to accept ,Chinese translations, and once we have critical mass, add zh
back. We could then add a "request for translation" (with a link to CrowdIn) at the top of any *-zh.md
that are still in English.
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.
Should we have a menu to switch better the different languages? I think that shipping the en and zh languages with an edit button would help a lot engaging the Chinese community in the translation.
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.
Possibly, but offering an alternative translation when there is none is a false promise, which ever way it's enabled. Better to start with the users who have offered to translate, and a notification based call-to-action first, then make it live when there is some substance, and proof of future intent for others to get behind.
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.
Sounds like a plan :D
I see I broke some things, but I'm 😪 . I'll look again tomorrow. |
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.
Could you run yarn on ^1.10.0
locally? Otherwise #13055 would be reverted.
This probably won't fix the CI failure but at least it will trigger a rerun.
Ah, thanks. Wondered what was going on there! |
The prettier error that is breaking |
This PR provides the ability to render localized versions of the documentation markdown files, according to the user's language preferences.
Note: API docs and a handful repo "README" based pages are not currently supported. This is by design - API docs translation will be phase two, once we have proven the approach against structurally simpler (from a markdown perspective) files.
#9511