We are using react-easy-edit in a multi-language application and lingui.js does all the translation work.
lingui.js uses JSX elements (e.g. <Trans> ) to process any translated strings:
<EasyEdit
type="text"
placeholder={
<Trans>
Your CO<sub>2</sub> report
</Trans>
}
/>
This leads to warnings during testing and in production:
Warning: Failed prop type: Invalid prop `placeholder` of type `object` supplied to `EasyEdit`, expected `string`.
at EasyEdit (/home/nschroeter/git/react-easy-edit/src/lib/EasyEdit.jsx:19:5)
As you can imagine, there will be literally thousands of warnings because the complete UI is being translated.
This PR should make it possible to pass JSX elements as placeholder values, including tests.
We are using react-easy-edit in a multi-language application and lingui.js does all the translation work.
lingui.js uses JSX elements (e.g.
<Trans>
) to process any translated strings:This leads to warnings during testing and in production:
As you can imagine, there will be literally thousands of warnings because the complete UI is being translated.
This PR should make it possible to pass JSX elements as placeholder values, including tests.