From db8268bce69fb53b7be4be90a2d7200c12019b90 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Fri, 15 May 2020 20:31:23 +0200 Subject: [PATCH] Added support for the Tajik language. Thanks Sirius Sufiew for contributing that support. --- django/conf/global_settings.py | 1 + django/conf/locale/__init__.py | 6 ++++ django/conf/locale/en/LC_MESSAGES/django.po | 4 +++ django/conf/locale/tg/__init__.py | 0 django/conf/locale/tg/formats.py | 32 +++++++++++++++++++++ docs/releases/3.1.txt | 3 +- docs/spelling_wordlist | 1 + 7 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 django/conf/locale/tg/__init__.py create mode 100644 django/conf/locale/tg/formats.py diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py index 3690898bed..0ab3fb9fb9 100644 --- a/django/conf/global_settings.py +++ b/django/conf/global_settings.py @@ -132,6 +132,7 @@ LANGUAGES = [ ('sw', gettext_noop('Swahili')), ('ta', gettext_noop('Tamil')), ('te', gettext_noop('Telugu')), + ('tg', gettext_noop('Tajik')), ('th', gettext_noop('Thai')), ('tr', gettext_noop('Turkish')), ('tt', gettext_noop('Tatar')), diff --git a/django/conf/locale/__init__.py b/django/conf/locale/__init__.py index 03128f617f..a67f48f2d3 100644 --- a/django/conf/locale/__init__.py +++ b/django/conf/locale/__init__.py @@ -512,6 +512,12 @@ LANG_INFO = { 'name': 'Telugu', 'name_local': 'తెలుగు', }, + 'tg': { + 'bidi': False, + 'code': 'tg', + 'name': 'Tajik', + 'name_local': 'тоҷикӣ', + }, 'th': { 'bidi': False, 'code': 'th', diff --git a/django/conf/locale/en/LC_MESSAGES/django.po b/django/conf/locale/en/LC_MESSAGES/django.po index ea139212fb..cebe11b41b 100644 --- a/django/conf/locale/en/LC_MESSAGES/django.po +++ b/django/conf/locale/en/LC_MESSAGES/django.po @@ -346,6 +346,10 @@ msgstr "" msgid "Telugu" msgstr "" +#: conf/global_settings.py:133 +msgid "Tajik" +msgstr "" + #: conf/global_settings.py:134 msgid "Thai" msgstr "" diff --git a/django/conf/locale/tg/__init__.py b/django/conf/locale/tg/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/django/conf/locale/tg/formats.py b/django/conf/locale/tg/formats.py new file mode 100644 index 0000000000..3e7651d755 --- /dev/null +++ b/django/conf/locale/tg/formats.py @@ -0,0 +1,32 @@ +# This file is distributed under the same license as the Django package. +# +# The *_FORMAT strings use the Django date format syntax, +# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date +DATE_FORMAT = 'j E Y г.' +TIME_FORMAT = 'G:i' +DATETIME_FORMAT = 'j E Y г. G:i' +YEAR_MONTH_FORMAT = 'F Y г.' +MONTH_DAY_FORMAT = 'j F' +SHORT_DATE_FORMAT = 'd.m.Y' +SHORT_DATETIME_FORMAT = 'd.m.Y H:i' +FIRST_DAY_OF_WEEK = 1 # Monday + +# The *_INPUT_FORMATS strings use the Python strftime format syntax, +# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior +DATE_INPUT_FORMATS = [ + '%d.%m.%Y', # '25.10.2006' + '%d.%m.%y', # '25.10.06' +] +DATETIME_INPUT_FORMATS = [ + '%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' + '%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' + '%d.%m.%Y %H:%M', # '25.10.2006 14:30' + '%d.%m.%Y', # '25.10.2006' + '%d.%m.%y %H:%M:%S', # '25.10.06 14:30:59' + '%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200' + '%d.%m.%y %H:%M', # '25.10.06 14:30' + '%d.%m.%y', # '25.10.06' +] +DECIMAL_SEPARATOR = ',' +THOUSAND_SEPARATOR = '\xa0' # non-breaking space +NUMBER_GROUPING = 3 diff --git a/docs/releases/3.1.txt b/docs/releases/3.1.txt index ba96ea670f..af7ec6fe5a 100644 --- a/docs/releases/3.1.txt +++ b/docs/releases/3.1.txt @@ -296,7 +296,8 @@ Internationalization (string) value to explicitly state that the cookie is sent with all same-site and cross-site requests. -* Added support and translations for the Algerian Arabic and Kyrgyz languages. +* Added support and translations for the Algerian Arabic, Kyrgyz, and Tajik + languages. Management Commands ~~~~~~~~~~~~~~~~~~~ diff --git a/docs/spelling_wordlist b/docs/spelling_wordlist index 5a6b53eeef..1a6d35ec5a 100644 --- a/docs/spelling_wordlist +++ b/docs/spelling_wordlist @@ -661,6 +661,7 @@ systemwide tablespace tablespaces tagline +Tajik tarball tarballs teardown