Commits

Pedro Romano committed 45cd453

Ignore alternatives when importing first days of the week from CLDR.

Comments (0)

Files changed (1)

scripts/import_cldr.py

                 week_data['min_days'] = int(elem.attrib['count'])
 
         for elem in supelem.findall('firstDay'):
-            territories = elem.attrib['territories'].split()
-            if territory in territories or any([r in territories for r in regions]):
-                week_data['first_day'] = weekdays[elem.attrib['day']]
+            if 'alt' not in elem.attrib:  # ignore alternatives
+                territories = elem.attrib['territories'].split()
+                if territory in territories or any([r in territories for r in regions]):
+                    week_data['first_day'] = weekdays[elem.attrib['day']]
 
         for elem in supelem.findall('weekendStart'):
             territories = elem.attrib['territories'].split()