Merge branch 'reflow'
[wolnelektury.git] / src / catalogue / constants.py
1 # -*- coding: utf-8 -*-
2 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4 #
5 from django.utils.translation import ugettext_lazy as _
6
7 LICENSES = {
8     'http://creativecommons.org/licenses/by-sa/3.0/': {
9         'icon': 'cc-by-sa',
10         'description': _('Creative Commons Attribution-ShareAlike 3.0 Unported'),
11     },
12 }
13 LICENSES['http://creativecommons.org/licenses/by-sa/3.0/deed.pl'] = \
14     LICENSES['http://creativecommons.org/licenses/by-sa/3.0/']
15
16 # Those will be generated only for books with own HTML.
17 EBOOK_FORMATS_WITHOUT_CHILDREN = ['txt', 'fb2']
18 # Those will be generated for all books.
19 EBOOK_FORMATS_WITH_CHILDREN = ['pdf', 'epub', 'mobi']
20 # Those will be generated when inherited cover changes.
21 EBOOK_FORMATS_WITH_COVERS = ['pdf', 'epub', 'mobi']
22
23 EBOOK_FORMATS = EBOOK_FORMATS_WITHOUT_CHILDREN + EBOOK_FORMATS_WITH_CHILDREN
24
25 LANGUAGES_3TO2 = {
26     'deu': 'de',
27     'ger': 'de',
28     'eng': 'en',
29     'spa': 'es',
30     'fra': 'fr',
31     'fre': 'fr',
32     'ita': 'it',
33     'jpn': 'jp',
34     'lit': 'lt',
35     'pol': 'pl',
36     'rus': 'ru',
37     'ukr': 'uk',
38 }
39
40 CATEGORIES_NAME_PLURAL = {
41     'author': _('authors'),
42     'epoch': _('epochs'),
43     'kind': _('kinds'),
44     'genre': _('genres'),
45     'theme': _('themes'),
46     'set': _('sets'),
47     'thing': _('things'),
48 }
49
50 WHOLE_CATEGORY = {
51     'author': _('All authors'),
52     'epoch': _('All epochs'),
53     'kind': _('All kinds'),
54     'genre': _('All genres'),
55     'theme': _('All themes'),
56     'set': _('All sets'),
57     'thing': _('All things'),
58 }