[Django] #25933: Allow un-prefixed default language in i18n_patterns

43 views
Skip to first unread message

Django

unread,
Dec 13, 2015, 1:50:00 PM12/13/15
to django-...@googlegroups.com
#25933: Allow un-prefixed default language in i18n_patterns
--------------------------------------+--------------------
Reporter: urbaniak | Owner: nobody
Type: Uncategorized | Status: new
Component: Internationalization | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
The idea is to allow having the default language urls un-prefixed.

So adding a translations to existing site is more seamless - it does not
require changing current urls, just adding new ones.

That pattern with un-prefixed default language is pretty common - for
example https://www.apple.com (which is en_US) and
https://www.apple.com/fr/ (fr_FR).

Any other language than the default one is prefixed as before using
i18n_patterns.

The idea for that is having a `prefix_default_language` param to`
i18n_patterns`, which is `True` by default, to keep it compatible with
current appriach. Setting it to `False` will turn on this "feature".

Here's the code: https://github.com/django/django/pull/5823

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

Django

unread,
Dec 14, 2015, 6:57:26 PM12/14/15
to django-...@googlegroups.com
#25933: Allow unprefixed default language in i18n_patterns
-------------------------------------+-------------------------------------
Reporter: urbaniak | Owner: nobody
Type: New feature | Status: new
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: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
* type: Uncategorized => New feature


Old description:

> The idea is to allow having the default language urls un-prefixed.
>
> So adding a translations to existing site is more seamless - it does not
> require changing current urls, just adding new ones.
>
> That pattern with un-prefixed default language is pretty common - for
> example https://www.apple.com (which is en_US) and
> https://www.apple.com/fr/ (fr_FR).
>
> Any other language than the default one is prefixed as before using
> i18n_patterns.
>
> The idea for that is having a `prefix_default_language` param to`
> i18n_patterns`, which is `True` by default, to keep it compatible with
> current appriach. Setting it to `False` will turn on this "feature".
>
> Here's the code: https://github.com/django/django/pull/5823

New description:

The idea is to allow having the default language urls un-prefixed.

So adding a translations to existing site is more seamless - it does not
require changing current urls, just adding new ones.

That pattern with un-prefixed default language is pretty common - for
example https://www.apple.com (which is en_US) and
https://www.apple.com/fr/ (fr_FR).

Any other language than the default one is prefixed as before using
i18n_patterns.

The idea for that is having a `prefix_default_language` param to`
i18n_patterns`, which is `True` by default, to keep it compatible with

current approach. Setting it to `False` will turn on this "feature".

--

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

Django

unread,
Dec 21, 2015, 7:39:00 AM12/21/15
to django-...@googlegroups.com
#25933: Allow unprefixed default language in i18n_patterns
-------------------------------------+-------------------------------------
Reporter: urbaniak | Owner: nobody

Type: New feature | Status: new
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: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

Claude, does this proposal look reasonable?

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

Django

unread,
Dec 22, 2015, 1:38:19 PM12/22/15
to django-...@googlegroups.com
#25933: Allow unprefixed default language in i18n_patterns
--------------------------------------+------------------------------------
Reporter: urbaniak | Owner: nobody
Type: New feature | Status: new
Component: Internationalization | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by claudep):

* needs_docs: 0 => 1
* has_patch: 0 => 1
* needs_tests: 0 => 1
* stage: Unreviewed => Accepted


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

Django

unread,
Mar 4, 2016, 12:57:41 PM3/4/16
to django-...@googlegroups.com
#25933: Allow unprefixed default language in i18n_patterns
--------------------------------------+------------------------------------
Reporter: urbaniak | Owner: nobody
Type: New feature | Status: new
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 charettes):

* needs_docs: 1 => 0
* needs_tests: 1 => 0


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

Django

unread,
Mar 7, 2016, 11:03:40 AM3/7/16
to django-...@googlegroups.com
#25933: Allow unprefixed default language in i18n_patterns
-------------------------------------+-------------------------------------
Reporter: urbaniak | Owner: nobody

Type: New feature | Status: new
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 charettes):

* stage: Accepted => Ready for checkin


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

Django

unread,
Mar 8, 2016, 8:15:25 AM3/8/16
to django-...@googlegroups.com
#25933: Allow unprefixed default language in i18n_patterns
-------------------------------------+-------------------------------------
Reporter: urbaniak | Owner: nobody
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 Tim Graham <timograham@…>):

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


Comment:

In [changeset:"839a955d08fa0657622ed9b60fdd262658fa659f" 839a955d]:
{{{
#!CommitTicketReference repository=""
revision="839a955d08fa0657622ed9b60fdd262658fa659f"
Fixed #25933 -- Allowed an unprefixed default language in i18n_patterns().
}}}

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

Django

unread,
Mar 10, 2016, 10:53:12 AM3/10/16
to django-...@googlegroups.com
#25933: Allow unprefixed default language in i18n_patterns
-------------------------------------+-------------------------------------
Reporter: urbaniak | Owner: nobody

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 Tim Graham <timograham@…>):

In [changeset:"85a4844f8a8e628b90fa30ba7074f162a2d188ef" 85a4844f]:
{{{
#!CommitTicketReference repository=""
revision="85a4844f8a8e628b90fa30ba7074f162a2d188ef"
Refs #25933 -- Fixed i18n_patterns() prefix_default_language=False with
HTTP_ACCEPT_LANGUAGE header.
}}}

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

Reply all
Reply to author
Forward
0 new messages