[gnome-power-manager] Mark a few trivial strings as translatable to fix #612950



commit 4b0c25509297d4f5de081d7b355ec6ba5f4d2eab
Author: Richard Hughes <richard hughsie com>
Date:   Mon Mar 15 17:06:58 2010 +0000

    Mark a few trivial strings as translatable to fix #612950

 src/gpm-statistics.c |   27 ++++++++++++++++++---------
 1 files changed, 18 insertions(+), 9 deletions(-)
---
diff --git a/src/gpm-statistics.c b/src/gpm-statistics.c
index 9079ac7..0494f40 100644
--- a/src/gpm-statistics.c
+++ b/src/gpm-statistics.c
@@ -279,18 +279,27 @@ gpm_stats_time_to_text (gint seconds)
 {
 	gfloat value = seconds;
 
-	if (value < 0)
-		return g_strdup ("unknown");
-	if (value < 60)
-		return g_strdup_printf ("%.0f seconds", value);
+	if (value < 0) {
+		/* TRANSLATORS: this is when the stats time is not known */
+		return g_strdup (_("Unknown"));
+	}
+	if (value < 60) {
+		/* TRANSLATORS: this is a time value, usually to show on a graph */
+		return g_strdup_printf (_("%.0f seconds"), value);
+	}
 	value /= 60.0;
-	if (value < 60)
-		return g_strdup_printf ("%.1f minutes", value);
+	if (value < 60) {
+		/* TRANSLATORS: this is a time value, usually to show on a graph */
+		return g_strdup_printf (_("%.1f minutes"), value);
+	}
 	value /= 60.0;
-	if (value < 60)
-		return g_strdup_printf ("%.1f hours", value);
+	if (value < 60) {
+		/* TRANSLATORS: this is a time value, usually to show on a graph */
+		return g_strdup_printf (_("%.1f hours"), value);
+	}
 	value /= 24.0;
-	return g_strdup_printf ("%.1f days", value);
+	/* TRANSLATORS: this is a time value, usually to show on a graph */
+	return g_strdup_printf (_("%.1f days"), value);
 }
 
 /**



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