Django

Code

Changeset 762

Show
Ignore:
Timestamp:
10/01/05 11:45:16 (3 years ago)
Author:
hugo
Message:

i18n: fixed a rather stupid bug in language discovery (sort descending by preference value instead ascending)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/i18n/django/utils/translation.py

    r759 r762  
    201201 
    202202        langs = [_parsed(el) for el in accept.split(',')] 
    203         langs.sort(lambda a,b: cmp(a[1], b[1])) 
     203        langs.sort(lambda a,b: -1*cmp(a[1], b[1])) 
    204204 
    205205        globalpath = os.path.join(os.path.dirname(settings.__file__), 'locale')