#34515: Translatable URL patterns raise 404 for non-English default language 
when
prefix_default_language=False is used.
-------------------------------------+-------------------------------------
     Reporter:  ab                   |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:                       |                  Version:  4.2
  Internationalization               |
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
  internationalization, i18n,        |
  prefix_default_language            |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by ab):

 Replying to [comment:4 Mariusz Felisiak]:
 >
 > IMO it still works that way. However, in Django 4.2
 `get_language_from_request()` returns the language from a request (`en`
 for me) which is activated and the default path `about/` is no longer
 translated to the `a-propos/`. This is definitely a change from the
 previous behavior.

 Thank you Mariusz for the quick reaction.

 I agree it still globally works that way, nevertheless, in the case I
 describe, when django looks for the language prefix in the requested URL
 and there is not language prefix, I would expect django to return "fr",
 not to go to the next steps of the algorithm. Because I want
 `prefix_default_language = False` to take precedence on cookies or
 headers. Does it make sense?

 I need to add that I use `translate_url` to
 [https://github.com/aboutofpluto/django-prefix-default-language-bug-
 report/blob/master/prefix/urls.py#L11 build the links] in my templates.
 Consequently, my URLs are translated in the template **only** (hence the
 404).

 So you're right about the default path not being translated anymore.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34515#comment:5>
Django <https://code.djangoproject.com/>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070187b7db1b42-cfe738f1-d2f6-4eb6-be41-d4d38b16c9cc-000000%40eu-central-1.amazonses.com.

Reply via email to