summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2020-05-15 20:31:23 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-06-12 22:32:46 +0200
commit6f526cb2038cb2b8a4bf58818f963a2759d81b89 (patch)
treeb7126933eb7eb7bbc4e065884fef97f9996c674b
parent42f5f2d76b19ee36ca659c6141b8a8197387c918 (diff)
[3.1.x] Added support for the Tajik language.
Thanks Sirius Sufiew for contributing that support. Backport of db8268bce69fb53b7be4be90a2d7200c12019b90 from master
-rw-r--r--django/conf/global_settings.py1
-rw-r--r--django/conf/locale/__init__.py6
-rw-r--r--django/conf/locale/en/LC_MESSAGES/django.po4
-rw-r--r--django/conf/locale/tg/__init__.py0
-rw-r--r--django/conf/locale/tg/formats.py32
-rw-r--r--docs/releases/3.1.txt3
-rw-r--r--docs/spelling_wordlist1
7 files changed, 46 insertions, 1 deletions
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
--- /dev/null
+++ b/django/conf/locale/tg/__init__.py
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 fc33877c86..791309cfaf 100644
--- a/docs/spelling_wordlist
+++ b/docs/spelling_wordlist
@@ -662,6 +662,7 @@ systemwide
tablespace
tablespaces
tagline
+Tajik
tarball
tarballs
teardown