Fixed #23417 -- Completed locale formats for zh_CN, zh_Hans, zh_Hant and zh_TW.

This commit is contained in:
Malte Beckmann 2014-09-04 18:35:44 +02:00 committed by Tim Graham
parent 6d5958c7a3
commit 1ac32e76ac
5 changed files with 142 additions and 57 deletions

View File

@ -5,20 +5,41 @@ from __future__ import unicode_literals
# 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 = DATE_FORMAT = 'Y年n月j日' # 2016年9月5日
# TIME_FORMAT = TIME_FORMAT = 'H:i' # 20:45
# DATETIME_FORMAT = DATETIME_FORMAT = 'Y年n月j日 H:i' # 2016年9月5日 20:45
# YEAR_MONTH_FORMAT = YEAR_MONTH_FORMAT = 'Y年n月' # 2016年9月
# MONTH_DAY_FORMAT = MONTH_DAY_FORMAT = 'm月j日' # 9月5日
# SHORT_DATE_FORMAT = SHORT_DATE_FORMAT = 'Y年n月j日' # 2016年9月5日
# SHORT_DATETIME_FORMAT = SHORT_DATETIME_FORMAT = 'Y年n月j日 H:i' # 2016年9月5日 20:45
# FIRST_DAY_OF_WEEK = FIRST_DAY_OF_WEEK = 1 # 星期一 (Monday)
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = DATE_INPUT_FORMATS = (
# TIME_INPUT_FORMATS = '%Y/%m/%d', # '2016/09/05'
# DATETIME_INPUT_FORMATS = '%Y-%m-%d', # '2016-09-05'
# DECIMAL_SEPARATOR = '%Y年%n月%j日', # '2016年9月5日'
# THOUSAND_SEPARATOR = )
# NUMBER_GROUPING =
TIME_INPUT_FORMATS = (
'%H:%M', # '20:45'
'%H:%M:%S', # '20:45:29'
'%H:%M:%S.%f', # '20:45:29.000200'
)
DATETIME_INPUT_FORMATS = (
'%Y/%m/%d %H:%M', # '2016/09/05 20:45'
'%Y-%m-%d %H:%M', # '2016-09-05 20:45'
'%Y年%n月%j日 %H:%M', # '2016年9月5日 14:45'
'%Y/%m/%d %H:%M:%S', # '2016/09/05 20:45:29'
'%Y-%m-%d %H:%M:%S', # '2016-09-05 20:45:29'
'%Y年%n月%j日 %H:%M:%S', # '2016年9月5日 20:45:29'
'%Y/%m/%d %H:%M:%S.%f', # '2016/09/05 20:45:29.000200'
'%Y-%m-%d %H:%M:%S.%f', # '2016-09-05 20:45:29.000200'
'%Y年%n月%j日 %H:%n:%S.%f', # '2016年9月5日 20:45:29.000200'
)
DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ''
NUMBER_GROUPING = 4

View File

@ -5,20 +5,41 @@ from __future__ import unicode_literals
# 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 = DATE_FORMAT = 'Y年n月j日' # 2016年9月5日
# TIME_FORMAT = TIME_FORMAT = 'H:i' # 20:45
# DATETIME_FORMAT = DATETIME_FORMAT = 'Y年n月j日 H:i' # 2016年9月5日 20:45
# YEAR_MONTH_FORMAT = YEAR_MONTH_FORMAT = 'Y年n月' # 2016年9月
# MONTH_DAY_FORMAT = MONTH_DAY_FORMAT = 'm月j日' # 9月5日
# SHORT_DATE_FORMAT = SHORT_DATE_FORMAT = 'Y年n月j日' # 2016年9月5日
# SHORT_DATETIME_FORMAT = SHORT_DATETIME_FORMAT = 'Y年n月j日 H:i' # 2016年9月5日 20:45
# FIRST_DAY_OF_WEEK = FIRST_DAY_OF_WEEK = 1 # 星期一 (Monday)
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = DATE_INPUT_FORMATS = (
# TIME_INPUT_FORMATS = '%Y/%m/%d', # '2016/09/05'
# DATETIME_INPUT_FORMATS = '%Y-%m-%d', # '2016-09-05'
# DECIMAL_SEPARATOR = '%Y年%n月%j日', # '2016年9月5日'
# THOUSAND_SEPARATOR = )
# NUMBER_GROUPING =
TIME_INPUT_FORMATS = (
'%H:%M', # '20:45'
'%H:%M:%S', # '20:45:29'
'%H:%M:%S.%f', # '20:45:29.000200'
)
DATETIME_INPUT_FORMATS = (
'%Y/%m/%d %H:%M', # '2016/09/05 20:45'
'%Y-%m-%d %H:%M', # '2016-09-05 20:45'
'%Y年%n月%j日 %H:%M', # '2016年9月5日 14:45'
'%Y/%m/%d %H:%M:%S', # '2016/09/05 20:45:29'
'%Y-%m-%d %H:%M:%S', # '2016-09-05 20:45:29'
'%Y年%n月%j日 %H:%M:%S', # '2016年9月5日 20:45:29'
'%Y/%m/%d %H:%M:%S.%f', # '2016/09/05 20:45:29.000200'
'%Y-%m-%d %H:%M:%S.%f', # '2016-09-05 20:45:29.000200'
'%Y年%n月%j日 %H:%n:%S.%f', # '2016年9月5日 20:45:29.000200'
)
DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ''
NUMBER_GROUPING = 4

View File

@ -5,20 +5,41 @@ from __future__ import unicode_literals
# 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 = DATE_FORMAT = 'Y年n月j日' # 2016年9月5日
# TIME_FORMAT = TIME_FORMAT = 'H:i' # 20:45
# DATETIME_FORMAT = DATETIME_FORMAT = 'Y年n月j日 H:i' # 2016年9月5日 20:45
# YEAR_MONTH_FORMAT = YEAR_MONTH_FORMAT = 'Y年n月' # 2016年9月
# MONTH_DAY_FORMAT = MONTH_DAY_FORMAT = 'm月j日' # 9月5日
# SHORT_DATE_FORMAT = SHORT_DATE_FORMAT = 'Y年n月j日' # 2016年9月5日
# SHORT_DATETIME_FORMAT = SHORT_DATETIME_FORMAT = 'Y年n月j日 H:i' # 2016年9月5日 20:45
# FIRST_DAY_OF_WEEK = FIRST_DAY_OF_WEEK = 1 # 星期一 (Monday)
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = DATE_INPUT_FORMATS = (
# TIME_INPUT_FORMATS = '%Y/%m/%d', # '2016/09/05'
# DATETIME_INPUT_FORMATS = '%Y-%m-%d', # '2016-09-05'
# DECIMAL_SEPARATOR = '%Y年%n月%j日', # '2016年9月5日'
# THOUSAND_SEPARATOR = )
# NUMBER_GROUPING =
TIME_INPUT_FORMATS = (
'%H:%M', # '20:45'
'%H:%M:%S', # '20:45:29'
'%H:%M:%S.%f', # '20:45:29.000200'
)
DATETIME_INPUT_FORMATS = (
'%Y/%m/%d %H:%M', # '2016/09/05 20:45'
'%Y-%m-%d %H:%M', # '2016-09-05 20:45'
'%Y年%n月%j日 %H:%M', # '2016年9月5日 14:45'
'%Y/%m/%d %H:%M:%S', # '2016/09/05 20:45:29'
'%Y-%m-%d %H:%M:%S', # '2016-09-05 20:45:29'
'%Y年%n月%j日 %H:%M:%S', # '2016年9月5日 20:45:29'
'%Y/%m/%d %H:%M:%S.%f', # '2016/09/05 20:45:29.000200'
'%Y-%m-%d %H:%M:%S.%f', # '2016-09-05 20:45:29.000200'
'%Y年%n月%j日 %H:%n:%S.%f', # '2016年9月5日 20:45:29.000200'
)
DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ''
NUMBER_GROUPING = 4

View File

@ -5,20 +5,41 @@ from __future__ import unicode_literals
# 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 = DATE_FORMAT = 'Y年n月j日' # 2016年9月5日
# TIME_FORMAT = TIME_FORMAT = 'H:i' # 20:45
# DATETIME_FORMAT = DATETIME_FORMAT = 'Y年n月j日 H:i' # 2016年9月5日 20:45
# YEAR_MONTH_FORMAT = YEAR_MONTH_FORMAT = 'Y年n月' # 2016年9月
# MONTH_DAY_FORMAT = MONTH_DAY_FORMAT = 'm月j日' # 9月5日
# SHORT_DATE_FORMAT = SHORT_DATE_FORMAT = 'Y年n月j日' # 2016年9月5日
# SHORT_DATETIME_FORMAT = SHORT_DATETIME_FORMAT = 'Y年n月j日 H:i' # 2016年9月5日 20:45
# FIRST_DAY_OF_WEEK = FIRST_DAY_OF_WEEK = 1 # 星期一 (Monday)
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = DATE_INPUT_FORMATS = (
# TIME_INPUT_FORMATS = '%Y/%m/%d', # '2016/09/05'
# DATETIME_INPUT_FORMATS = '%Y-%m-%d', # '2016-09-05'
# DECIMAL_SEPARATOR = '%Y年%n月%j日', # '2016年9月5日'
# THOUSAND_SEPARATOR = )
# NUMBER_GROUPING =
TIME_INPUT_FORMATS = (
'%H:%M', # '20:45'
'%H:%M:%S', # '20:45:29'
'%H:%M:%S.%f', # '20:45:29.000200'
)
DATETIME_INPUT_FORMATS = (
'%Y/%m/%d %H:%M', # '2016/09/05 20:45'
'%Y-%m-%d %H:%M', # '2016-09-05 20:45'
'%Y年%n月%j日 %H:%M', # '2016年9月5日 14:45'
'%Y/%m/%d %H:%M:%S', # '2016/09/05 20:45:29'
'%Y-%m-%d %H:%M:%S', # '2016-09-05 20:45:29'
'%Y年%n月%j日 %H:%M:%S', # '2016年9月5日 20:45:29'
'%Y/%m/%d %H:%M:%S.%f', # '2016/09/05 20:45:29.000200'
'%Y-%m-%d %H:%M:%S.%f', # '2016-09-05 20:45:29.000200'
'%Y年%n月%j日 %H:%n:%S.%f', # '2016年9月5日 20:45:29.000200'
)
DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ''
NUMBER_GROUPING = 4

View File

@ -201,7 +201,8 @@ Internationalization
reusable apps. It also allows overriding those custom formats in your main reusable apps. It also allows overriding those custom formats in your main
Django project. Django project.
* Formats for the Welsh locale (``cy``) have been added. * Formats for Welsh (``cy``) and several Chinese locales (``zh_CN``,
``zh_Hans``, ``zh_Hant`` and ``zh_TW``) have been added.
Management Commands Management Commands
^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^