[recipes] Don't forget to translate ingredients w/segments
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Don't forget to translate ingredients w/segments
- Date: Sat, 31 Dec 2016 02:07:07 +0000 (UTC)
commit eaab23510849d6ae58187fd73aa81f53c56cf032
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Dec 30 17:21:13 2016 -0500
Don't forget to translate ingredients w/segments
This was overlooked when segmented ingredients lists were
first introduced.
src/gr-ingredients-list.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/gr-ingredients-list.c b/src/gr-ingredients-list.c
index fbc2829..b9966a1 100644
--- a/src/gr-ingredients-list.c
+++ b/src/gr-ingredients-list.c
@@ -161,6 +161,7 @@ gr_ingredients_list_populate_new_format (GrIngredientsList *ingredients,
char *ingredient;
char *segment;
const char *u;
+ const char *s;
Ingredient *ing;
g_autoptr(GError) local_error = NULL;
@@ -193,9 +194,14 @@ gr_ingredients_list_populate_new_format (GrIngredientsList *ingredients,
}
ing->unit = g_strdup (u);
- ing->name = g_strdup (ingredient);
ing->segment = g_strdup (segment);
+ s = gr_ingredient_find (ingredient);
+ if (s)
+ ing->name = g_strdup (s);
+ else
+ ing->name = g_strdup (ingredient);
+
g_hash_table_add (ingredients->segments, g_strdup (segment));
ingredients->ingredients = g_list_append (ingredients->ingredients, ing);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]