]> granicus.if.org Git - icu/commitdiff
Update simple unit identifiers
authorShane F. Carr <shane@unicode.org>
Wed, 18 Mar 2020 00:44:48 +0000 (19:44 -0500)
committerShane F. Carr <shane@unicode.org>
Wed, 18 Mar 2020 00:44:48 +0000 (19:44 -0500)
icu4c/source/i18n/measunit_extra.cpp
icu4c/source/i18n/measunit_impl.h

index f68e0a460306a524e3d1d57c38f88acbc942d64f..0e0c265e26892ccf6106408482e2d5d2e4613d4f 100644 (file)
@@ -92,105 +92,108 @@ const struct SIPrefixStrings {
 // TODO(ICU-20920): Get this list from data
 const char16_t* const gSimpleUnits[] = {
     u"one", // note: expected to be index 0
-    u"100kilometer",
-    u"acre",
-    u"ampere",
-    u"arc-minute",
-    u"arc-second",
-    u"astronomical-unit",
-    u"atmosphere",
-    u"bar",
-    u"barrel",
-    u"bit",
-    u"british-thermal-unit",
-    u"bushel",
-    u"byte",
-    u"calorie",
+    u"candela",
     u"carat",
-    u"celsius",
-    u"century",
-    u"cup",
-    u"cup-metric",
-    u"dalton",
-    u"day",
-    u"day-person",
-    u"decade",
-    u"degree",
-    u"dot", // (as in "dot-per-inch")
-    u"dunam",
-    u"earth-mass",
-    u"electronvolt",
-    u"em",
-    u"fahrenheit",
-    u"fathom",
-    u"fluid-ounce",
-    u"fluid-ounce-imperial",
-    u"foodcalorie",
-    u"foot",
-    u"furlong",
-    u"g-force",
-    u"gallon",
-    u"gallon-imperial",
-    u"generic", // (i.e., "temperature-generic")
     u"gram",
-    u"hectare", // (note: other "are" derivatives are uncommon)
-    u"hertz",
-    u"horsepower",
-    u"hour",
+    u"ounce",
+    u"ounce-troy",
+    u"pound",
+    u"kilogram",
+    u"stone",
+    u"ton",
+    u"metric-ton",
+    u"earth-mass",
+    u"solar-mass",
+    u"point",
     u"inch",
-    u"inch-hg",
-    u"joule",
-    u"karat",
-    u"kelvin",
-    u"knot",
-    u"light-year",
-    u"liter",
-    u"lux",
+    u"foot",
+    u"yard",
     u"meter",
-    u"meter-of-mercury", // (not "millimeter-of-mercury")
-    u"metric-ton",
+    u"fathom",
+    u"furlong",
     u"mile",
+    u"nautical-mile",
     u"mile-scandinavian",
+    u"100-kilometer",
+    u"earth-radius",
+    u"solar-radius",
+    u"astronomical-unit",
+    u"light-year",
+    u"parsec",
+    u"second",
     u"minute",
-    u"mole",
+    u"hour",
+    u"day",
+    u"day-person",
+    u"week",
+    u"week-person",
     u"month",
     u"month-person",
-    u"nautical-mile",
-    u"newton",
-    u"ohm",
-    u"ounce",
-    u"ounce-troy",
-    u"parsec",
-    u"pascal",
-    u"percent",
-    u"permille",
+    u"year",
+    u"year-person",
+    u"decade",
+    u"century",
+    u"ampere",
+    u"fahrenheit",
+    u"kelvin",
+    u"celsius",
+    u"arc-second",
+    u"arc-minute",
+    u"degree",
+    u"radian",
+    u"revolution",
+    u"item",
+    u"mole",
     u"permillion",
     u"permyriad",
-    u"pint",
-    u"pint-metric",
+    u"permille",
+    u"percent",
+    u"karat",
+    u"portion",
+    u"bit",
+    u"byte",
+    u"dot",
     u"pixel",
-    u"point",
-    u"pound",
+    u"em",
+    u"hertz",
+    u"newton",
     u"pound-force",
-    u"quart",
-    u"radian",
-    u"revolution",
-    u"second",
-    u"solar-luminosity",
-    u"solar-mass",
-    u"solar-radius",
-    u"stone",
-    u"tablespoon",
-    u"teaspoon",
+    u"pascal",
+    u"bar",
+    u"atmosphere",
+    u"ofhg",
+    u"electronvolt",
+    u"dalton",
+    u"joule",
+    u"calorie",
+    u"british-thermal-unit",
+    u"foodcalorie",
     u"therm-us",
-    u"ton",
-    u"volt",
     u"watt",
-    u"week",
-    u"week-person",
-    u"yard",
-    u"year",
-    u"year-person",
+    u"horsepower",
+    u"solar-luminosity",
+    u"volt",
+    u"ohm",
+    u"dunam",
+    u"acre",
+    u"hectare",
+    u"teaspoon",
+    u"tablespoon",
+    u"fluid-ounce-imperial",
+    u"fluid-ounce",
+    u"cup",
+    u"cup-metric",
+    u"pint",
+    u"pint-metric",
+    u"quart",
+    u"liter",
+    u"gallon",
+    u"gallon-imperial",
+    u"bushel",
+    u"barrel",
+    u"knot",
+    u"g-force",
+    u"lux",
 };
 
 icu::UInitOnce gUnitExtrasInitOnce = U_INITONCE_INITIALIZER;
index dd5d70902eeb9a9e08da59604a0dde8add5ef5f7..57784c53d7baae1febf3a265887ad094dd2e3826 100644 (file)
@@ -15,6 +15,9 @@
 U_NAMESPACE_BEGIN
 
 
+/**
+ * A struct representing a single unit (optional SI prefix and dimensionality).
+ */
 struct SingleUnitImpl : public UMemory {
     /**
      * Gets a single unit from the MeasureUnit. If there are multiple single units, sets an error