fix(translate): corrected string ordering#19620
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: daa51d4a81
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5975ee77aa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 79c2c5ec20
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Fixes incorrect default string ordering for project/category language translation views and makes the “component switched” warning reliable across sequential navigation by persisting the last viewed unit in the session.
Changes:
- Default sort for
ProjectLanguage/CategoryLanguagescopes is now component-based (component priority grouping) rather than interleaving by unit position. - Component-switch warning logic is refactored and hardened against stale unit IDs, while also persisting
last_viewed_unit_idback into the session. - Adds regression tests for ordering and component-switch warnings; documents the change in the changelog.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
weblate/utils/views.py |
Extends default sort selection to language-scope objects (ProjectLanguage/CategoryLanguage). |
weblate/trans/views/edit.py |
Persists and validates last_viewed_unit_id to make component-switch warnings reliable. |
weblate/trans/models/unit.py |
Applies component-grouped default ordering to language-scope unit queries and adds position as a stable tiebreaker. |
weblate/trans/tests/test_models.py |
Adds coverage ensuring language-scope default ordering groups by component priority. |
weblate/trans/tests/test_edit.py |
Adds coverage for component-switch warnings and default sort selection for language scopes. |
docs/changes.rst |
Notes the behavior change in the 2026.6 changelog. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
The project and category language views defaulted to wrong ordering and didn't show a component switch reliably. Fixes WeblateOrg#19613
The project and category language views defaulted to wrong ordering and didn't show a component switch reliably.
Fixes #19613