Changeset 1275


Ignore:
Timestamp:
01/15/07 16:20:09 (13 years ago)
Author:
jukka
Message:

Fixed #1095, spent 30min. Dictionary of languages is now in lemill_tool, lemill_tool.language_dict .

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ConfigurationMethods.py

    r1213 r1275  
    452452    safeEditProperty(lt, 'primary_languages', value=language_list, data_type="tokens") 
    453453    safeEditProperty(lt, 'allow_banning', value=False, data_type="boolean") 
     454    lt.language_dict=dict(portal.availableLanguages()) 
    454455     
    455456def setupRoles(self, portal): 
  • trunk/skins/lemill/script_getPrettyLanguage.py

    r601 r1275  
    1212 
    1313if len(str(code))<3: 
    14      
    15     languages = context.availableLanguages() 
    16     lang_code = '' 
    1714    try: 
    18         lang_code = code() 
    19     except TypeError: 
    20         lang_code = code 
    21     if dict(languages).has_key(lang_code): 
    22         return dict(languages)[lang_code] 
    23     else: 
     15        return context.lemill_tool.language_dict[code] 
     16    except KeyError: 
    2417        return lang_code 
    2518else: 
Note: See TracChangeset for help on using the changeset viewer.