Changeset 7870 for main/waeup.kofa/trunk/src/waeup/kofa/widgets
- Timestamp:
- 13 Mar 2012, 08:52:21 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/widgets/phonewidget.py
r7856 r7870 33 33 34 34 INT_PHONE_PREFIXES = { 35 _('Germany'): '49',36 _('Nigeria'): '234',37 _('U.S.'): '1',35 _('Germany'): (2, '49'), 36 _('Nigeria'): (1, '234'), 37 _('U.S.'): (3, '1'), 38 38 } 39 39 … … 41 41 grok.implements(IInternationalPhonePrefixes) 42 42 43 _data = INT_PHONE_PREFIXES.items()43 _data = sorted(INT_PHONE_PREFIXES.items(), key=lambda value: value[1][0]) 44 44 45 45 def title_value_list(self): 46 return sorted([('%s (+%s)' % (x,y), '+%s' % y) 47 for x,y in self._data]) 46 return [('%s (+%s)' % (x,y[1]), '+%s' % y[1]) for x,y in self._data] 48 47 49 48 RE_INT_PREFIX = re.compile('^\+\d+')
Note: See TracChangeset for help on using the changeset viewer.