[recipes] units: Fix mismatch between unit names and data



commit ad196105c67c7dfb6cd6189b3135581f8b4f93fe
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Dec 24 10:42:54 2016 -0500

    units: Fix mismatch between unit names and data
    
    This was not showing up in my tests, sadly.

 src/gr-unit.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/src/gr-unit.c b/src/gr-unit.c
index be4d0b0..cb36940 100644
--- a/src/gr-unit.c
+++ b/src/gr-unit.c
@@ -24,16 +24,8 @@
 #include "gr-unit.h"
 
 static const char * const names[] = {
-        "gram",
-        "kilogram",
-        "liter",
-        "deciliter",
-        "milliliter",
-        "pound",
-        "box",
-        "tablespoon",
-        "teaspoon",
-        "cup",
+        "g", "kg", "lb", "oz", "l", "dl", "ml", "fl oz", "pt", "qt", "gal", "cup",
+        "tbsp", "tsp", "box", "pkg",
         NULL
 };
 
@@ -60,7 +52,7 @@ static GrUnit units[] = {
         { "tbsp", NC_("unit", "tbsp"), NC_("unit", "tablespoon"), NC_("unit", "tablespoons") },
         { "tsp", NC_("unit", "tsp"), NC_("unit", "teaspoon"), NC_("unit", "teaspoons") },
         { "box", NC_("unit", "box"), NC_("unit", "box"), NC_("unit", "boxes") },
-        { "package", NC_("unit", "pkg"), NC_("unit", "package"), NC_("unit", "packages") },
+        { "pkg", NC_("unit", "pkg"), NC_("unit", "package"), NC_("unit", "packages") },
 };
 
 const char **


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]