-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Add TransText component to allow Trans behaviour for strings #641
Conversation
Would love to have this in! |
Thanks @AndrewBestbier! Do any maintainers have an opinion on this? |
Related with this discussion: #626 Sorry for taking so long, I had an accident and have been in the hospital for a while. Now that I'm back, I'll take a good look at the PR during this week. I think it's a good idea, but I don't know if there was a more practical solution, I'll check it out. |
No problem - sorry to hear about your accident! |
Sorry, I removed the canary branch when I made the release by accident and the PRs that were open have been closed. I am committed to review the PR during this week. Sorry for the delay. And thank you very much for the contribution. |
No worries - let me know if you have any feedback I can help out with! |
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 very much for your contribution! 🤗
Sorry for the delay in reviewing the PR. I see the PR very well 😊
I think it's good that there is a different component just for this and not give a thousand options to the Trans
component, so who uses the Trans
does not import code and avoid conflicts with i18nKey
and text
. Therefore, perfect👏
Do you think it would be too much to ask to add in the README information about the TransText component 🤔? If it is too much trouble I can merge the PR and we will do it.
Hi @aralroca - sure, no problem! Thanks for the kind review. Looking forward to getting this merged. I'll add a README update to this PR in the next day or two. |
4e11a0d
to
3dba4d4
Compare
@all-contributors please add @dndhm for code, test and documentation |
I've put up a pull request to add @dndhm! 🎉 |
Thanks @dndhm !! I prereleased on 1.3.0-canary.3. It will be finally released on the next release 1.3.0 |
Great, thanks! Happy to be involved! 🎉 |
Because
Trans
handlesuseTranslation
internally, it means it cannot easily be used in conjunction withreturnObjects
when mapping over arrays of values containing components:Rather than extending and overloading
Trans
, I am using a simple text-only version of it in a project locally, which I feel could be usefully added to the core package:The functionality of
Trans
remains unchanged. I have hoistedformatElements
into a separate file so it can be used by bothTrans
andTransText
.