Kaydet (Commit) 75f8101c authored tarafından Barry Warsaw's avatar Barry Warsaw

find(): Application of (slightly modified) SF patch #101928 by Ulf

Betlehem, verified by Peter Funk.  Fixes preservation of language
search order lost due to use of dictionary keys instead of a list.
Closes SF bug #116964.
üst 21000cae
......@@ -208,13 +208,13 @@ def find(domain, localedir=None, languages=None):
if 'C' not in languages:
languages.append('C')
# now normalize and expand the languages
langdict = {}
nelangs = []
for lang in languages:
for nelang in _expand_lang(lang):
langdict[nelang] = nelang
languages = langdict.keys()
if nelang not in nelangs:
nelangs.append(nelang)
# select a language
for lang in languages:
for lang in nelangs:
if lang == 'C':
break
mofile = os.path.join(localedir, lang, 'LC_MESSAGES', '%s.mo' % domain)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment