-
Notifications
You must be signed in to change notification settings - Fork 0
/
pootle.conf
244 lines (203 loc) · 7.46 KB
/
pootle.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# -*- coding: utf-8 -*-
"""Sample configuration file.
This file includes the settings that administrators will likely change.
You can find the defaults in the ``*.conf`` files for more advanced settings.
In order for this configuration changes to take effect, bear in mind that you
need to change the extension of this file from ``.conf.sample`` to ``.conf``.
"""
import os
#
# Base
#
# Site title
POOTLE_TITLE = 'Pootle Translation Server'
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'UTC'
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'OEcNEujap1w6OMSDGDIeE5TYS7aKlkLARZ6+bspwNmdmaL4I7Mtfu4i6lVsA73HboGw='
# A list of strings representing the host/domain names that this Pootle server
# can serve. This is a Django's security measure. More details at
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['*']
#
# Backends
#
# Database backend settings
DATABASES = {
'default': {
# Replace 'sqlite3' with 'postgresql_psycopg2' or 'mysql'.
'ENGINE': 'django.db.backends.postgresql_psycopg2',
# For older Pootle use:
# 'ENGINE': 'transaction_hooks.backends.postgresql_psycopg2',
# Database name or path to database file if using sqlite3.
'NAME': 'pootle',
# Not used with sqlite3.
'USER': 'pootle',
# Not used with sqlite3.
'PASSWORD': 'cNEujap1w6OMSDGDIeE5TYS7aKl',
# Set to empty string for localhost. Not used with sqlite3.
'HOST': 'postgres',
# Set to empty string for default. Not used with sqlite3.
'PORT': '',
'CONN_MAX_AGE': None,
}
}
# Cache Backend settings
# For more information, check
# http://docs.djangoproject.com/en/dev/topics/cache/#setting-up-the-cache
# and http://niwibe.github.io/django-redis/
CACHES = {
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': 'redis://redis:6379/1',
'TIMEOUT': 60,
},
'redis': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': 'redis://redis:6379/2',
'TIMEOUT': None,
},
'stats': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': 'redis://redis:6379/3',
'TIMEOUT': None,
},
'lru': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': 'redis://redis:6379/4',
'TIMEOUT': 60,
},
'exports': {
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': working_path('exports/'),
'TIMEOUT': 259200, # 3 days.
},
}
#
# Local Translation Memory service
#
# Setup for connection to the ElasticSearch server for translation memory based
# on the projects hosted on Pootle.
# You may want to set AMAGAMA_URL to '' (empty string) if using this service.
#
POOTLE_TM_SERVER = {
'local': {
'ENGINE': 'pootle.core.search.backends.ElasticSearchBackend',
'HOST': 'elasticsearch',
'PORT': 9200,
# Every TM server must have its own unique index.
'INDEX_NAME': 'translations',
# Provides a weighting factor to alter the final score for TM results
# from this TM server. Valid values are between ``0.0`` and ``1.0``,
# both included. Defaults to ``1.0`` if not provided.
'WEIGHT': 1.0,
},
'external': {
'ENGINE': 'pootle.core.search.backends.ElasticSearchBackend',
'HOST': 'elasticsearch',
'PORT': 9200,
'INDEX_NAME': 'external-translations',
'WEIGHT': 0.9,
},
}
#
# Logging
#
# The directory where Pootle writes its logs
POOTLE_LOG_DIRECTORY = working_path('log')
#
# Site
#
# This Pootle server admins
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
# Mail settings
# Default email address to use for messages sent by Pootle.
# https://docs.djangoproject.com/en/dev/ref/settings/#default-from-email
DEFAULT_FROM_EMAIL = 'info@YOUR_DOMAIN.com'
# Address to receive messages sent by contact form.
POOTLE_CONTACT_EMAIL = 'info@YOUR_DOMAIN.com'
POOTLE_CONTACT_ENABLED = True
# Email address to report string errors to, unless a report email was set for
# the project for which the string error is being reported.
# Use this as a way to forward string error reports to an address
# different from the general contact address.
POOTLE_CONTACT_REPORT_EMAIL = 'string_errors_manager@YOUR_DOMAIN.com'
# Mail server settings
# By default Pootle uses the SMTP server on localhost. If the server is not
# configured for sending emails, uncomment and use these settings to setup an
# external outgoing SMTP server.
# Example for Google as an external SMTP server
#EMAIL_HOST_USER = 'USER@YOUR_DOMAIN.com'
#EMAIL_HOST_PASSWORD = 'YOUR_PASSWORD'
#EMAIL_HOST = 'smtp.gmail.com'
#EMAIL_PORT = 587
#EMAIL_USE_TLS = True
#
# Translation
#
# The directory where the translation files are kept
POOTLE_TRANSLATION_DIRECTORY = working_path('translations')
# Two-tuple defining the markup filter to apply in certain textareas.
#
# - Accepted values for the first element are 'textile', 'markdown',
# 'restructuredtext' and None.
# - The second element should be a dictionary of keyword arguments that will be
# passed to the markup function.
#
# IMPORTANT: If you want to use one of these markup filters you must install on
# your own the required packages.
#
# Examples:
# POOTLE_MARKUP_FILTER = (None, {})
# POOTLE_MARKUP_FILTER = ('markdown', {'safe_mode': 'escape'})
# POOTLE_MARKUP_FILTER = ('restructuredtext', {
# 'settings_overrides': {
# 'report_level': 'quiet',
# }
# })
POOTLE_MARKUP_FILTER = (None, {})
# 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:
# 'CAIGHDEAN_TRANSLATE': Caighdeán Translate service.
# Provides translation from Manx Gaelic (gv) and
# Scottish Gaelic (gd), into Irish Gaelic (ga-IE)
# See more at https://github.com/kscanne/caighdean
# '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
# 'WELSH_TRANSLATE': Welsh Translate service.
# Provides translation from English (en) to Welsh (cy)
# For this service you need an API key.
# See more at http://techiaith.cymru/api/translation/?lang=en
# '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 = [
# ('CAIGHDEAN_TRANSLATE', ''),
# ('GOOGLE_TRANSLATE', ''),
# ('WELSH_TRANSLATE', ''),
# ('YANDEX_TRANSLATE', ''),
]
# Custom templates directories
#
TEMPLATES[0]['DIRS'] = [
# working_path(os.path.join('custom', 'templates')),
]
DEBUG = False
TEMPLATE_DEBUG = DEBUG
STATIC_ROOT = '/var/www/pootle/assets/'
MEDIA_ROOT = '/var/www/pootle/media/'