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

"""Translation environment configuration settings."""


# The directory where the translation files are kept
PODIRECTORY = working_path('po')

# The directory where version control clones/checkouts are kept
VCS_DIRECTORY = working_path('repos')

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

# Live translation means that the project called "Pootle" is used to provide
# the localised versions of Pootle. Set this to True to enable live translation
# of pootle UI. This is a good way to learn how to use Pootle, but it has high
# impact on performance.
LIVE_TRANSLATION = False

# Set this to True if you want translation files to be updated
# immediatly.
# Note that this negatively affects performance and
# should be avoided unless another application needs direct access to
# the files.
AUTOSYNC = False

# 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 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:
# 'APERTIUM': Apertium service.
#             For this service you need to set the API key.
#             Get your key at http://api.apertium.org/register.jsp
# '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 http://code.google.com/apis/language/translate/v2/pricing.html
#
MT_BACKENDS = [
#        ('APERTIUM', ''),
#        ('GOOGLE_TRANSLATE', ''),
]

# Set the backends you want to use to allow web-based lookup. To disable this
# feature completely just comment all the lines to set an empty list [] to the
# LOOKUP_BACKENDS setting.
LOOKUP_BACKENDS = [
        'wikipedia',
]

# 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 = 'http://amagama.locamotion.org/tmserver/'
