[Django] #34867: [Date Input Localization] Accept-Language Header Takes Precedence Over Language Set With Cookie

8 views
Skip to first unread message

Django

unread,
Sep 22, 2023, 10:50:20 AM9/22/23
to django-...@googlegroups.com
#34867: [Date Input Localization] Accept-Language Header Takes Precedence Over
Language Set With Cookie
-------------------------------------+-------------------------------------
Reporter: blue- | Owner: nobody
hexagon |
Type: Bug | Status: new
Component: | Version: 4.2
Internationalization | Keywords: l10n i18n
Severity: Normal | localization date input form
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
= L10n Bug =

''Accept-Language Header takes precedence over language set with cookie
when rendering date input form fields''

This is a minimal example of a previously submitted bug - the original
issue can be found here: https://code.djangoproject.com/ticket/34853

In the first example, the language and locale is set to '''en-US''' but
the form fields are localized to '''da_DK'''. The docs make no mention
that this should be the expected behaviour. I also show that output
localizations, such as times and dates strings are localized properly as
they should (see green text in images).

Expected formats:
* da_DK uses a dateformat of dd-MM-yyyy
* en_US uses a dateformat of mm/dd/yyyy

**Please refer to the Github repository which contains a minimal example
with images, as well as the readme, which contains a full analysis with
relevant highlights of settings, modelforms and models.**

https://github.com/blue-hexagon/dj-L10n_dateinput_bug

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

Django

unread,
Sep 22, 2023, 1:08:57 PM9/22/23
to django-...@googlegroups.com
#34867: [Date Input Localization] Accept-Language Header Takes Precedence Over
Language Set With Cookie
-------------------------------------+-------------------------------------
Reporter: blue-hexagon | Owner: nobody

Type: Bug | Status: new
Component: | Version: 4.2
Internationalization |
Severity: Normal | Resolution:
Keywords: l10n i18n | Triage Stage:
localization date input form | Unreviewed
Has patch: 0 | Needs documentation: 0

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

Old description:

> = L10n Bug =
>
> ''Accept-Language Header takes precedence over language set with cookie
> when rendering date input form fields''
>
> This is a minimal example of a previously submitted bug - the original
> issue can be found here: https://code.djangoproject.com/ticket/34853
>
> In the first example, the language and locale is set to '''en-US''' but
> the form fields are localized to '''da_DK'''. The docs make no mention
> that this should be the expected behaviour. I also show that output
> localizations, such as times and dates strings are localized properly as
> they should (see green text in images).
>
> Expected formats:
> * da_DK uses a dateformat of dd-MM-yyyy
> * en_US uses a dateformat of mm/dd/yyyy
>
> **Please refer to the Github repository which contains a minimal example
> with images, as well as the readme, which contains a full analysis with
> relevant highlights of settings, modelforms and models.**
>
> https://github.com/blue-hexagon/dj-L10n_dateinput_bug

New description:

= L10n Bug =

''Accept-Language Header takes precedence over language set with cookie
when rendering date input form fields''

This is a minimal example of a previously submitted bug - the original
issue can be found here: https://code.djangoproject.com/ticket/34853

In the first example, the language and locale is set to '''en-US''' but
the form fields are localized to '''da_DK'''. The docs make no mention
that this should be the expected behaviour. I also show that output
localizations, such as times and dates strings are localized properly as
they should (see green text in images).

Expected formats:
* da_DK uses a dateformat of dd-MM-yyyy
* en_US uses a dateformat of mm/dd/yyyy

**Please refer to the Github repository which contains a minimal example

as well as the readme, which contains a full analysis with screenshot
documentation and relevant highlights of settings, modelforms and
models.**

https://github.com/blue-hexagon/dj-L10n_dateinput_bug

--

Comment (by blue-hexagon):

Rearrange a paragraph.

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

Django

unread,
Sep 22, 2023, 1:35:42 PM9/22/23
to django-...@googlegroups.com
#34867: [Date Input Localization] Accept-Language Header Takes Precedence Over
Language Set With Cookie
-------------------------------------+-------------------------------------
Reporter: blue-hexagon | Owner: nobody
Type: Bug | Status: closed
Component: | Version: 4.2
Internationalization |
Severity: Normal | Resolution: duplicate

Keywords: l10n i18n | Triage Stage:
localization date input form | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

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


Comment:

Please don't open duplicates, instead add more details to the original
ticket.

Duplicate of #34853.

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

Reply all
Reply to author
Forward
0 new messages