[recipes] Return translated segment names
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Return translated segment names
- Date: Sat, 31 Dec 2016 02:07:27 +0000 (UTC)
commit adc43df9988d9c2146f4ea44efc4c575c468ff33
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Dec 30 17:46:34 2016 -0500
Return translated segment names
This should be shown in the UI.
src/gr-ingredients-list.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gr-ingredients-list.c b/src/gr-ingredients-list.c
index b9966a1..2c3566b 100644
--- a/src/gr-ingredients-list.c
+++ b/src/gr-ingredients-list.c
@@ -130,9 +130,9 @@ gr_ingredients_list_populate (GrIngredientsList *ingredients,
segment = NULL;
if (segment)
- g_hash_table_add (ingredients->segments, g_strdup (segment));
+ g_hash_table_add (ingredients->segments, g_strdup (_(segment)));
if (!gr_ingredients_list_add_one (ingredients, lines[i],
- (char *)(segment ? segment : ""), error)) {
+ (char *)(segment ? _(segment) : ""), error)) {
g_message ("Failed to parse ingredients line '%s'", lines[i]);
}
}
@@ -174,7 +174,7 @@ gr_ingredients_list_populate_new_format (GrIngredientsList *ingredients,
amount = fields[0];
unit = fields[1];
ingredient = fields[2];
- segment = fields[3];
+ segment = (char *)(fields[3][0] ? _(fields[3]) : "");
ing = g_new0 (Ingredient, 1);
gr_number_set_fraction (&ing->amount, 0, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]