#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""Translation environment configuration settings."""


# The directory where the translation files are kept
POOTLE_TRANSLATION_DIRECTORY = working_path('translations')

# On POSIX systems, files synchronized to disk will be assigned these
# permissions. Use 0644/0755 for publically-readable files, or 0600/0700 if you
# want only the Pootle user to be able to read them.
POOTLE_SYNC_FILE_MODE = 0644

# File parse pool settings
#
# To avoid rereading and reparsing translation files from disk on
# every request, Pootle keeps a pool of already parsed files in memory.
#
# Larger pools will offer better performance, but higher memory usage
# (per server process). When the pool fills up, 1/PARSE_POOL_CULL_FREQUENCY
# number of files will be removed from the pool.
PARSE_POOL_SIZE = 40
PARSE_POOL_CULL_FREQUENCY = 4


# Set the backends you want to use to enable translation suggestions through
# several online services. To disable this feature completely just comment all
# the lines to set an empty list [] to the POOTLE_MT_BACKENDS setting.
#
# The second parameter for each backend option is the API key, which will
# be used in case the service supports using an API key.
#
# Available options are:
# 'GOOGLE_TRANSLATE': Google Translate service.
#             For this service you need to set the API key.
#             Note that Google Translate API is a paid service
#             See more at https://cloud.google.com/translate/v2/pricing
# 'YANDEX_TRANSLATE': Yandex Translate service.
#             For this service you need to set the API key.
#             See more at https://tech.yandex.com/translate/
#
POOTLE_MT_BACKENDS = [
#        ('GOOGLE_TRANSLATE', ''),
#        ('YANDEX_TRANSLATE', ''),
]

# URL used for the amaGama TM server.
# The global amaGama service should work fine, but if your language/project
# has a better server, or you want to use your own, you can edit this setting.
# This URL must point to the public API URL which returns JSON. Don't forget
# the trailing slash.
AMAGAMA_URL = 'https://amagama-live.translatehouse.org/api/v1/'

# See 90-local.conf.template for example configuration for local TM server
POOTLE_TM_SERVER = {}

# Wordcounts
#
# Import path for the wordcount function.
# Current options:
# - Translate Toolkit (default) - translate.storage.statsdb.wordcount
# - Pootle - pootle.core.utils.wordcount.wordcount
POOTLE_WORDCOUNT_FUNC = 'translate.storage.statsdb.wordcount'

# Quality checks
#
# Override checker class.  Supply your own quality checker functions by
# supplying the class to use for quality checks.  Default of '' ensures that
# the quality checks defined in the project setup are used instead.  Available
# alternate checkers are: 'pootle_misc.checks.ENChecker'
POOTLE_QUALITY_CHECKER = ''
