diff --git a/doc/admin/config.rst b/doc/admin/config.rst index f4cd4c167e..df35b59fb4 100644 --- a/doc/admin/config.rst +++ b/doc/admin/config.rst @@ -273,6 +273,24 @@ to speed up various operations:: If redis is not configured, pretix will store sessions and locks in the database. If memcached is configured, memcached will be used for caching instead of redis. +Translations +------------ + +pretix comes with a nubmer of translations. Some of them are marked as "incubating", which means +they can usually only be selected in development mode. If you want to use them nevertheless, you +can activate them like this:: + + [languages] + allow_incubating=pt-br,da + +You can also tell pretix about additional paths where it will search for translations:: + + [languages] + path=/path/to/my/translations + +For a given language (e.g. ``pt-br``), pretix will then look in the +specific subfolder, e.g. ``/path/to/my/translations/pt_BR/LC_MESSAGES/django.po``. + Celery task queue ----------------- diff --git a/src/pretix/settings.py b/src/pretix/settings.py index 916bbff7b2..d67b952a8d 100644 --- a/src/pretix/settings.py +++ b/src/pretix/settings.py @@ -378,9 +378,11 @@ USE_I18N = True USE_L10N = True USE_TZ = True -LOCALE_PATHS = ( +LOCALE_PATHS = [ os.path.join(os.path.dirname(__file__), 'locale'), -) +] +if config.has_option('languages', 'path'): + LOCALE_PATHS.insert(0, config.get('languages', 'path')) FORMAT_MODULE_PATH = [ 'pretix.helpers.formats', @@ -407,7 +409,7 @@ LANGUAGES_OFFICIAL = { } LANGUAGES_INCUBATING = { 'pt-br', 'da', 'pl', 'it', 'el' -} +} - set(config.get('languages', 'allow_incubating', fallback='').split(',')) if DEBUG: LANGUAGES = ALL_LANGUAGES