Commit 50fc2340 authored by Michal Čihař's avatar Michal Čihař

Rewrite configuration docs using djangodocs

parent 5b41d8bd
......@@ -91,7 +91,7 @@ Filemask
As setup of translation project includes fetching Git repositories, you
might want to preseed these, repos are stored in path defined by
:envvar:`GIT_ROOT` in :file:`settings.py` in :file:`<project>/<subproject>`
:setting:`GIT_ROOT` in :file:`settings.py` in :file:`<project>/<subproject>`
directories.
.. _autocreate:
......@@ -198,7 +198,7 @@ interface.
Lazy commits
------------
Default behaviour (configured by :envvar:`LAZY_COMMITS`) of Weblate is to group
Default behaviour (configured by :setting:`LAZY_COMMITS`) of Weblate is to group
commits from same author into one if possible. This heavily reduces number of
commits, however you might need to explicitely tell to do the commits in case
you want to get Git repository in sync, eg. for merge (this is by default
......@@ -220,7 +220,7 @@ Customizing checks
Weblate comes with wide range of consistency checks (see :ref:`checks`), though
they might not 100% cover all you want to check. The list of performed checks
can be adjusted using :envvar:`CHECK_LIST` and you can also add custom checks.
can be adjusted using :setting:`CHECK_LIST` and you can also add custom checks.
All you need to do is to subclass :class:`trans.checks.Check`, set few
attributes and implement either ``check`` or ``check_single`` methods (first
one if you want to deal with plurals in your code, the latter one does this for
......
.. _config:
Configuration
-------------
=============
All settings are stored in :file:`settings.py` (as usual for Django).
.. envvar:: CHECK_LIST
.. setting:: CHECK_LIST
List of consistency checks to perform on translation.
CHECK_LIST
----------
.. seealso:: :ref:`checks`, :ref:`custom-checks`
List of consistency checks to perform on translation.
.. envvar:: ENABLE_HOOKS
.. seealso:: :ref:`checks`, :ref:`custom-checks`
Whether to enable anonymous remote hooks.
.. setting:: ENABLE_HOOKS
.. seealso:: :ref:`hooks`
ENABLE_HOOKS
------------
.. envvar:: GIT_ROOT
Whether to enable anonymous remote hooks.
Path where Weblate will store cloned Git repositories. Defaults to
:file:`repos` subdirectory.
.. seealso:: :ref:`hooks`
.. envvar:: LAZY_COMMITS
.. setting:: GIT_ROOT
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.
GIT_ROOT
--------
.. seealso:: :ref:`lazy-commit`
Path where Weblate will store cloned Git repositories. Defaults to
:file:`repos` subdirectory.
.. envvar:: MT_APERTIUM_KEY
.. setting:: LAZY_COMMITS
API key for Apertium Web Service, you can register at http://api.apertium.org/register.jsp
LAZY_COMMITS
------------
.. envvar:: MT_MICROSOFT_KEY
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.
API key for Microsoft Translator service, you can register at http://www.bing.com/developers/createapp.aspx
.. seealso:: :ref:`lazy-commit`
.. envvar:: NEARBY_MESSAGES
.. setting:: MT_APERTIUM_KEY
How many messages around current one to show during translating.
MT_APERTIUM_KEY
---------------
.. envvar:: OFFLOAD_INDEXING
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.
API key for Apertium Web Service, you can register at http://api.apertium.org/register.jsp
While enabling this, don't forget scheduling runs of
:program:`./manage.py update_index` in cron or similar tool.
.. setting:: MT_MICROSOFT_KEY
This is recommended setup for production use.
MT_MICROSOFT_KEY
----------------
.. envvar:: SIMILAR_MESSAGES
API key for Microsoft Translator service, you can register at http://www.bing.com/developers/createapp.aspx
Number of similar messages to lookup. This is not a hard limit, just a
number Weblate tries to find if it is possible.
.. setting:: NEARBY_MESSAGES
.. envvar:: SITE_TITLE
NEARBY_MESSAGES
---------------
Site title to be used in website and emails as well.
How many messages around current one to show during translating.
.. envvar:: WHOOSH_INDEX
.. setting:: OFFLOAD_INDEXING
Directory where Whoosh fulltext indices will be stored. Defaults to :file:`whoosh-index` subdirectory.
OFFLOAD_INDEXING
----------------
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
:program:`./manage.py update_index` in cron or similar tool.
This is recommended setup for production use.
.. setting:: SIMILAR_MESSAGES
SIMILAR_MESSAGES
----------------
Number of similar messages to lookup. This is not a hard limit, just a
number Weblate tries to find if it is possible.
.. setting:: SITE_TITLE
SITE_TITLE
----------
Site title to be used in website and emails as well.
.. setting:: WHOOSH_INDEX
WHOOSH_INDEX
------------
Directory where Whoosh fulltext indices will be stored. Defaults to :file:`whoosh-index` subdirectory.
.. seealso:: https://docs.djangoproject.com/en/1.4/ref/settings/
......@@ -34,7 +34,7 @@ I get "Lock Error" quite often while translating
This is usually caused by concurent updates to fulltext index. In case you are
running multithreaded server (eg. mod_wsgi), this happens quite often. For such
setup it is recommended to enable :envvar:`OFFLOAD_INDEXING`.
setup it is recommended to enable :setting:`OFFLOAD_INDEXING`.
Rebuilding index has failed with "No space left on device"
----------------------------------------------------------
......
......@@ -61,7 +61,7 @@ The ./manage.py is extended with following commands:
.. django-admin:: update_index
Updates index for fulltext search when :envvar:`OFFLOAD_INDEXING` is enabled.
Updates index for fulltext search when :setting:`OFFLOAD_INDEXING` is enabled.
It is recommended to run this frequently (eg. every 5 minutes) to have index
uptodate.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment