[gnome-power-manager] trivial: give more context in a few translator comments



commit ebd837c79ee4354b81ce704489b8bc4fc53c4077
Author: Lucian Adrian Grijincu <lucian grijincu gmail com>
Date:   Thu Aug 5 19:00:18 2010 +0300

    trivial: give more context in a few translator comments

 src/gpm-statistics.c |   35 ++++++++++++++++++++++++-----------
 src/gpm-upower.c     |   28 +++++++++++++++++++---------
 2 files changed, 43 insertions(+), 20 deletions(-)
---
diff --git a/src/gpm-statistics.c b/src/gpm-statistics.c
index 254c99b..e0fda29 100644
--- a/src/gpm-statistics.c
+++ b/src/gpm-statistics.c
@@ -910,40 +910,53 @@ gpm_stats_format_details (UpWakeupItem *item)
 	/* try to make the wakeup type nicer */
 	} else if (g_str_has_prefix (data, "__mod_timer")) {
 		/* TRANSLATORS: a timer is something that fires periodically.
-		 * The parameter is a process name, e.g. "firefox-bin" */
+		 * The parameter is a process name, e.g. "firefox-bin".
+		 * This is shown when the timer wakes up. */
 		details = g_strdup_printf (_("Timer %s"), data+12);
 	} else if (g_str_has_prefix (data, "mod_timer")) {
-		/* TRANSLATORS: a timer is something that fires periodically */
+		/* TRANSLATORS: a timer is something that fires periodically.
+		 * The parameter is a process name, e.g. "firefox-bin".
+		 * This is shown when the timer wakes up. */
 		details = g_strdup_printf (_("Timer %s"), data+10);
 	} else if (g_str_has_prefix (data, "hrtimer_start_expires")) {
-		/* TRANSLATORS: a timer is something that fires periodically */
+		/* TRANSLATORS: a timer is something that fires periodically.
+		 * The parameter is a process name, e.g. "firefox-bin".
+		 * This is shown when the timer wakes up. */
 		details = g_strdup_printf (_("Timer %s"), data+22);
 	} else if (g_str_has_prefix (data, "hrtimer_start")) {
-		/* TRANSLATORS: a timer is something that fires periodically */
+		/* TRANSLATORS: a timer is something that fires periodically.
+		 * The parameter is a process name, e.g. "firefox-bin".
+		 * This is shown when the timer wakes up. */
 		details = g_strdup_printf (_("Timer %s"), data+14);
 	} else if (g_str_has_prefix (data, "do_setitimer")) {
-		/* TRANSLATORS: a timer is something that fires periodically */
+		/* TRANSLATORS: a timer is something that fires periodically.
+		 * The parameter is a process name, e.g. "firefox-bin".
+		 * This is shown when the timer wakes up. */
 		details = g_strdup_printf (_("Timer %s"), data+10);
 	} else if (g_str_has_prefix (data, "do_nanosleep")) {
-		/* TRANSLATORS: this is a task that's woken up from sleeping */
+		/* TRANSLATORS: the parameter is the name of task that's woken up from sleeping.
+		 * This is shown when the task wakes up. */
 		details = g_strdup_printf (_("Sleep %s"), data+13);
 	} else if (g_str_has_prefix (data, "enqueue_task_rt")) {
-		/* TRANSLATORS: this is the name of a new realtime task */
+		/* TRANSLATORS: this is the name of a new realtime task. */
 		details = g_strdup_printf (_("New task %s"), data+16);
 	} else if (g_str_has_prefix (data, "futex_wait")) {
-		/* TRANSLATORS: this is the name of a task thats woken to check state */
+		/* TRANSLATORS: this is the name of a task that's woken to check state.
+		 * This is shown when the task wakes up. */
 		details = g_strdup_printf (_("Wait %s"), data+11);
 	} else if (g_str_has_prefix (data, "queue_delayed_work_on")) {
-		/* TRANSLATORS: this is the name of a work queue is a list of work that has to be done */
+		/* TRANSLATORS: this is the name of a work queue.
+		 * A work queue is a list of work that has to be done. */
 		details = g_strdup_printf (_("Work queue %s"), data+22);
 	} else if (g_str_has_prefix (data, "queue_delayed_work")) {
-		/* TRANSLATORS: this is the name of a work queue is a list of work that has to be done */
+		/* TRANSLATORS: this is the name of a work queue.
+		 * A work queue is a list of work that has to be done. */
 		details = g_strdup_printf (_("Work queue %s"), data+19);
 	} else if (g_str_has_prefix (data, "dst_run_gc")) {
 		/* TRANSLATORS: this is when the networking subsystem clears out old entries */
 		details = g_strdup_printf (_("Network route flush %s"), data+11);
 	} else if (g_str_has_prefix (data, "usb_hcd_poll_rh_status")) {
-		/* TRANSLATORS: this is the name of activity on the USB bus */
+		/* TRANSLATORS: this is the name of an activity on the USB bus */
 		details = g_strdup_printf (_("USB activity %s"), data+23);
 	} else if (g_str_has_prefix (data, "schedule_hrtimeout_range")) {
 		/* TRANSLATORS: we've timed out of an aligned timer, with the name */
diff --git a/src/gpm-upower.c b/src/gpm-upower.c
index 870cdda..2485cd1 100644
--- a/src/gpm-upower.c
+++ b/src/gpm-upower.c
@@ -227,7 +227,8 @@ gpm_upower_get_device_summary (UpDevice *device)
 
 	/* not installed */
 	if (!is_present) {
-		/* TRANSLATORS: device not present */
+		/* TRANSLATORS: device not present.
+		 * The parameter is a device kind, e.g. "Laptop battery" or "Wireless mouse" */
 		g_string_append_printf (description, _("%s not present"), kind_desc);
 		goto out;
 	}
@@ -244,7 +245,8 @@ gpm_upower_get_device_summary (UpDevice *device)
 	/* we care if we are on AC */
 	if (kind == UP_DEVICE_KIND_PHONE) {
 		if (state == UP_DEVICE_STATE_CHARGING || !state == UP_DEVICE_STATE_DISCHARGING) {
-			/* TRANSLATORS: a phone is charging */
+			/* TRANSLATORS: a phone is charging.
+			 * The parameter is a device kind, e.g. "Laptop battery" or "Wireless mouse" */
 			g_string_append_printf (description, _("%s charging"), kind_desc);
 			g_string_append_printf (description, " (%.0f%%)", percentage);
 			goto out;
@@ -261,13 +263,15 @@ gpm_upower_get_device_summary (UpDevice *device)
 	/* we always display "Laptop battery 16 minutes remaining" as we need to clarify what device we are refering to */
 	if (state == UP_DEVICE_STATE_FULLY_CHARGED) {
 
-		/* TRANSLATORS: the device is charged */
+		/* TRANSLATORS: the device is charged.
+		 * The parameter is a device kind, e.g. "Laptop battery" or "Wireless mouse" */
 		g_string_append_printf (description, _("%s is charged"), kind_desc);
 
 		if (kind == UP_DEVICE_KIND_BATTERY && time_to_empty_round > GPM_UP_TEXT_MIN_TIME) {
 			time_to_empty_str = gpm_get_timestring (time_to_empty_round);
 			g_string_append (description, " - ");
-			/* TRANSLATORS: The laptop battery is charged, and we know a time */
+			/* TRANSLATORS: The laptop battery is charged, and we know a time.
+			 * The parameter is the time, e.g. 7 hours 6 minutes */
 			g_string_append_printf (description, _("provides %s laptop runtime"), time_to_empty_str);
 		}
 		goto out;
@@ -283,7 +287,8 @@ gpm_upower_get_device_summary (UpDevice *device)
 						kind_desc, time_to_empty_str);
 			g_string_append_printf (description, " (%.0f%%)", percentage);
 		} else {
-			/* TRANSLATORS: the device is discharging, but we only have a percentage */
+			/* TRANSLATORS: the device is discharging, but we only have a percentage.
+			 * The parameter is a device kind, e.g. "Laptop battery" or "Wireless mouse" */
 			g_string_append_printf (description, _("%s discharging"), kind_desc);
 			g_string_append_printf (description, " (%.0f%%)", percentage);
 		}
@@ -315,7 +320,9 @@ gpm_upower_get_device_summary (UpDevice *device)
 			/* display only charge time */
 			time_to_full_str = gpm_get_timestring (time_to_full_round);
 
-			/* TRANSLATORS: device is charging, and we have a time to full and a percentage */
+			/* TRANSLATORS: device is charging, and we have a time to full and a percentage.
+			 * The first parameter is the device type, e.g. "Laptop battery" and
+			 * the second is the time, e.g. "7 hours 6 minutes" */
 			g_string_append_printf (description, _("%s %s until charged"),
 						kind_desc, time_to_full_str);
 			g_string_append_printf (description, " (%.0f%%)", percentage);
@@ -330,21 +337,24 @@ gpm_upower_get_device_summary (UpDevice *device)
 	}
 	if (state == UP_DEVICE_STATE_PENDING_DISCHARGE) {
 
-		/* TRANSLATORS: this is only shown for laptops with multiple batteries */
+		/* TRANSLATORS: this is only shown for laptops with multiple batteries.
+		 * The parameter is a device kind, e.g. "Laptop battery" or "Wireless mouse" */
 		g_string_append_printf (description, _("%s waiting to discharge"), kind_desc);
 		g_string_append_printf (description, " (%.0f%%)", percentage);
 		goto out;
 	}
 	if (state == UP_DEVICE_STATE_PENDING_CHARGE) {
 
-		/* TRANSLATORS: this is only shown for laptops with multiple batteries */
+		/* TRANSLATORS: this is only shown for laptops with multiple batteries.
+		 * The parameter is a device kind, e.g. "Laptop battery" or "Wireless mouse" */
 		g_string_append_printf (description, _("%s waiting to charge"), kind_desc);
 		g_string_append_printf (description, " (%.0f%%)", percentage);
 		goto out;
 	}
 	if (state == UP_DEVICE_STATE_EMPTY) {
 
-		/* TRANSLATORS: when the device has no charge left */
+		/* TRANSLATORS: when the device has no charge left.
+		 * The parameter is a device kind, e.g. "Laptop battery" or "Wireless mouse" */
 		g_string_append_printf (description, _("%s empty"), kind_desc);
 		goto out;
 	}



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