[1.7.x] Removed code deprecated from Django 1.2
Backport of 2779c299c8
from master.
This commit is contained in:
parent
dbdbda87fc
commit
0c685ab64f
|
@ -31,23 +31,11 @@ get_language = lambda: settings.LANGUAGE_CODE
|
||||||
get_language_bidi = lambda: settings.LANGUAGE_CODE in settings.LANGUAGES_BIDI
|
get_language_bidi = lambda: settings.LANGUAGE_CODE in settings.LANGUAGES_BIDI
|
||||||
check_for_language = lambda x: True
|
check_for_language = lambda x: True
|
||||||
|
|
||||||
# date formats shouldn't be used using gettext anymore. This
|
|
||||||
# is kept for backward compatibility
|
|
||||||
TECHNICAL_ID_MAP = {
|
|
||||||
"DATE_WITH_TIME_FULL": settings.DATETIME_FORMAT,
|
|
||||||
"DATE_FORMAT": settings.DATE_FORMAT,
|
|
||||||
"DATETIME_FORMAT": settings.DATETIME_FORMAT,
|
|
||||||
"TIME_FORMAT": settings.TIME_FORMAT,
|
|
||||||
"YEAR_MONTH_FORMAT": settings.YEAR_MONTH_FORMAT,
|
|
||||||
"MONTH_DAY_FORMAT": settings.MONTH_DAY_FORMAT,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def gettext(message):
|
def gettext(message):
|
||||||
result = TECHNICAL_ID_MAP.get(message, message)
|
|
||||||
if isinstance(message, SafeData):
|
if isinstance(message, SafeData):
|
||||||
return mark_safe(result)
|
return mark_safe(message)
|
||||||
return result
|
return message
|
||||||
|
|
||||||
|
|
||||||
def ugettext(message):
|
def ugettext(message):
|
||||||
|
|
Loading…
Reference in New Issue