mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Changed string delimiters form ' to ". Moved the webmail locale datetime formatting settings to new settings.py in webmail module.
This commit is contained in:
@@ -100,7 +100,5 @@ def extra_static_content(caller, st_type, user):
|
||||
@register.filter(name='localize_header_name')
|
||||
def localize_header_name(headername):
|
||||
""" Localizes the header names """
|
||||
names = {'From': _('From'), 'To': _('To'), 'Date': _('Date'), 'Subject': _('Subject')}
|
||||
if names.has_key(headername):
|
||||
return names[headername]
|
||||
return headername
|
||||
names = {"From": _("From"), "To": _("To"), "Date": _("Date"), "Subject": _("Subject")}
|
||||
return names.get(headername, headername)
|
||||
|
||||
@@ -106,26 +106,6 @@ USE_L10N = False
|
||||
|
||||
USE_TZ = True
|
||||
|
||||
# Webmail datetime formats according to
|
||||
# https://docs.djangoproject.com/en/1.10/ref/templates/builtins/
|
||||
# modoboa-webmail is able to show the datetime of emails
|
||||
# in two ways.
|
||||
# If none is provided, default is RFC 5322 formatted date.
|
||||
# For this, USE_L10N must be set to True!
|
||||
|
||||
# emails of the last week
|
||||
# en-us style
|
||||
WEBMAIL_SHORT_DATETIME_FORMAT = "l, P"
|
||||
# european style
|
||||
# WEBMAIL_SHORT_DATETIME_FORMAT = "l, H:i"
|
||||
|
||||
# emails older than a week
|
||||
# en-us style
|
||||
WEBMAIL_DATETIME_FORMAT = "N, j Y P"
|
||||
# european style
|
||||
# WEBMAIL_DATETIME_FORMAT = "d. N Y H:i"
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/1.6/howto/static-files/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user