WeblateOrg / WeblateOrg/weblate
Order of strings in monolingual translations should match template order
- Dominant language
- Python
- Stars
- 6.1k
- Forks
- 1.4k
- Avg merge
- 9h 53m
- Merged PRs (30d)
- 395
Description
### Describe the problem
I've noticed that the order of strings in translated Fluent files for Tor Browser do not match the order in the original en-US file.
Instead, it seems that the strings are ordered by when the unit was created, or the order in which strings have been translated.
E.g. if I have the original file:
```
message-1 = First
message-2 = Second
```
and on Weblate I first translate `message-2` and then translated `message-1`, the resulting translated file is:
```
message-2 = Second translated
message-1 = First translated
```
This makes it more difficult to compare the translated files with each other, or the original en-US file.
It also means that if we makes it harder to review bulk automated change to all translations: (such as [Fluent migrations](https://firefox-source-docs.mozilla.org/l10n/migrations/fluent.html) because these will arrange the strings according to the template en-US file.
### Describe the solution you would like
At least for the Fluent format, it would be nice if the order of strings could match the template's order.
### Describe alternatives you have considered
_No response_
### Screenshots
_No response_
### Additional context
_No response_
Contributor guide
Research direction
Start by tracing how Weblate exports translated Fluent files and how it obtains the template's message order; the issue does not name an implementation file or test. Done means translated Fluent output follows the en-US template order rather than translation or unit-creation order, with coverage for the demonstrated message-1/message-2 case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- localization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100