feat(api): add support for cloning from a component#18671
feat(api): add support for cloning from a component#18671nijel wants to merge 1 commit intoWeblateOrg:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds REST API capabilities to duplicate components and seed new translations based on existing components, plus extends auto-translation to accept multiple source components.
Changes:
- Add
from_componentsupport when creating components (duplicate configuration + seed translations/add-ons). - Add
from_componentsupport when creating translations (seed via auto-translation from one or more components). - Extend auto-translation plumbing from single
source_component_idtosource_component_ids.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| weblate/trans/tasks.py | Extends component post-save task inputs for seeding; updates auto-translate callsites to list-based sources. |
| weblate/trans/models/component.py | Adds transient seed settings and triggers seeding during after_save. |
| weblate/trans/management/commands/auto_translate.py | Updates management command to pass list-based component sources. |
| weblate/trans/component_seed.py | New module implementing snapshotting + seeding translations and cloning add-ons. |
| weblate/trans/autotranslate.py | Supports multiple source components and ordered preference behavior. |
| weblate/api/views.py | Adds serializer-based validation and translation seeding via auto-translation. |
| weblate/api/tests.py | Adds API tests covering component cloning and translation creation from components. |
| weblate/api/serializers.py | Adds component reference fields/resolution + from_component behavior in component/translation creation. |
| docs/changes.rst | Documents the new REST API from_component option. |
| docs/api.rst | Documents request parameters and examples for from_component. |
💡 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 ↗︎ Awaiting the start of a new Argos build… |
850899b to
2a2e6c2
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b6d52f2 to
2ce5fab
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0579c1ff74
ℹ️ 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: ea720b642d
ℹ️ 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".
❌ 9 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Fixes #10362