crowdin auto translations do not consider JSX substitutions as tokens
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the Trans macro's JSX substitution tokens are extracted and uploaded to Crowdin, then inspect the Google Translate and Crowdin auto-translation path. Reproduce the Arabic case and verify that tags such as <0/> remain unchanged in the generated translations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- localization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100