Fixing a regex mistake
[gonvert] / src / unit_data.py
index 01565ce..a5ce831 100644 (file)
@@ -422,7 +422,7 @@ UNIT_DESCRIPTIONS = {
                [(converters.m, 1.0e-6), u"\xb5A", ''],
                _(u"nanoampere"):
                [(converters.m, 1.0e-9), "nA", ''],
-               _(u"math.picoampere"):
+               _(u"picoampere"):
                [(converters.m, 1.0e-12), "pA", ''],
                _(u"abampere"):
                [(converters.m, 10.0), "abA", _(u"The CGS electromagnetic unit of current.")],
@@ -2190,6 +2190,15 @@ _(u"Electrical Voltage"): {".base_unit": _(u"volt"),
 UNIT_CATEGORIES = sorted(UNIT_DESCRIPTIONS.iterkeys())
 
 
+def get_units(category):
+       units = sorted(UNIT_DESCRIPTIONS[category].iterkeys())
+
+       # do not display .base_unit description key
+       del units[0]
+
+       return units
+
+
 future_dic = {
        _(u"Wire Gauge"): {
                ".base_unit": "circular mils",