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

[BUG] Check for formalitySupportedLanguages missing #308

Open
ZHENYAio opened this issue Oct 10, 2023 · 0 comments
Open

[BUG] Check for formalitySupportedLanguages missing #308

ZHENYAio opened this issue Oct 10, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@ZHENYAio
Copy link

Describe the bug
German is the default language of my TYPO3 installation, English [EN-GB] is a translation (and some more languages).
In the extension settings I set the formality to "more".
When I want to translate something from German into English, the translation fails (fallback to German content). All other translations are fine.
I analyzed it and found that the API response in DeeplService::translateRequest says that the target language doesn't support the formality parameter.
I removed the formality in the settings and now it's fine.

DeeplService::$formalitySupportedLanguages is set in DeeplService::loadSupportedLanguages(), but never checked?

To Reproduce

  • Set formality.
  • Translate using Deepl into a language that doesn't support formality (example EN-GB).

Expected behavior
When translating, the $formalitySupportedLanguages should be considered. If the target language doesn't support formality, the formality parameter should be omitted.

TYPO3 Setup

  • TYPO3 Version: 11.5.30
  • PHP version: 8.1
  • Extension version: 3.0.5
@ZHENYAio ZHENYAio added the bug Something isn't working label Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant