Ignore:
Timestamp:
23 Mar 2012, 02:58:40 (13 years ago)
Author:
uli
Message:

Minor fixing for correct spelling of country names.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/country_helpers.py

    r7963 r7966  
    4444    Some special cases are handled as well ('of', 'the', etc.)
    4545    """
     46    name = name.replace('(', '( ') # handle letters following brackets
    4647    name = ' '.join([x.capitalize() for x in name.split(' ')])
     48    name = name.replace('( ', '(')
    4749    for term in ['Of', ' And', 'The']:
    4850        name = name.replace(term, term.lower())
    4951    name = name.replace('U.s.', 'U.S.')
     52    name = name.replace("D'i", "d'I") # Cote d'Ivoire
    5053    return name
    5154
Note: See TracChangeset for help on using the changeset viewer.