Skip to content

Commit

Permalink
Adds support for Apertium-APy in Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
blizarazu authored and nijel committed Sep 22, 2020
1 parent d5321dd commit 870fdbf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/admin/install/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,10 @@ Generic settings
Machine translation settings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. envvar:: WEBLATE_MT_APERTIUM_APY

Enables :ref:`apertium` machine translation and sets :setting:`MT_APERTIUM_APY`

.. envvar:: WEBLATE_MT_AWS_REGION
.. envvar:: WEBLATE_MT_AWS_ACCESS_KEY_ID
.. envvar:: WEBLATE_MT_AWS_SECRET_ACCESS_KEY
Expand Down
4 changes: 3 additions & 1 deletion weblate/settings_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,9 @@
# Machine translation API keys

# URL of the Apertium APy server
MT_APERTIUM_APY = None
MT_APERTIUM_APY = os.environ.get("WEBLATE_MT_APERTIUM_APY", None)
if MT_APERTIUM_APY:
MT_SERVICES += ("weblate.machinery.apertium.ApertiumAPYTranslation",)

# AWS
MT_AWS_REGION = os.environ.get("WEBLATE_MT_AWS_REGION", None)
Expand Down

0 comments on commit 870fdbf

Please sign in to comment.