#28636: Allow customizing the translation fallback language
-------------------------------------+-------------------------------------
     Reporter:  Denis Anuschewski    |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:                       |                  Version:  master
  Internationalization               |
     Severity:  Normal               |               Resolution:
     Keywords:  translation,         |             Triage Stage:  Accepted
  internationalization, request      |
    Has patch:  1                    |      Needs documentation:  1
  Needs tests:  1                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Denis Anuschewski):

 Nevermind, I fixed it myself :-)

 The problem was my default of `LANGUAGE_FALLBACK` (I used `LANGUAGE_CODE`
 for that). In normal cases it works fine, but in unit tests it gives
 unintended results when you mock `LANGUAGE_CODE`. The language code then
 changes, but the fallback stays the same, giving you English values as
 result.

 I solved this by setting `LANGUAGE_FALLBACK` to `None` by default, because
 when it gets used in `get_fallback()` it will be overwritten with
 `LANGUAGE_CODE` anyway if not set properly.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28636#comment:26>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.79dea3d9a2fb5fda528909ecc8894146%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to