WeblateOrg / WeblateOrg/weblate
Incorrect export & re-import of plural strings in non-Gettext formats
- Dominant language
- Python
- Stars
- 6.1k
- Forks
- 1.4k
- Avg merge
- 9h 53m
- Merged PRs (30d)
- 395
Description
### Describe the issue
When working with strings that contain plural forms, Weblate incorrectly exports them to several non-Gettext formats (such as JSON, XLIFF, TBX, etc.).
While Gettext (.po) exports are generated correctly, the exported non-Gettext files contain invalid or incomplete plural data.
Additionally, when these exported files are imported back into Weblate, the translations become corrupted.
### I already tried
- [x] I've read and searched [the documentation](https://docs.weblate.org/).
- [x] I've searched for similar filed issues in this repository.
### Steps to reproduce the behavior
1. Export plural strings to a non-Gettext format (e.g. JSON, XLIFF, TBX, JSON).
2. Import the exported file back into Weblate.
3. Check the affected strings and their plural forms.
### Expected behavior
Plural strings should be exported correctly to all supported formats, following the format specification.
### Screenshots
### **source**
### **exported data (xliff)**
### **re-import result (xliff)**
### **exported data (json)**
### **re-import result (json)**
### Exception traceback
```pytb
```
### How do you run Weblate?
Docker container
### Weblate versions
Weblate 5.14.3
### Weblate deploy checks
```shell
```
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.