#16516: Blocktrans should tolerate bad locale data
-------------------------------------+-------------------------------------
               Reporter:  simon29    |          Owner:  nobody
                   Type:             |         Status:  new
  Cleanup/optimization               |      Component:
              Milestone:             |  Internationalization
                Version:  1.3        |       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          |
-------------------------------------+-------------------------------------

Comment (by aaugustin):

 I think the proper solution is to output
 `settings.TEMPLATE_STRING_IF_INVALID` when the translation string is
 invalid.

 I'm against hardcoding a fallback to `'en'`:
 - if someone builds a website in Greek and the English translation is
 wrong, this doesn't fix the error;
 - if someone builds a website in Turkish and the German translation is
 wrong, I don't know what happens, but if it works it's a hack :)

 Currently, the `'en'` locale is special-cased in only one place:
 `django.views.i18n.javascript_catalog`. This has bugged me for a long
 time, the implementation is incredibly convoluted, and I still can't
 figure out why it's necessary. Apparently, you were involved in #14924, so
 you probably know this piece of code better than I do :)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16516#comment:3>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to