Updated a few localization formats to stop the changes done in r17473 from breaking the tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
8ae02fde2b
commit
c1acda6d8f
Binary file not shown.
|
@ -1064,11 +1064,11 @@ msgstr ", %(number)d %(type)s"
|
||||||
|
|
||||||
#: utils/translation/trans_real.py:568
|
#: utils/translation/trans_real.py:568
|
||||||
msgid "DATE_FORMAT"
|
msgid "DATE_FORMAT"
|
||||||
msgstr "j \\de F \\de Y"
|
msgstr "j \\d\\e F \\d\\e Y"
|
||||||
|
|
||||||
#: utils/translation/trans_real.py:569
|
#: utils/translation/trans_real.py:569
|
||||||
msgid "DATETIME_FORMAT"
|
msgid "DATETIME_FORMAT"
|
||||||
msgstr "j \\de F \\de Y, H:i"
|
msgstr "j \\d\\e F \\d\\e Y, H:i"
|
||||||
|
|
||||||
#: utils/translation/trans_real.py:570
|
#: utils/translation/trans_real.py:570
|
||||||
msgid "TIME_FORMAT"
|
msgid "TIME_FORMAT"
|
||||||
|
@ -1076,11 +1076,11 @@ msgstr "H:i"
|
||||||
|
|
||||||
#: utils/translation/trans_real.py:591
|
#: utils/translation/trans_real.py:591
|
||||||
msgid "YEAR_MONTH_FORMAT"
|
msgid "YEAR_MONTH_FORMAT"
|
||||||
msgstr "F \\de Y"
|
msgstr "F \\d\\e Y"
|
||||||
|
|
||||||
#: utils/translation/trans_real.py:592
|
#: utils/translation/trans_real.py:592
|
||||||
msgid "MONTH_DAY_FORMAT"
|
msgid "MONTH_DAY_FORMAT"
|
||||||
msgstr "j \\de F"
|
msgstr "j \\d\\e F"
|
||||||
|
|
||||||
#: views/generic/create_update.py:121
|
#: views/generic/create_update.py:121
|
||||||
#, python-format
|
#, python-format
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
|
|
||||||
# The *_FORMAT strings use the Django date format syntax,
|
# The *_FORMAT strings use the Django date format syntax,
|
||||||
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
||||||
DATE_FORMAT = r'j \de F \de Y'
|
DATE_FORMAT = r'j \d\e F \d\e Y'
|
||||||
TIME_FORMAT = 'G:i:s'
|
TIME_FORMAT = 'G:i:s'
|
||||||
DATETIME_FORMAT = r'j \de F \de Y \a \le\s G:i'
|
DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\e\s G:i'
|
||||||
YEAR_MONTH_FORMAT = r'F \de\l Y'
|
YEAR_MONTH_FORMAT = r'F \d\e\l Y'
|
||||||
MONTH_DAY_FORMAT = r'j \de F'
|
MONTH_DAY_FORMAT = r'j \d\e F'
|
||||||
SHORT_DATE_FORMAT = 'd/m/Y'
|
SHORT_DATE_FORMAT = 'd/m/Y'
|
||||||
SHORT_DATETIME_FORMAT = 'd/m/Y G:i'
|
SHORT_DATETIME_FORMAT = 'd/m/Y G:i'
|
||||||
FIRST_DAY_OF_WEEK = 1 # Monday
|
FIRST_DAY_OF_WEEK = 1 # Monday
|
||||||
|
|
Binary file not shown.
|
@ -1084,7 +1084,7 @@ msgstr "F Y"
|
||||||
|
|
||||||
#: utils/translation/trans_real.py:602
|
#: utils/translation/trans_real.py:602
|
||||||
msgid "MONTH_DAY_FORMAT"
|
msgid "MONTH_DAY_FORMAT"
|
||||||
msgstr "j \\de F"
|
msgstr "j \\d\\e F"
|
||||||
|
|
||||||
#: views/generic/create_update.py:121
|
#: views/generic/create_update.py:121
|
||||||
#, python-format
|
#, python-format
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
|
|
||||||
# The *_FORMAT strings use the Django date format syntax,
|
# The *_FORMAT strings use the Django date format syntax,
|
||||||
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
||||||
DATE_FORMAT = r'j \de F \de Y'
|
DATE_FORMAT = r'j \d\e F \d\e Y'
|
||||||
TIME_FORMAT = 'H:i:s'
|
TIME_FORMAT = 'H:i:s'
|
||||||
DATETIME_FORMAT = r'j \de F \de Y \a \l\a\s H:i'
|
DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\a\s H:i'
|
||||||
YEAR_MONTH_FORMAT = r'F \de Y'
|
YEAR_MONTH_FORMAT = r'F \d\e Y'
|
||||||
MONTH_DAY_FORMAT = r'j \de F'
|
MONTH_DAY_FORMAT = r'j \d\e F'
|
||||||
SHORT_DATE_FORMAT = 'd/m/Y'
|
SHORT_DATE_FORMAT = 'd/m/Y'
|
||||||
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
|
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
|
||||||
FIRST_DAY_OF_WEEK = 1 # Monday
|
FIRST_DAY_OF_WEEK = 1 # Monday
|
||||||
|
|
Binary file not shown.
|
@ -1082,7 +1082,7 @@ msgstr "F Y"
|
||||||
|
|
||||||
#: utils/translation/trans_real.py:592
|
#: utils/translation/trans_real.py:592
|
||||||
msgid "MONTH_DAY_FORMAT"
|
msgid "MONTH_DAY_FORMAT"
|
||||||
msgstr "j \\de F"
|
msgstr "j \\d\\e F"
|
||||||
|
|
||||||
#: views/generic/create_update.py:121
|
#: views/generic/create_update.py:121
|
||||||
#, python-format
|
#, python-format
|
||||||
|
|
|
@ -8,7 +8,7 @@ DATE_FORMAT = r'j N Y'
|
||||||
TIME_FORMAT = r'H:i:s'
|
TIME_FORMAT = r'H:i:s'
|
||||||
DATETIME_FORMAT = r'j N Y H:i:s'
|
DATETIME_FORMAT = r'j N Y H:i:s'
|
||||||
YEAR_MONTH_FORMAT = r'F Y'
|
YEAR_MONTH_FORMAT = r'F Y'
|
||||||
MONTH_DAY_FORMAT = r'j \de F'
|
MONTH_DAY_FORMAT = r'j \d\e F'
|
||||||
SHORT_DATE_FORMAT = r'd/m/Y'
|
SHORT_DATE_FORMAT = r'd/m/Y'
|
||||||
SHORT_DATETIME_FORMAT = r'd/m/Y H:i'
|
SHORT_DATETIME_FORMAT = r'd/m/Y H:i'
|
||||||
FIRST_DAY_OF_WEEK = 0 # 0: Sunday, 1: Monday
|
FIRST_DAY_OF_WEEK = 0 # 0: Sunday, 1: Monday
|
||||||
|
|
Binary file not shown.
|
@ -1082,7 +1082,7 @@ msgstr "F Y"
|
||||||
|
|
||||||
#: utils/translation/trans_real.py:592
|
#: utils/translation/trans_real.py:592
|
||||||
msgid "MONTH_DAY_FORMAT"
|
msgid "MONTH_DAY_FORMAT"
|
||||||
msgstr "j \\de F"
|
msgstr "j \\d\\e F"
|
||||||
|
|
||||||
#: views/generic/create_update.py:121
|
#: views/generic/create_update.py:121
|
||||||
#, python-format
|
#, python-format
|
||||||
|
|
|
@ -2,18 +2,17 @@
|
||||||
# This file is distributed under the same license as the Django package.
|
# This file is distributed under the same license as the Django package.
|
||||||
#
|
#
|
||||||
|
|
||||||
DATE_FORMAT = r'j \de F \de Y'
|
DATE_FORMAT = r'j \d\e F \d\e Y'
|
||||||
TIME_FORMAT = 'H:i:s'
|
TIME_FORMAT = 'H:i:s'
|
||||||
DATETIME_FORMAT = r'j \de F \de Y \a \l\a\s H:i'
|
DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\a\s H:i'
|
||||||
YEAR_MONTH_FORMAT = r'F \de Y'
|
YEAR_MONTH_FORMAT = r'F \d\e Y'
|
||||||
MONTH_DAY_FORMAT = r'j \de F'
|
MONTH_DAY_FORMAT = r'j \d\e F'
|
||||||
SHORT_DATE_FORMAT = 'd/m/Y'
|
SHORT_DATE_FORMAT = 'd/m/Y'
|
||||||
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
|
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
|
||||||
FIRST_DAY_OF_WEEK = 1 # Monday: ISO 8601
|
FIRST_DAY_OF_WEEK = 1 # Monday: ISO 8601
|
||||||
DATE_INPUT_FORMATS = (
|
DATE_INPUT_FORMATS = (
|
||||||
'%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
|
'%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
|
||||||
'%Y%m%d', # '20061025'
|
'%Y%m%d', # '20061025'
|
||||||
|
|
||||||
)
|
)
|
||||||
TIME_INPUT_FORMATS = (
|
TIME_INPUT_FORMATS = (
|
||||||
'%H:%M:%S', '%H:%M', # '14:30:59', '14:30'
|
'%H:%M:%S', '%H:%M', # '14:30:59', '14:30'
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
# This file is distributed under the same license as the Django package.
|
# This file is distributed under the same license as the Django package.
|
||||||
#
|
#
|
||||||
|
|
||||||
DATE_FORMAT = r'j \de F \de Y'
|
DATE_FORMAT = r'j \d\e F \d\e Y'
|
||||||
TIME_FORMAT = 'H:i:s'
|
TIME_FORMAT = 'H:i:s'
|
||||||
DATETIME_FORMAT = r'j \de F \de Y \a \l\a\s H:i'
|
DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\a\s H:i'
|
||||||
YEAR_MONTH_FORMAT = r'F \de Y'
|
YEAR_MONTH_FORMAT = r'F \d\e Y'
|
||||||
MONTH_DAY_FORMAT = r'j \de F'
|
MONTH_DAY_FORMAT = r'j \d\e F'
|
||||||
SHORT_DATE_FORMAT = 'd/m/Y'
|
SHORT_DATE_FORMAT = 'd/m/Y'
|
||||||
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
|
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
|
||||||
FIRST_DAY_OF_WEEK = 1 # Monday: ISO 8601
|
FIRST_DAY_OF_WEEK = 1 # Monday: ISO 8601
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
|
|
||||||
# The *_FORMAT strings use the Django date format syntax,
|
# The *_FORMAT strings use the Django date format syntax,
|
||||||
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
||||||
DATE_FORMAT = r'j \de F \de Y'
|
DATE_FORMAT = r'j \d\e F \d\e Y'
|
||||||
TIME_FORMAT = 'H:i:s'
|
TIME_FORMAT = 'H:i:s'
|
||||||
DATETIME_FORMAT = r'j \de F \de Y à\s H:i'
|
DATETIME_FORMAT = r'j \d\e F \d\e Y à\s H:i'
|
||||||
YEAR_MONTH_FORMAT = r'F \de Y'
|
YEAR_MONTH_FORMAT = r'F \d\e Y'
|
||||||
MONTH_DAY_FORMAT = r'j \de F'
|
MONTH_DAY_FORMAT = r'j \d\e F'
|
||||||
SHORT_DATE_FORMAT = 'd/m/Y'
|
SHORT_DATE_FORMAT = 'd/m/Y'
|
||||||
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
|
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
|
||||||
FIRST_DAY_OF_WEEK = 0 # Sunday
|
FIRST_DAY_OF_WEEK = 0 # Sunday
|
||||||
|
|
Binary file not shown.
|
@ -1059,11 +1059,11 @@ msgstr ", %(number)d %(type)s"
|
||||||
|
|
||||||
#: utils/translation/trans_real.py:568
|
#: utils/translation/trans_real.py:568
|
||||||
msgid "DATE_FORMAT"
|
msgid "DATE_FORMAT"
|
||||||
msgstr "j \\de N \\de Y"
|
msgstr "j \\d\\e N \\d\\e Y"
|
||||||
|
|
||||||
#: utils/translation/trans_real.py:569
|
#: utils/translation/trans_real.py:569
|
||||||
msgid "DATETIME_FORMAT"
|
msgid "DATETIME_FORMAT"
|
||||||
msgstr "j \\de N \\de Y à\\s H:i"
|
msgstr "j \\d\\e N \\d\\e Y à\\s H:i"
|
||||||
|
|
||||||
#: utils/translation/trans_real.py:570
|
#: utils/translation/trans_real.py:570
|
||||||
msgid "TIME_FORMAT"
|
msgid "TIME_FORMAT"
|
||||||
|
@ -1071,11 +1071,11 @@ msgstr "H:i"
|
||||||
|
|
||||||
#: utils/translation/trans_real.py:591
|
#: utils/translation/trans_real.py:591
|
||||||
msgid "YEAR_MONTH_FORMAT"
|
msgid "YEAR_MONTH_FORMAT"
|
||||||
msgstr "F \\de Y"
|
msgstr "F \\d\\e Y"
|
||||||
|
|
||||||
#: utils/translation/trans_real.py:592
|
#: utils/translation/trans_real.py:592
|
||||||
msgid "MONTH_DAY_FORMAT"
|
msgid "MONTH_DAY_FORMAT"
|
||||||
msgstr "j \\de F"
|
msgstr "j \\d\\e F"
|
||||||
|
|
||||||
#: views/generic/create_update.py:121
|
#: views/generic/create_update.py:121
|
||||||
#, python-format
|
#, python-format
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
|
|
||||||
# The *_FORMAT strings use the Django date format syntax,
|
# The *_FORMAT strings use the Django date format syntax,
|
||||||
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
||||||
DATE_FORMAT = r'j \de F \de Y'
|
DATE_FORMAT = r'j \d\e F \d\e Y'
|
||||||
TIME_FORMAT = 'H:i'
|
TIME_FORMAT = 'H:i'
|
||||||
DATETIME_FORMAT = r'j \de F \de Y à\s H:i'
|
DATETIME_FORMAT = r'j \d\e F \d\e Y à\s H:i'
|
||||||
YEAR_MONTH_FORMAT = r'F \de Y'
|
YEAR_MONTH_FORMAT = r'F \d\e Y'
|
||||||
MONTH_DAY_FORMAT = r'j \de F'
|
MONTH_DAY_FORMAT = r'j \d\e F'
|
||||||
SHORT_DATE_FORMAT = 'd/m/Y'
|
SHORT_DATE_FORMAT = 'd/m/Y'
|
||||||
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
|
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
|
||||||
FIRST_DAY_OF_WEEK = 0 # Sunday
|
FIRST_DAY_OF_WEEK = 0 # Sunday
|
||||||
|
|
|
@ -147,7 +147,7 @@ class DateFormat(TimeFormat):
|
||||||
def e(self):
|
def e(self):
|
||||||
"Timezone name if available"
|
"Timezone name if available"
|
||||||
try:
|
try:
|
||||||
if self.data.tzinfo:
|
if hasattr(self.data, 'tzinfo') and self.data.tzinfo:
|
||||||
# Have to use tzinfo.tzname and not datetime.tzname
|
# Have to use tzinfo.tzname and not datetime.tzname
|
||||||
# because datatime.tzname does not expect Unicode
|
# because datatime.tzname does not expect Unicode
|
||||||
return self.data.tzinfo.tzname(self.data) or ""
|
return self.data.tzinfo.tzname(self.data) or ""
|
||||||
|
|
|
@ -487,7 +487,7 @@ class DefaultFiltersTests(TestCase):
|
||||||
# real testing of date() is in dateformat.py
|
# real testing of date() is in dateformat.py
|
||||||
self.assertEqual(date(datetime.datetime(2005, 12, 29), u"d F Y"),
|
self.assertEqual(date(datetime.datetime(2005, 12, 29), u"d F Y"),
|
||||||
u'29 December 2005')
|
u'29 December 2005')
|
||||||
self.assertEqual(date(datetime.datetime(2005, 12, 29), ur'jS o\f F'),
|
self.assertEqual(date(datetime.datetime(2005, 12, 29), ur'jS \o\f F'),
|
||||||
u'29th of December')
|
u'29th of December')
|
||||||
|
|
||||||
def test_time(self):
|
def test_time(self):
|
||||||
|
|
|
@ -439,7 +439,7 @@ class FormattingTests(TestCase):
|
||||||
settings.USE_L10N = True
|
settings.USE_L10N = True
|
||||||
# Catalan locale
|
# Catalan locale
|
||||||
with translation.override('ca', deactivate=True):
|
with translation.override('ca', deactivate=True):
|
||||||
self.assertEqual('j \de F \de Y', get_format('DATE_FORMAT'))
|
self.assertEqual('j \d\e F \d\e Y', get_format('DATE_FORMAT'))
|
||||||
self.assertEqual(1, get_format('FIRST_DAY_OF_WEEK'))
|
self.assertEqual(1, get_format('FIRST_DAY_OF_WEEK'))
|
||||||
self.assertEqual(',', get_format('DECIMAL_SEPARATOR'))
|
self.assertEqual(',', get_format('DECIMAL_SEPARATOR'))
|
||||||
self.assertEqual(u'10:15:48', time_format(self.t))
|
self.assertEqual(u'10:15:48', time_format(self.t))
|
||||||
|
|
|
@ -104,7 +104,7 @@ class DateFormatTests(unittest.TestCase):
|
||||||
|
|
||||||
self.assertEqual(dateformat.format(my_birthday, r'Y z \C\E\T'), u'1979 189 CET')
|
self.assertEqual(dateformat.format(my_birthday, r'Y z \C\E\T'), u'1979 189 CET')
|
||||||
|
|
||||||
self.assertEqual(dateformat.format(my_birthday, r'jS o\f F'), u'8th of July')
|
self.assertEqual(dateformat.format(my_birthday, r'jS \o\f F'), u'8th of July')
|
||||||
|
|
||||||
def test_futuredates(self):
|
def test_futuredates(self):
|
||||||
the_future = datetime(2100, 10, 25, 0, 00)
|
the_future = datetime(2100, 10, 25, 0, 00)
|
||||||
|
|
Loading…
Reference in New Issue