#4389: BIDI language detection not smart enough
-------------------------------------------+--------------------------------
Reporter: Ahmad Alhashemi | Owner: jezdez
Status: closed | Milestone: 1.0
Component: Internationalization | Version: SVN
Resolution: fixed | Keywords: bidi rtl
sprintdec01
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------------------+--------------------------------
Changes (by arien):
* status: assigned => closed
* resolution: => fixed
Comment:
`gettext._expand_lang` expands a locale to a list of locales. That's not
doing what is needed here. Besides, you're checking to see if any of
those ''locales'' is listed in `settings.LANGUAGES_BIDI`, which contains
''languages''. The reason this works is more or less accident.
All that's needed is to check if `xx` is in `settings.LANGUAGES_BIDI` for
some language `xx-yy`. So that's what the patch does.
(You could extract the `base_lang` function from `translation` and
`get_language_bidi` to be more DRY, but I'll leave that to a committer.)
--
Ticket URL: <http://code.djangoproject.com/ticket/4389#comment:8>
Django Code <http://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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---