Skip to content

Commit

Permalink
Docker: Simplify settings parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Jul 28, 2020
1 parent 1b538e9 commit 19a0489
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions weblate/settings_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,14 +688,8 @@
# https://portal.azure.com/
MT_MICROSOFT_COGNITIVE_KEY = os.environ.get("WEBLATE_MT_MICROSOFT_COGNITIVE_KEY", None)
MT_MICROSOFT_REGION = None

ms_endpoint_url = os.environ.get("WEBLATE_MT_MICROSOFT_ENDPOINT_URL", None)
if ms_endpoint_url is not None:
MT_MICROSOFT_ENDPOINT_URL = ms_endpoint_url

ms_base_url = os.environ.get("WEBLATE_MT_MICROSOFT_BASE_URL", None)
if ms_base_url is not None:
MT_MICROSOFT_BASE_URL = ms_base_url
MT_MICROSOFT_ENDPOINT_URL = os.environ.get("WEBLATE_MT_MICROSOFT_ENDPOINT_URL", None)
MT_MICROSOFT_BASE_URL = os.environ.get("WEBLATE_MT_MICROSOFT_BASE_URL", None)

if MT_MICROSOFT_COGNITIVE_KEY:
MT_SERVICES += ("weblate.machinery.microsoft.MicrosoftCognitiveTranslation",)
Expand Down

0 comments on commit 19a0489

Please sign in to comment.