Skip to content

Incorrect export & re-import of plural strings in non-Gettext formats #17407

@anastasiialz

Description

@anastasiialz

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

  • I've read and searched the documentation.
  • 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

Image

exported data (xliff)

Image

re-import result (xliff)

Image

exported data (json)

Image

re-import result (json)

Image

Exception traceback

How do you run Weblate?

Docker container

Weblate versions

Weblate 5.14.3

Weblate deploy checks

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Waiting for: TriageAssigned automatically for any new issue, needs attention from a Weblate member.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions