Bug Description
When you use the Trans macro and include JSX components, e.g.:
import {Trans} from '@lingui/macro';
function MyComponent() {
return <Trans>Hello <UserName/></Trans>;
}
The source string gets extracted and uploaded to Crowdin correctly as
Hello <0/>
However, the auto translation by Google Translate that we have set up in Crowdin does not recognize JSX tags as substitutions, and will for certain languages mess with the <0/> tag, e.g. for Arabic:
As a result, the automatic translation uploads a bunch of broken translations to the repository
Expected Behavior
The JSX substitution tokens are not modified by Crowdin
Additional Context
Crowdin's translation service has the same problem
I don't think substitution tokens that use the format {0}, {1}, etc. are affected
I don't think a render function would work, because the placement of the component within the rendered translation may change depending on the language.
Bug Description When you use the
Trans
macro and include JSX components, e.g.:The source string gets extracted and uploaded to Crowdin correctly as
However, the auto translation by Google Translate that we have set up in Crowdin does not recognize JSX tags as substitutions, and will for certain languages mess with the
<0/>
tag, e.g. for Arabic:As a result, the automatic translation uploads a bunch of broken translations to the repository
Expected Behavior
The JSX substitution tokens are not modified by Crowdin
Additional Context
Crowdin's translation service has the same problem
I don't think substitution tokens that use the format
{0}
,{1}
, etc. are affected