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

Maintain glossary terms during automated translation. #7086

Closed
ghost opened this issue Jan 10, 2022 · 9 comments · Fixed by #10519
Closed

Maintain glossary terms during automated translation. #7086

ghost opened this issue Jan 10, 2022 · 9 comments · Fixed by #10519
Assignees
Labels
enhancement Adding or requesting a new feature.
Milestone

Comments

@ghost
Copy link

ghost commented Jan 10, 2022

Describe the problem

With the Glossary Weblate offers a way to organize terms that should not be translated. It would be helpful and more consistent, if those term were also fix, when using automated translation with deepl.

Describe the solution you'd like

The new Syntax Feature from issue #6529 could be used, to simply mark all glossary terms with xml before messages are transmitted to the translation service.

Describe alternatives you've considered

No response

Screenshots

No response

Additional context

Appreciating hints, if this is already possible somehow.

@nijel
Copy link
Member

nijel commented Jan 10, 2022

Unfortunately, this is not that easy:

  1. This will most likely ruin the grammar handling in DeepL and will actually produce worse translations.
  2. There can be multiple matching glossary terms.
  3. This can't properly handle declination in languages which need it.

What might be more useful to use DeepL glossaries, but it has own set of problems:

  1. Very limited language support - DeepL supports glossaries only for a subset of languages.
  2. There is limit of 1000 glossaries, what would be easy to reach - 10 projects translated to 100 languages are you are there.

@nijel nijel added enhancement Adding or requesting a new feature. undecided These features might not be implemented. Can be prioritized by sponsorship. labels Jan 10, 2022
@github-actions
Copy link

This issue has been put aside. It is currently unclear if it will ever be implemented as it seems to cover too narrow of a use case or doesn't seem to fit into Weblate.

Please try to clarify the use case or consider proposing something more generic to make it useful to more users.

@nijel
Copy link
Member

nijel commented Apr 20, 2023

There is discussion on this topic at #9063 as well.

What I think would be a viable approach is to add an option for glossary synchronization to machinery configuration, this allows to enable it at both project and site-wide level based on user decision. The limit of 1000 glossaries at DeepL makes it unsuitable for site-wide usage on larger instances.

@amq
Copy link

amq commented Apr 20, 2023

People could use multiple deepl api keys for such big instances.

@amq
Copy link

amq commented Apr 21, 2023

This is how I would imagine it:

  • Weblate glossaries are synced to deepl on every change, creating one deepl glossary per weblate glossary-language pair
  • There is a mapping between weblate glossary-language id to deepl glossary id
  • When requesting translations from deepl, relevant glossary id is supplied, if exists

@nijel
Copy link
Member

nijel commented Apr 21, 2023

People could use multiple deepl api keys for such big instances.

Using project scoped machinery is way for that.

Weblate glossaries are synced to deepl on every change

The API for glossaries at DeepL supports create/delete glossary only, there is no update. We definitely don't want to do that for every glossary edit in Weblate.

creating one deepl glossary per weblate glossary-language pair

Yes.

@amq
Copy link

amq commented Apr 21, 2023

The API for glossaries at DeepL supports create/delete glossary only, there is no update. We definitely don't want to do that for every glossary edit in Weblate.

Yes, an "update" would do delete and create in background, that's also what deepl suggests. Is a bit clumsy, but it doesn't incur additional costs, so shouldn't be a major problem. For me it wouldn't be a blocker if it doesn't happen on every update, but it would probably actually mean more work, because an additional sync button would be required etc.

@nijel
Copy link
Member

nijel commented Apr 21, 2023

I don't want manual sync, but either delayed or daily to avoid wasting resources on both Weblate and DeepL side (this will become more of a problem for huge glossaries).

@nijel nijel added this to the 5.0 milestone Apr 25, 2023
@nijel nijel modified the milestones: 5.0, 5.1 Aug 16, 2023
@nijel nijel modified the milestones: 5.1, 5.2 Oct 14, 2023
@nijel nijel modified the milestones: 5.2, 5.3 Nov 9, 2023
@nijel nijel self-assigned this Nov 23, 2023
@nijel nijel removed the undecided These features might not be implemented. Can be prioritized by sponsorship. label Nov 23, 2023
nijel added a commit to nijel/weblate that referenced this issue Nov 29, 2023
Add download_multiple_translations which can be overridden by subclasses
to actually implement this.

Issue WeblateOrg#7086
nijel added a commit to nijel/weblate that referenced this issue Nov 29, 2023
Add download_multiple_translations which can be overridden by subclasses
to actually implement this.

Issue WeblateOrg#7086
nijel added a commit to nijel/weblate that referenced this issue Nov 29, 2023
It will be needed for glossary integartion (see WeblateOrg#7086).
nijel added a commit that referenced this issue Nov 29, 2023
Add download_multiple_translations which can be overridden by subclasses
to actually implement this.

Issue #7086
nijel added a commit that referenced this issue Nov 29, 2023
It will be needed for glossary integartion (see #7086).
nijel added a commit to nijel/weblate that referenced this issue Nov 30, 2023
nijel added a commit to nijel/weblate that referenced this issue Nov 30, 2023
nijel added a commit to nijel/weblate that referenced this issue Nov 30, 2023
nijel added a commit to nijel/weblate that referenced this issue Nov 30, 2023
nijel added a commit to nijel/weblate that referenced this issue Nov 30, 2023
- Add generic mixin to handle service side glossaries
- Implement DeepL integration

Fixes WeblateOrg#7086
Fixes WeblateOrg#10468
nijel added a commit to nijel/weblate that referenced this issue Nov 30, 2023
nijel added a commit to nijel/weblate that referenced this issue Nov 30, 2023
- Add generic mixin to handle service side glossaries
- Implement DeepL integration

Fixes WeblateOrg#7086
Fixes WeblateOrg#10468
nijel added a commit that referenced this issue Nov 30, 2023
nijel added a commit to nijel/weblate that referenced this issue Nov 30, 2023
- Add generic mixin to handle service side glossaries
- Implement DeepL integration

Fixes WeblateOrg#7086
Fixes WeblateOrg#10468
nijel added a commit that referenced this issue Dec 1, 2023
- Add generic mixin to handle service side glossaries
- Implement DeepL integration

Fixes #7086
Fixes #10468
Copy link

github-actions bot commented Dec 1, 2023

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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants