mirror of
https://github.com/pretix/pretix.git
synced 2026-05-11 16:13:59 +00:00
Allow to configure locale path and incubating languages
This commit is contained in:
@@ -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
|
||||
-----------------
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user