Search code examples
weblate

Why weblate import of JSON does not respect the original order?


I've just installed Weblate to host our translation projects. It's working fine, but the import process of our JSON files is creating the strings in a different order than the original ones.

The result is that nerby messages are not the same than in the original files; the strings are mixed, and so it will be very difficult for translators to work in that order.

Why is the original order (present in JSON files) not respected? Is it possible to respect it?

Thanks in advance.


Solution

  • The reason is that translate-toolkit which is library that Weblate uses doesn't respect it. It should be quite easy to adjust jsonl10n storage to use OrderedDict to fix this.

    Update: This seems to be fixed as of translate-toolkit 1.14.0-rc1.