Describe the problem
We are using Weblate in a "real" Continuous Localization scenario at translate.devowl.io, that means every project has components which reflect the branch of our Git repository. This allows us huge flexibility when building new features, so we can e.g. make user tests with updated translations.
As you can see in this project, there are multiple branches. Each component is a branch on our Git repository. There are now two scenarios which are not scalable with Weblate:
Create a feature branch
In our CI, when a new branch is created, we check if the corresponding branch exists in the project, e.g. feat-my-example. When it does not exist, we:
- Download the translation files as ZIP file from an existing component (e.g.
develop)
- Upload the ZIP file to
POST /api/projects/(string: project)/components/
- Get the task ID and wait until the task is done via
GET /api/tasks/(str: uuid)/
- Install configured add-ons via
POST /api/components/(string: project)/(string: component)/addons/
Describe the solution you'd like: For the POST /api/projects/(string: project)/components/ endpoint, instead of uploading a file zipfile, introduce a new parameter duplicate_from which allows to clone/duplicate all translations from that component into a new component.
Merge new translations
We have created a new feature branch, there we have added a new language, e.g. German. Now, when we merge the branch back to develop, we:
- Check if
German exists in the develop branch
- If not, we create the
German translation in develop via POST /api/components/(string: project)/(string: component)/translations/
- Run
POST /api/translations/(string: project)/(string: component)/(string: language)/autotranslate/ on the newly created language
The autotranslate can be very slowly for a component with no translations.
Describe the solution you'd like: For the POST /api/components/(string: project)/(string: component)/translations/ endpoint, introduce a new parameter duplicate_from which allows to clone/duplicate all translations from another component. Example: duplicate_from: feat-my-example,develop. It is a comma-separated list of components, so it picks the first existing component which has the requested language_code.
I hope I was able to clarify this. 😊
Describe the solution you'd like
See above.
Describe alternatives you've considered
See above.
Screenshots
No response
Additional context
No response
Describe the problem
We are using Weblate in a "real" Continuous Localization scenario at translate.devowl.io, that means every project has components which reflect the branch of our Git repository. This allows us huge flexibility when building new features, so we can e.g. make user tests with updated translations.
As you can see in this project, there are multiple branches. Each component is a branch on our Git repository. There are now two scenarios which are not scalable with Weblate:
Create a feature branch
In our CI, when a new branch is created, we check if the corresponding branch exists in the project, e.g.
feat-my-example. When it does not exist, we:develop)POST /api/projects/(string: project)/components/GET /api/tasks/(str: uuid)/POST /api/components/(string: project)/(string: component)/addons/Describe the solution you'd like: For the
POST /api/projects/(string: project)/components/endpoint, instead of uploading a filezipfile, introduce a new parameterduplicate_fromwhich allows to clone/duplicate all translations from that component into a new component.Merge new translations
We have created a new feature branch, there we have added a new language, e.g.
German. Now, when we merge the branch back todevelop, we:Germanexists in thedevelopbranchGermantranslation indevelopviaPOST /api/components/(string: project)/(string: component)/translations/POST /api/translations/(string: project)/(string: component)/(string: language)/autotranslate/on the newly created languageThe autotranslate can be very slowly for a component with no translations.
Describe the solution you'd like: For the
POST /api/components/(string: project)/(string: component)/translations/endpoint, introduce a new parameterduplicate_fromwhich allows to clone/duplicate all translations from another component. Example:duplicate_from: feat-my-example,develop. It is a comma-separated list of components, so it picks the first existing component which has the requestedlanguage_code.I hope I was able to clarify this. 😊
Describe the solution you'd like
See above.
Describe alternatives you've considered
See above.
Screenshots
No response
Additional context
No response