[evolution] Bug #333039 - Merge some i18n strings



commit 31d42a59fe34484d996f50349f7ce7a0ad9afe53
Author: Milan Crha <mcrha redhat com>
Date:   Fri Apr 2 13:06:14 2010 +0200

    Bug #333039 - Merge some i18n strings

 calendar/gui/e-cal-list-view.c |    1 +
 calendar/gui/e-task-table.c    |   26 +++++++++++++++-----------
 2 files changed, 16 insertions(+), 11 deletions(-)
---
diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c
index 0a3c3de..31ef86d 100644
--- a/calendar/gui/e-cal-list-view.c
+++ b/calendar/gui/e-cal-list-view.c
@@ -235,6 +235,7 @@ setup_e_table (ECalListView *cal_list_view)
 	strings = g_list_append (strings, (gchar *) _("Confidential"));
 	e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell),
 					  strings);
+	g_list_free (strings);
 
 	e_table_extras_add_cell (extras, "classification", popup_cell);
 
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index 6015962..e54a72d 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -412,6 +412,7 @@ task_table_constructed (GObject *object)
 	GList *strings;
 	AtkObject *a11y;
 	gchar *etspecfile;
+	gint percent;
 
 	task_table = E_TASK_TABLE (object);
 	model = e_task_table_get_model (task_table);
@@ -488,6 +489,7 @@ task_table_constructed (GObject *object)
 	strings = g_list_append (strings, (gchar *) _("Confidential"));
 	e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell),
 					  strings);
+	g_list_free (strings);
 
 	e_table_extras_add_cell (extras, "classification", popup_cell);
 
@@ -511,6 +513,7 @@ task_table_constructed (GObject *object)
 	strings = g_list_append (strings, (gchar *) _("Undefined"));
 	e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell),
 					  strings);
+	g_list_free (strings);
 
 	e_table_extras_add_cell (extras, "priority", popup_cell);
 
@@ -527,20 +530,19 @@ task_table_constructed (GObject *object)
 	g_object_unref (cell);
 
 	strings = NULL;
-	strings = g_list_append (strings, (gchar *) _("0%"));
-	strings = g_list_append (strings, (gchar *) _("10%"));
-	strings = g_list_append (strings, (gchar *) _("20%"));
-	strings = g_list_append (strings, (gchar *) _("30%"));
-	strings = g_list_append (strings, (gchar *) _("40%"));
-	strings = g_list_append (strings, (gchar *) _("50%"));
-	strings = g_list_append (strings, (gchar *) _("60%"));
-	strings = g_list_append (strings, (gchar *) _("70%"));
-	strings = g_list_append (strings, (gchar *) _("80%"));
-	strings = g_list_append (strings, (gchar *) _("90%"));
-	strings = g_list_append (strings, (gchar *) _("100%"));
+	for (percent = 0; percent <= 100; percent += 10) {
+		/* Translators: "%d%%" is the percentage of a task done.
+		   %d is the actual value, %% is replaced with a percent sign.
+		   Result values will be 0%, 10%, 20%, ... 100%
+		*/
+		strings = g_list_append (strings, g_strdup_printf (_("%d%%"), percent));
+	}
 	e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell),
 					  strings);
 
+	g_list_foreach (strings, (GFunc) g_free, NULL);
+	g_list_free (strings);
+
 	e_table_extras_add_cell (extras, "percent", popup_cell);
 
 	/* Transparency field. */
@@ -561,6 +563,7 @@ task_table_constructed (GObject *object)
 	strings = g_list_append (strings, (gchar *) _("Busy"));
 	e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell),
 					  strings);
+	g_list_free (strings);
 
 	e_table_extras_add_cell (extras, "transparency", popup_cell);
 
@@ -584,6 +587,7 @@ task_table_constructed (GObject *object)
 	strings = g_list_append (strings, (gchar *) _("Canceled"));
 	e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell),
 					  strings);
+	g_list_free (strings);
 
 	e_table_extras_add_cell (extras, "calstatus", popup_cell);
 



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