Commit 0fcc133f63696e94d1dd6ff649cec3f0a42703c9
1 parent
e7d2919c
Exists in
master
and in
39 other branches
Fixing translations on settings. closes #60
Showing
1 changed file
with
15 additions
and
15 deletions
Show diff stats
src/colab/custom_settings.py
1 | from settings import * | 1 | from settings import * |
2 | +from django.utils.translation import ugettext_lazy as _ | ||
2 | 3 | ||
3 | DEBUG = False | 4 | DEBUG = False |
4 | 5 | ||
@@ -6,11 +7,10 @@ TEMPLATE_DEBUG = False | @@ -6,11 +7,10 @@ TEMPLATE_DEBUG = False | ||
6 | 7 | ||
7 | TIME_ZONE = 'America/Sao_Paulo' | 8 | TIME_ZONE = 'America/Sao_Paulo' |
8 | 9 | ||
9 | -gettext = lambda s: s | ||
10 | LANGUAGES = ( | 10 | LANGUAGES = ( |
11 | - ('en', gettext('English')), | ||
12 | - ('pt-br', gettext('Portuguese')), | ||
13 | - ('es', gettext('Spanish')), | 11 | + ('en', _('English')), |
12 | + ('pt-br', _('Portuguese')), | ||
13 | + ('es', _('Spanish')), | ||
14 | ) | 14 | ) |
15 | 15 | ||
16 | DJANGO_DATE_FORMAT_TO_JS = { | 16 | DJANGO_DATE_FORMAT_TO_JS = { |
@@ -33,11 +33,11 @@ ATTACHMENTS_FOLDER_PATH = '/home/colab/trac/attachments/' | @@ -33,11 +33,11 @@ ATTACHMENTS_FOLDER_PATH = '/home/colab/trac/attachments/' | ||
33 | 33 | ||
34 | ORDERING_DATA = { | 34 | ORDERING_DATA = { |
35 | 'latest': { | 35 | 'latest': { |
36 | - 'name': gettext(u'Recent activity'), | 36 | + 'name': _(u'Recent activity'), |
37 | 'fields': ('-modified', '-created'), | 37 | 'fields': ('-modified', '-created'), |
38 | }, | 38 | }, |
39 | 'hottest': { | 39 | 'hottest': { |
40 | - 'name': gettext(u'Relevance'), | 40 | + 'name': _(u'Relevance'), |
41 | 'fields': None, | 41 | 'fields': None, |
42 | }, | 42 | }, |
43 | } | 43 | } |
@@ -45,16 +45,16 @@ ORDERING_DATA = { | @@ -45,16 +45,16 @@ ORDERING_DATA = { | ||
45 | # File type groupings is a tuple of tuples containg what it should filter, | 45 | # File type groupings is a tuple of tuples containg what it should filter, |
46 | # how it should be displayed, and a tuple of which mimetypes it includes | 46 | # how it should be displayed, and a tuple of which mimetypes it includes |
47 | FILE_TYPE_GROUPINGS = ( | 47 | FILE_TYPE_GROUPINGS = ( |
48 | - ('document', gettext(u'Document'), | 48 | + ('document', _(u'Document'), |
49 | ('doc', 'docx', 'odt', 'otx', 'dotx', 'pdf', 'ott')), | 49 | ('doc', 'docx', 'odt', 'otx', 'dotx', 'pdf', 'ott')), |
50 | - ('presentation', gettext(u'Presentation'), ('ppt', 'pptx', 'odp')), | ||
51 | - ('text', gettext(u'Text'), ('txt', 'po', 'conf', 'log')), | ||
52 | - ('code', gettext(u'Code'), | 50 | + ('presentation', _(u'Presentation'), ('ppt', 'pptx', 'odp')), |
51 | + ('text', _(u'Text'), ('txt', 'po', 'conf', 'log')), | ||
52 | + ('code', _(u'Code'), | ||
53 | ('py', 'php', 'js', 'sql', 'sh', 'patch', 'diff', 'html', '')), | 53 | ('py', 'php', 'js', 'sql', 'sh', 'patch', 'diff', 'html', '')), |
54 | - ('compressed', gettext(u'Compressed'), ('rar', 'zip', 'gz', 'tgz', 'bz2')), | ||
55 | - ('image', gettext(u'Image'), | 54 | + ('compressed', _(u'Compressed'), ('rar', 'zip', 'gz', 'tgz', 'bz2')), |
55 | + ('image', _(u'Image'), | ||
56 | ('jpg', 'jpeg', 'png', 'tiff', 'gif', 'svg', 'psd', 'planner', 'cdr')), | 56 | ('jpg', 'jpeg', 'png', 'tiff', 'gif', 'svg', 'psd', 'planner', 'cdr')), |
57 | - ('spreadsheet', gettext(u'Spreadsheet'), | 57 | + ('spreadsheet', _(u'Spreadsheet'), |
58 | ('ods', 'xls', 'xlsx', 'xslt', 'csv')), | 58 | ('ods', 'xls', 'xlsx', 'xslt', 'csv')), |
59 | ) | 59 | ) |
60 | 60 | ||
@@ -258,8 +258,8 @@ MESSAGE_TAGS = { | @@ -258,8 +258,8 @@ MESSAGE_TAGS = { | ||
258 | ### Feedzilla (planet) | 258 | ### Feedzilla (planet) |
259 | from feedzilla.settings import * | 259 | from feedzilla.settings import * |
260 | FEEDZILLA_PAGE_SIZE = 5 | 260 | FEEDZILLA_PAGE_SIZE = 5 |
261 | -FEEDZILLA_SITE_TITLE = gettext(u'Planet Colab') | ||
262 | -FEEDZILLA_SITE_DESCRIPTION = gettext(u'Colab blog aggregator') | 261 | +FEEDZILLA_SITE_TITLE = _(u'Planet Colab') |
262 | +FEEDZILLA_SITE_DESCRIPTION = _(u'Colab blog aggregator') | ||
263 | 263 | ||
264 | 264 | ||
265 | ### Mailman API settings | 265 | ### Mailman API settings |