Skip to content

Commit 6f526cb

Browse files
claudepfelixxm
authored andcommitted
[3.1.x] Added support for the Tajik language.
Thanks Sirius Sufiew for contributing that support. Backport of db8268b from master
1 parent 42f5f2d commit 6f526cb

File tree

7 files changed

+46
-1
lines changed

7 files changed

+46
-1
lines changed

django/conf/global_settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ def gettext_noop(s):
132132
('sw', gettext_noop('Swahili')),
133133
('ta', gettext_noop('Tamil')),
134134
('te', gettext_noop('Telugu')),
135+
('tg', gettext_noop('Tajik')),
135136
('th', gettext_noop('Thai')),
136137
('tr', gettext_noop('Turkish')),
137138
('tt', gettext_noop('Tatar')),

django/conf/locale/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,12 @@
512512
'name': 'Telugu',
513513
'name_local': 'తెలుగు',
514514
},
515+
'tg': {
516+
'bidi': False,
517+
'code': 'tg',
518+
'name': 'Tajik',
519+
'name_local': 'тоҷикӣ',
520+
},
515521
'th': {
516522
'bidi': False,
517523
'code': 'th',

django/conf/locale/en/LC_MESSAGES/django.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,10 @@ msgstr ""
346346
msgid "Telugu"
347347
msgstr ""
348348

349+
#: conf/global_settings.py:133
350+
msgid "Tajik"
351+
msgstr ""
352+
349353
#: conf/global_settings.py:134
350354
msgid "Thai"
351355
msgstr ""

django/conf/locale/tg/__init__.py

Whitespace-only changes.

django/conf/locale/tg/formats.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This file is distributed under the same license as the Django package.
2+
#
3+
# The *_FORMAT strings use the Django date format syntax,
4+
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
5+
DATE_FORMAT = 'j E Y г.'
6+
TIME_FORMAT = 'G:i'
7+
DATETIME_FORMAT = 'j E Y г. G:i'
8+
YEAR_MONTH_FORMAT = 'F Y г.'
9+
MONTH_DAY_FORMAT = 'j F'
10+
SHORT_DATE_FORMAT = 'd.m.Y'
11+
SHORT_DATETIME_FORMAT = 'd.m.Y H:i'
12+
FIRST_DAY_OF_WEEK = 1 # Monday
13+
14+
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
15+
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
16+
DATE_INPUT_FORMATS = [
17+
'%d.%m.%Y', # '25.10.2006'
18+
'%d.%m.%y', # '25.10.06'
19+
]
20+
DATETIME_INPUT_FORMATS = [
21+
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59'
22+
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200'
23+
'%d.%m.%Y %H:%M', # '25.10.2006 14:30'
24+
'%d.%m.%Y', # '25.10.2006'
25+
'%d.%m.%y %H:%M:%S', # '25.10.06 14:30:59'
26+
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200'
27+
'%d.%m.%y %H:%M', # '25.10.06 14:30'
28+
'%d.%m.%y', # '25.10.06'
29+
]
30+
DECIMAL_SEPARATOR = ','
31+
THOUSAND_SEPARATOR = '\xa0' # non-breaking space
32+
NUMBER_GROUPING = 3

docs/releases/3.1.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ Internationalization
296296
(string) value to explicitly state that the cookie is sent with all same-site
297297
and cross-site requests.
298298

299-
* Added support and translations for the Algerian Arabic and Kyrgyz languages.
299+
* Added support and translations for the Algerian Arabic, Kyrgyz, and Tajik
300+
languages.
300301

301302
Management Commands
302303
~~~~~~~~~~~~~~~~~~~

docs/spelling_wordlist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,7 @@ systemwide
662662
tablespace
663663
tablespaces
664664
tagline
665+
Tajik
665666
tarball
666667
tarballs
667668
teardown

0 commit comments

Comments
 (0)