Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Customizable Machine Translation Engines through WEBLATE_MACHINERY #9415

Closed
dxdx123 opened this issue Jun 15, 2023 · 5 comments
Closed
Assignees
Labels
enhancement Adding or requesting a new feature. good first issue Opportunity for newcoming contributors. help wanted Extra attention is needed.
Milestone

Comments

@dxdx123
Copy link

dxdx123 commented Jun 15, 2023

Describe the problem

When I add the following configuration in settings-override.py, it doesn't work:
WEBLATE_MACHINERY += ('weblate_chatgpt.chatgpt.ChatGPTTranslation',)"

Therefore, I can only add a Python script under weblate/machinery/, but this approach is quite inelegant. I hope to add it as an additional component instead

Describe the solution you'd like

I am writing to request a feature that could enhance the flexibility of this project. I would like to suggest a new method to add custom machine translation engines, which could be realized via a mechanism similar to CHECK_LIST += [...].

It would be beneficial if WEBLATE_MACHINERY could be made more customizable, allowing us to integrate our own machine translation engines easily. This could increase the versatility of the service and adapt to more diverse usage scenarios.

Could you please consider this enhancement for a future release? I believe that this feature would be a great addition to the project.

Looking forward to your feedback.

Describe alternatives you've considered

in settings-override.py file,I want to add a customize plugin,like this:
WEBLATE_MACHINERY += ('weblate_chatgpt.chatgpt.ChatGPTTranslation',)

Screenshots

No response

Additional context

No response

@nijel nijel added enhancement Adding or requesting a new feature. help wanted Extra attention is needed. good first issue Opportunity for newcoming contributors. labels Jun 15, 2023
@github-actions
Copy link

This issue seems to be a good fit for newbie contributors. You are welcome to contribute to Weblate! Don't hesitate to ask any questions you would have while implementing this.

You can learn about how to get started in our contributors documentation.

@nijel
Copy link
Member

nijel commented Jun 15, 2023

The settings needs to be expanded in settings_docker.py, same as we do with checks. Then you would be also able to use https://docs.weblate.org/en/latest/admin/install/docker.html#changing-enabled-apps-checks-add-ons-or-autofixes

@dxdx123
Copy link
Author

dxdx123 commented Jun 20, 2023

Could I kindly inquire whether I should extend WEBLATE_MACHINERY in settings_docker.py? Would there be a need for additional code modifications, by any chance?

@nijel
Copy link
Member

nijel commented Jul 3, 2023

Just include WEBLATE_MACHINERY with all built-in engines and add modify_env_list(WEBLATE_MACHINERY, "MACHINERY") to allow modifying it from the environment.

@nijel nijel self-assigned this Jun 19, 2024
@nijel nijel added this to the 5.6.1 milestone Jun 19, 2024
@nijel nijel closed this as completed in 501c57a Jun 19, 2024
Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature. good first issue Opportunity for newcoming contributors. help wanted Extra attention is needed.
Projects
None yet
Development

No branches or pull requests

2 participants