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

Refactor formality translation context handling. #353

Merged
merged 1 commit into from
Sep 3, 2024

Commits on Sep 3, 2024

  1. [TASK] Refactor formality translation context handling.

    The problem with global formality configuration is true.
    That a target language has not been checked to see whether formality is supported.
    An error response from the DeepL API is returned for unsupported languages,
    which states ‘formality not supported’.
    
    To enable better handling for formality, only supported target languages.
    An additional formality field is added in the SiteConfiguration,
    which reflects the options of the API.
    The Formality field only appears for supported target languages,
    which is checked against the supported languages API.
    
    An upgrade wizard has been provided to simplify the conversion of the Formality configuration to the SiteConfiguration.
    
    Additionally, a DTO TranslateContext has been introduced,
    to centralise parameter handling for better handling of translation parameters.
    NarkNiro committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    65a8fd2 View commit details
    Browse the repository at this point in the history