Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2022-06-20 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  Zainab
 |  Amir
 Type:  Bug  |   Status:  closed
Component:   |  Version:  4.0
  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 ):

 In [changeset:"f741dd5fab53e7db7c045ce392fbf99b9ee24d2a" f741dd5]:
 {{{
 #!CommitTicketReference repository=""
 revision="f741dd5fab53e7db7c045ce392fbf99b9ee24d2a"
 [4.1.x] Fixed #23689 -- Made parsing HTTP Accept-Language header case-
 insensitive.

 Thank you Daniel Samuels for test project.

 Backport of 901a1691982cab76349d33e51b72c40120ec927a from main
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701817fd8a43e-9050f5bd-945e-4897-a20b-f50b5fae7379-00%40eu-central-1.amazonses.com.


Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2022-06-20 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  Zainab
 |  Amir
 Type:  Bug  |   Status:  closed
Component:   |  Version:  4.0
  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 Mariusz Felisiak ):

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


Comment:

 In [changeset:"901a1691982cab76349d33e51b72c40120ec927a" 901a1691]:
 {{{
 #!CommitTicketReference repository=""
 revision="901a1691982cab76349d33e51b72c40120ec927a"
 Fixed #23689 -- Made parsing HTTP Accept-Language header case-insensitive.

 Thank you Daniel Samuels for test project.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701817fd82925-fc73531a-c34f-41dd-8509-ca159d6c3463-00%40eu-central-1.amazonses.com.


Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2022-06-19 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  Zainab
 |  Amir
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  4.0
  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 Mariusz Felisiak):

 * stage:  Accepted => Ready for checkin


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701817fa1b8dc-77ae24da-fc57-4a63-8dce-48b3c6bf9499-00%40eu-central-1.amazonses.com.


Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2022-06-16 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  Zainab
 |  Amir
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  4.0
  Internationalization   |
 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 Zainab Amir):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/15774 PR]

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701816d9ef458-13f51f35-7b95-4556-8ad0-943c19886663-00%40eu-central-1.amazonses.com.


Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2022-06-16 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  Zainab
 |  Amir
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  4.0
  Internationalization   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Daniel Samuels):

 * cc: Daniel Samuels (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701816b6d3bfb-aeb22546-4519-431c-aabf-6963f21ba37c-00%40eu-central-1.amazonses.com.


Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2022-06-15 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  Zainab
 |  Amir
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  4.0
  Internationalization   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Zainab Amir):

 Replying to [comment:11 Mariusz Felisiak]:

 > > Also noticed that running django server with these settings throw an
 error as mentioned below. This is also fixed.
 >
 > I don't see anything to fix here 樂

 This is the ripple effect of fixing the header parsing to be case
 insensitive.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701816ad5b0c4-c747f6f2-0a18-4ccf-b808-73bd1f01752b-00%40eu-central-1.amazonses.com.


Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2022-06-15 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  Zainab
 |  Amir
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  4.0
  Internationalization   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak):

 > I will create a PR on django if no one has any suggestions or comments.

 You don't need to wait for an approval. PR is the right place for
 suggestions and comments.

 > Also noticed that running django server with these settings throw an
 error as mentioned below. This is also fixed.

 I don't see anything to fix here 樂

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018168e02808-70c4447a-91d2-4411-9a53-2a955df43192-00%40eu-central-1.amazonses.com.


Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2022-06-15 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  Zainab
 |  Amir
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  4.0
  Internationalization   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Zainab Amir):

 * version:  1.7 => 4.0


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018168de484f-a996d675-3c99-4ce1-8e63-b25f9bdc0a90-00%40eu-central-1.amazonses.com.


Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2022-06-15 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  Zainab
 |  Amir
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  1.7
  Internationalization   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Zainab Amir):

 Created a fix for it on my branch:
 https://github.com/django/django/compare/main...zainab-amir:ticket_23689
 I will create a PR on django if no one has any suggestions or comments.

 1. The documentation already mentions that the header should be case
 sensitive, so I fixed that
 2. Also noticed that running django server with these settings throw an
 error as mentioned below. This is also fixed.

 {{{
 LANGUAGES = (
 ('EN-US', 'English (US)'),
 ('De', 'Deutsche'),
 ('ar', 'عربى'),
 )

 LANGUAGE_CODE = 'en-us'
 }}}

 ERROR:
 {{{
 ERRORS:
 ?: (translation.E004) You have provided a value for the LANGUAGE_CODE
 setting that is not in the LANGUAGES setting.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018168d6de54-3e4f3682-0e5c-4771-b9c1-db92b1ff295d-00%40eu-central-1.amazonses.com.


Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2022-06-15 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  Zainab
 |  Amir
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  1.7
  Internationalization   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Claude Paroz):

 * stage:  Unreviewed => Accepted


Comment:

 Thanks for the test project!

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070181660826b8-c3b977f6-0935-438a-b3e8-71cac7cc1e92-00%40eu-central-1.amazonses.com.


Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2022-06-14 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  zainab-
 |  amir
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  1.7
  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 Mariusz Felisiak):

 * cc: Claude Paroz (added)
 * easy:  1 => 0


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070181638134af-fdbabfb7-6139-4622-b8c1-413c7890b78a-00%40eu-central-1.amazonses.com.


Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2022-06-14 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  zainab-
 |  amir
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  1.7
  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 zainab-amir):

 * owner:  nobody => zainab-amir
 * status:  new => assigned


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018163779a36-1e793db6-6296-470c-b4e9-db9a8f554879-00%40eu-central-1.amazonses.com.


Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2022-06-14 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:   |  Version:  1.7
  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
-+-

Comment (by Daniel Samuels):

 I've created a simple reproduction using the above example code as a
 basis. You can find it here: https://github.com/danielsamuels/django_23689

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018162af4576-03012b97-7aad-4ed4-b087-f4a790db9bfd-00%40eu-central-1.amazonses.com.


Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2022-06-14 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:   |  Version:  1.7
  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 Daniel Samuels):

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


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070181628eed14-3a9d9885-9a7a-4cf2-8528-28c914a726d7-00%40eu-central-1.amazonses.com.


Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2022-06-14 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:   |  Version:  1.7
  Internationalization   |
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Daniel Samuels):

 I've just hit this same problem today, here's some example code:

 views.py:
 {{{#!python
 class ExampleView(TemplateView):
 template_name = 'example.html'

 def get_context_data(self, **kwargs: Any) -> Dict[str, Any]:
 context = super().get_context_data(**kwargs)

 context['language_code'] = translation.get_language()
 #^-- should be pt-BR, but is pt
 return context
 }}}

 test_views.py
 {{{#!python
 def test_example_view(db, client):
 language_code = 'pt-BR'
 resp = client.get(reverse('example'),
 HTTP_ACCEPT_LANGUAGE=language_code)
 assert resp.context_data['language_code'] == language_code
 # ^-- AssertionError: pt-BR != pt
 }}}

 The code path that's going wrong is:

 * `LocaleMiddleware.process_request` calls
 `translation.get_language_from_request`
 * `get_language_from_request` calls `parse_accept_lang_header` which turns
 `pt-BR` ito `pt-br`
 * `get_language_from_request` then calls `get_supported_language_variant`,
 passing `pt-br` as the `lang_code`
 * `get_supported_language_variant` then runs `if code in
 supported_lang_codes`, which is `False` (note that `'pt-BR' in
 supported_lang_codes == True`)
 * `get_supported_language_variant` then returns the fallback lang_code
 `pt`

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070181628eb09e-bc7445ca-dc2a-4ddd-b9c7-7ee6cc91f4cd-00%40eu-central-1.amazonses.com.


Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2014-10-20 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:   |  Version:  1.7
  Internationalization   |   Resolution:  needsinfo
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by carljm):

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


Comment:

 Closing as needsinfo.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.fe7f5dc62ff1cab966ad80345dd550b7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23689: Django detects HTTP Accept-Language header in case-sensitive manner

2014-10-20 Thread Django
#23689: Django detects HTTP Accept-Language header in case-sensitive manner
-+-
 Reporter:  wayneye  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:   |  Version:  1.7
  Internationalization   |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by claudep):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 Case sensibility should have been resolved by
 2bab9d6d9ea095c4bcaeede2df576708afd46291
 I have done some local tests and couldn't reproduce your issue. Having a
 failing test case would help.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.6e6a3e0182c76e17caef7e4553494d27%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.