Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
refactor(v2): add more translatable strings #4219
refactor(v2): add more translatable strings #4219
Changes from 1 commit
d2c41d3
3e258b6
d6bdb2d
23e3500
ea9987c
09794cc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
we'll have a similar page/label for docs as docs are going to have tags soon, and feel we'll be able to factorize so the id may be updated later to "theme.TagList.label" or something.
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.
Yes, this is a missing piece that I'd like to add, not sure how yet.
React-intl has this feature to handle these kind of cases, and allow to even inject components into a translated string (like a link). But I want to add a very minimal runtime, not something too heavy with many features we don't need. If you know a good lib for that let me know
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.
not 100% related but kind of the same problem if you want to interleave links in a translated string.
On Jest website I used a markdown parser on the client (v1 had a MarkdownBlock component), and it allows to wire the Docusaurus link for the markdown links somehow.
But if we make all this possible through the Translate component, I'd like to avoid the cost of shipping a full md parser to the client.