Changeset 3263

Show
Ignore:
Timestamp:
07/19/07 12:51:14 (1 year ago)
Author:
ed
Message:

Fixed a problem introduced in the localization changes wherein I assumed that paths used a normal forward slash separator. This caused the framework to crash on Windows.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/dLocalize.py

    r3261 r3263  
    1010    # Probably need to add more 
    1111    langs = gettext.find("dabo", daboLocaleDir, languages=_trans.keys(), all=True) 
    12     langPat = re.compile(".+/locale/([a-z]{2})/LC_MESSAGES.+") 
    13     ret = [langPat.sub(r"\1", lang) for lang in langs] 
     12    sep = os.path.sep 
     13     
     14    ret = [] 
     15    for lang in langs: 
     16        pathparts = lang.split(sep) 
     17        pos = pathparts.index("locale") 
     18        ret.append(pathparts[pos+1]) 
    1419    return ret 
    1520