Changeset 2187 for WAeUP_SRP


Ignore:
Timestamp:
7 Sep 2007, 15:15:36 (17 years ago)
Author:
joachim
Message:

accept Foreigner as key, add empty key to cos-vocabulary

Location:
WAeUP_SRP/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Widgets.py

    r2185 r2187  
    492492        for k,v in voc.items():
    493493            parts = v.split(' / ')
    494             if len(parts) != 2:
     494            if len(parts) == 1:
     495                state = parts[0].lower()
     496                lga = ""
     497            elif len(parts) == 2:
     498                state = parts[0].lower()
     499                lga = "_".join(re.split('\W+',parts[1].lower()))
     500            else:
    495501                continue
    496             state = parts[0].lower()
    497             lga = "_".join(re.split('\W+',parts[1].lower()))
    498502            if state not in states:
    499503                states.append(state)
    500             lgas.append(lga)
     504            if lga not in lgas:
     505                lgas.append(lga)
    501506            d[k] = v
    502507
  • WAeUP_SRP/trunk/profiles/default/vocabularies/cos.xml

    r2117 r2187  
    77    <property name="acl_write_roles">Manager</property>
    88
     9    <item key="" msgid="">N/A</item>
    910    <item key="None" msgid=""></item>
    1011    <item key="BSCANA" msgid="">B.SC (ANATOMY)</item>
Note: See TracChangeset for help on using the changeset viewer.