All settings are stored in settings.py (as usual for Django).
Note
After changing any of these settings, you need to restart Weblate. In case it is run as mod_wsgi, you need to restart Apache to reload the configuration.
See also
Please check also Django’s documentation for parameters which configure Django itself.
Time in seconds for how long the automatic lock for translation will be active.
See also
List of automatic fixups to apply when saving the message.
Available fixes:
For example you can enable only few of them:
AUTOFIX_LIST = (
'trans.autofixes.whitespace.SameBookendingWhitespace',
'trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis',
)
See also
Whether to run hooks in background. This is generally recommended unless you are debugging.
List of quality checks to perform on translation.
Some of the checks are not useful for all projects, so you are welcome to adjust list of performed on your installation.
For example you can enable only few of them:
CHECK_LIST = (
'trans.checks.same.SameCheck',
'trans.checks.format.CFormatCheck',
'trans.checks.chars.ZeroWidthSpaceCheck',
)
See also
Path where Weblate will store cloned Git repositories. Defaults to repos subdirectory.
Delay creating Git commits until this is necessary. This heavily reduces number of commits generated by Weblate at expense of temporarily not being able to merge some changes as they are not yet committed.
See also
Time in seconds for how long the translation will be locked for single translator when locked manually.
See also
List of URL which require login (besides standard rules built into Weblate). This allows you to password protect whole installation using:
LOGIN_REQUIRED_URLS = (
r'/(.*)$',
)
List of exceptions for LOGIN_REQUIRED_URLS, in case you won’t specify this list, the default value will be used, which allows users to access login page.
Some of exceptions you might want to include:
LOGIN_REQUIRED_URLS_EXCEPTIONS = (
r'/accounts/(.*)$', # Required for login
r'/media/(.*)$', # Required for development mode
r'/widgets/(.*)$', # Allowing public access to widgets
r'/data/(.*)$', # Allowing public access to data exports
r'/hooks/(.*)$', # Allowing public access to notification hooks
)
List of enabled machine translation services to use.
Note
Many of services need additional configuration like API keys, please check their documentation for more details.
MACHINE_TRANSLATION_SERVICES = (
'trans.machine.apertium.ApertiumTranslation',
'trans.machine.glosbe.GlosbeTranslation',
'trans.machine.google.GoogleTranslation',
'trans.machine.microsoft.MicrosoftTranslation',
'trans.machine.mymemory.MyMemoryTranslation',
'trans.machine.opentran.OpenTranTranslation',
'trans.machine.tmserver.TMServerTranslation',
'trans.machine.weblatetm.WeblateSimilarTranslation',
'trans.machine.weblatetm.WeblateTranslation',
)
See also
API key for Apertium Web Service, you can register at http://api.apertium.org/register.jsp
See also
API key for Google Translate API, you can register at https://developers.google.com/translate/
Cliend ID for Microsoft Translator service.
Client secret for Microsoft Translator service.
MyMemory identification email, you can get 1000 requests per day with this.
MyMemory access key for private translation memory, use together with MT_MYMEMORY_USER.
MyMemory user id for private translation memory, use together with MT_MYMEMORY_KEY.
URL where tmserver is running.
How many messages around current one to show during translating.
Offload updating of fulltext index to separate process. This heavily improves responsiveness of online operation on expense of slightly outdated index, which might still point to older content.
While enabling this, don’t forget scheduling runs of update_index in cron or similar tool.
This is recommended setup for production use.
See also
List of scripts which are allowed as pre commit scripts. The script needs to be later enabled in subproject configuration.
For example you can allow script which does some cleanup:
PRE_COMMIT_SCRIPTS = (
'/usr/local/bin/cleanup-translation',
)
Note
The hook is executed using system() call, so it is evaluated in a shell.
A boolean (either True or False) indicating whether registration of new accounts is protected by captcha. This setting is optional, and a default of True will be assumed if it is not supplied.
A boolean (either True or False) indicating whether registration of new accounts is currently permitted. This setting is optional, and a default of True will be assumed if it is not supplied.
Site title to be used in website and emails as well.
Source language used for translation. This is mostly useful for machine translation services.
Path to Droid fonts used for widgets and charts.
Directory where Whoosh fulltext indices will be stored. Defaults to whoosh-index subdirectory.