-
Notifications
You must be signed in to change notification settings - Fork 396
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
feat: add translations
prop to search button
#995
Conversation
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.
@francoischalifour please take a look at this.
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.
Thank you @slorber!
There will be other texts that we want to translate like the aria-label
of the button. So I think we should rather pass a translations
prop with a few keys:
type Translations = Partial<{
buttonText: string;
buttonAriaLabel: string;
}>
Wdyt?
(Thanks for letting us know about React.ComponentProps
.)
sure, just updated |
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.
Thanks!
translations
prop to search button
Released in |
thanks :) |
Seems that this prop is not available in the |
@meteorlxy This prop is only available on the |
@francoischalifour was wondering if you could create an issue to track i18n support? Some Docusaurus users asked about this and want to have a link to give them ;) |
Hi @slorber, Here's some resources you can share with your users: As DocSearch v3 rely on Autocomplete v1 (which has just been released), we are re-thinking the way we would like to ship a stable version of it. The next steps are:
We will start working on it in the coming months, and will make sure to let you know what's the progress on it! |
thanks :) |
@shortcuts Any progress on this yet? Estimated arrival? Thanks. |
Hey @stnor, this task has been delayed for DocSearch but is done on Autocomplete. I'll tackle it in the next two weeks! |
Summary
Ability to translate DocSearch placeholder label, a low hanging fruit as it's the most visible one, but there are probably other labels to allow translating (including aria attributes).
This is a pseudo code suggestion, not sure it works yet :)
You may be happy to know about
ComponentProps
in TS :)Result