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

[BUGFIX] Working with glossary without a request not possible #375

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

calien666
Copy link
Member

The DeeplBackendUtility tried to detect the current working page by guessing the page id via the global request. In some cases no request is given, like on CLI calls. Avoiding errors not using the glossary when not calling translation via backend, a new service ProcessingInstruction is added, saving the current instructions inside the global runtime cache. This information can now get detected in every point of the translation and allows a correct detection of the current working page including a valid glossary, if one exists.

A regression test is added demonstrating the glossary is now detected and respected, even if no request is set up.

@calien666 calien666 requested review from NarkNiro and sbuerk and removed request for NarkNiro November 29, 2024 16:21
@calien666 calien666 force-pushed the bugfix/glossary-sync-without-request branch from 7f5dde5 to f0c5fba Compare November 29, 2024 16:30
The DeeplBackendUtility tried to detect the current working page by
guessing the page id via the global request. In some cases no request is
given, like on CLI calls. Avoiding errors not using the glossary when
not calling translation via backend, a new service
`ProcessingInstruction` is added, saving the current instructions inside
the global runtime cache. This information can now get detected in every
point of the translation and allows a correct detection of the current
working page including a valid glossary, if one exists.

A regression test is added demonstrating the glossary is now detected
and respected, even if no request is set up.
@calien666 calien666 force-pushed the bugfix/glossary-sync-without-request branch from f0c5fba to cc62452 Compare November 29, 2024 16:35
@calien666 calien666 merged commit 3bc10da into main Nov 29, 2024
11 checks passed
@calien666 calien666 deleted the bugfix/glossary-sync-without-request branch November 29, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants