[Django] #29713: Add a django check to ensure the LANGUAGE_CODE setting uses the standard language ID format

9 views
Skip to first unread message

Django

unread,
Aug 26, 2018, 8:03:49 PM8/26/18
to django-...@googlegroups.com
#29713: Add a django check to ensure the LANGUAGE_CODE setting uses the standard
language ID format
------------------------------------------------+------------------------
Reporter: Ian Foote | Owner: nobody
Type: New feature | Status: new
Component: Internationalization | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
The {{{LANGUAGE_CODE}}} should be formatted like {{{en-us}}} not
{{{en_US}}}. Add a check to detect this error.

--
Ticket URL: <https://code.djangoproject.com/ticket/29713>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 26, 2018, 8:09:32 PM8/26/18
to django-...@googlegroups.com
#29713: Add a django check to ensure the LANGUAGE_CODE setting uses the standard
language ID format
-------------------------------------+-------------------------------------
Reporter: Ian Foote | Owner: darvid7
Type: New feature | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by darvid7):

* status: new => assigned
* owner: nobody => darvid7


--
Ticket URL: <https://code.djangoproject.com/ticket/29713#comment:1>

Django

unread,
Aug 27, 2018, 12:26:42 AM8/27/18
to django-...@googlegroups.com
#29713: Add a django check to ensure the LANGUAGE_CODE setting uses the standard
language ID format
-------------------------------------+-------------------------------------
Reporter: Ian Foote | Owner: darvid7
Type: New feature | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by darvid7):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/29713#comment:2>

Django

unread,
Aug 27, 2018, 4:11:15 AM8/27/18
to django-...@googlegroups.com
#29713: Add a django check to ensure the LANGUAGE_CODE setting uses the standard
language ID format
-------------------------------------+-------------------------------------
Reporter: Ian Foote | Owner: darvid7
Type: New feature | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* needs_better_patch: 0 => 1
* easy: 1 => 0


Comment:

If we check this, then we should respect the "specs"
(https://en.wikipedia.org/wiki/IETF_language_tag#Syntax_of_language_tags).

--
Ticket URL: <https://code.djangoproject.com/ticket/29713#comment:3>

Django

unread,
Aug 27, 2018, 8:01:07 PM8/27/18
to django-...@googlegroups.com
#29713: Add a django check to ensure the LANGUAGE_CODE setting uses the standard
language ID format
-------------------------------------+-------------------------------------
Reporter: Ian Foote | Owner: David

Type: New feature | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by David):

Thanks for the feedback! I ended up using `language_code_re` in
`utils.translations.trans_real.py` that I believe meets the specs.

--
Ticket URL: <https://code.djangoproject.com/ticket/29713#comment:4>

Django

unread,
Aug 28, 2018, 7:56:41 AM8/28/18
to django-...@googlegroups.com
#29713: Add a django check to ensure the LANGUAGE_CODE setting uses the standard
language ID format
--------------------------------------+------------------------------------

Reporter: Ian Foote | Owner: David
Type: New feature | Status: assigned
Component: Internationalization | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Claude Paroz):

* needs_better_patch: 1 => 0
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/29713#comment:5>

Django

unread,
Sep 3, 2018, 4:06:27 AM9/3/18
to django-...@googlegroups.com
#29713: Add a django check to ensure the LANGUAGE_CODE setting uses the standard
language ID format
-------------------------------------+-------------------------------------

Reporter: Ian Foote | Owner: David
Type: New feature | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Accepted => Ready for checkin


Comment:

I left the smallest of niggles on the PR but other than that it looks good
to go. Thanks Ian, David, Claude.

--
Ticket URL: <https://code.djangoproject.com/ticket/29713#comment:6>

Django

unread,
Sep 3, 2018, 4:44:49 AM9/3/18
to django-...@googlegroups.com
#29713: Add a django check to ensure the LANGUAGE_CODE setting uses the standard
language ID format
-------------------------------------+-------------------------------------
Reporter: Ian Foote | Owner: David
Type: New feature | Status: closed
Component: | Version: master
Internationalization |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson <carlton.gibson@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"5db8d617c0a5b16fabe16d1d52b2f9db519d8bb6" 5db8d617]:
{{{
#!CommitTicketReference repository=""
revision="5db8d617c0a5b16fabe16d1d52b2f9db519d8bb6"
Fixed #29713 -- Added check that LANGUAGE_CODE uses standard language id
format.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29713#comment:7>

Django

unread,
Sep 4, 2018, 4:47:50 AM9/4/18
to django-...@googlegroups.com
#29713: Add a django check to ensure the LANGUAGE_CODE setting uses the standard
language ID format
-------------------------------------+-------------------------------------
Reporter: Ian Foote | Owner: David
Type: New feature | Status: closed
Component: | Version: master
Internationalization |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Nick Pope):

Follow up [https://github.com/django/django/pull/10367 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/29713#comment:8>

Django

unread,
Sep 6, 2018, 7:50:03 AM9/6/18
to django-...@googlegroups.com
#29713: Add a django check to ensure the LANGUAGE_CODE setting uses the standard
language ID format
-------------------------------------+-------------------------------------
Reporter: Ian Foote | Owner: David
Type: New feature | Status: closed
Component: | Version: master
Internationalization |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton.gibson@…>):

In [changeset:"570402ffd7efd529eb597d86525b80a6fbfca0e7" 570402f]:
{{{
#!CommitTicketReference repository=""
revision="570402ffd7efd529eb597d86525b80a6fbfca0e7"
Refs #29713 -- Improved error message from translation system check.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29713#comment:9>

Django

unread,
Mar 7, 2019, 6:38:12 PM3/7/19
to django-...@googlegroups.com
#29713: Add a django check to ensure the LANGUAGE_CODE setting uses the standard
language ID format
-------------------------------------+-------------------------------------
Reporter: Ian Foote | Owner: David
Type: New feature | Status: closed
Component: | Version: master
Internationalization |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Nick Pope):

See #30241 for a follow up to add additional checks for language-related
settings.

--
Ticket URL: <https://code.djangoproject.com/ticket/29713#comment:10>

Django

unread,
Mar 28, 2019, 4:57:26 PM3/28/19
to django-...@googlegroups.com
#29713: Add a django check to ensure the LANGUAGE_CODE setting uses the standard
language ID format
-------------------------------------+-------------------------------------
Reporter: Ian Foote | Owner: David
Type: New feature | Status: closed
Component: | Version: master
Internationalization |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"d4783048efac81f73f3b8785696111547a31bcf1" d478304]:
{{{
#!CommitTicketReference repository=""
revision="d4783048efac81f73f3b8785696111547a31bcf1"
Refs #29713 -- Improved error message when LANGUAGE_CODE is invalid.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29713#comment:11>

Reply all
Reply to author
Forward
0 new messages