"Translation" moved from start to end of json object in 2nd extract
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 457
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 16
Description
### Verifications
- [x] I've searched [existing issues](https://github.com/lingui/js-lingui/issues) and this hasn't been reported yet.
- [x] I've checked [the docs](https://lingui.dev) and this isn't expected behavior.
- [x] I'm using the latest version of Lingui, and the problem still occurs.
### Description
Since the first extract adds the translation to the front then it gets moved on merge there are PRs that show a json diff of this line being moved. Just add it to the end from the start
### Reproduction Link
_No response_
### Reproduction Steps
1. Create a new string
2. Run extract and merge PR
3. Pull latest and add different strings
4. Notice the json diffs will include the "translation" line being moved from the top to the bottom
### Expected Behavior
"Translation" line is added to the bottom on every extract run
### Macro Support
Babel with @lingui/babel-plugin-lingui-macro
### Lingui Version
6.4.0
### Babel / SWC Version
_No response_
### Node Version
_No response_
### Framework
_No response_
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
Reproduce the Lingui 6.4.0 extraction and merge flow described in the issue, starting with a new string and then adding more strings. Trace the extraction code that orders entries in the JSON output. Done means the "translation" line is appended at the end on every extract run, so subsequent pull requests no longer show it moving.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- internationalization, localization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100