Implement Trans component#18
Open
DRFR0ST wants to merge 16 commits into
Open
Conversation
React from 16.X to 18.X Webpack from 4.X to 5.X
Only for withLittera HOC that is suggested not to be used
|
|
Collaborator
Author
|
We have pushed a nightly release that includes the Trans component. To update run: |
+ Clean up code and dependencies
9 tasks
Collaborator
Author
|
/reviewpad summarize |
Contributor
|
Reviewpad Report
React from 16.X to 18.X
Only for withLittera HOC that is suggested not to be used' (50dfbba)
Fatal
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

📜 Description
This PR adds a new feature to the project: the Trans component. The Trans component is a custom translation component that can interpolate variables and parse HTML elements.
The Trans component takes three props:
children- The translation string to be rendered.values- An object containing values to be interpolated in the translation string.components- An object containing custom React components or HTML tags to be parsed and rendered.This PR also includes an updated version of
package.json.🧪 How to test this?
To test this PR, follow these steps:
trans-componentbranch.yarn install.yarn test.yarn linkwhile in the root directory.npx create-react-app ./PlaygroundApp --template=typescriptyarn link @assembless/react-litterawhile in the apps root directory.http://localhost:3000to see the Trans component in action.🚀 Examples
Here are a few examples of how to use the Trans component: