[gnome-power-manager] Add translations for UP_DEVICE_KIND_COMPUTER



commit a43c9081e064ba2d1b43de4d2cf27627cba022b3
Author: Richard Hughes <richard hughsie com>
Date:   Tue Jun 1 14:28:45 2010 +0100

    Add translations for UP_DEVICE_KIND_COMPUTER

 src/gpm-engine.c    |    1 +
 src/gpm-manager.c   |   20 ++++++++++++++++++--
 src/gpm-tray-icon.c |    1 +
 src/gpm-upower.c    |    7 +++++++
 4 files changed, 27 insertions(+), 2 deletions(-)
---
diff --git a/src/gpm-engine.c b/src/gpm-engine.c
index 5d60803..558e9db 100644
--- a/src/gpm-engine.c
+++ b/src/gpm-engine.c
@@ -199,6 +199,7 @@ gpm_engine_get_warning (GpmEngine *engine, UpDevice *device)
 #if UP_CHECK_VERSION(0,9,5)
 		   kind == UP_DEVICE_KIND_MEDIA_PLAYER ||
 		   kind == UP_DEVICE_KIND_TABLET ||
+		   kind == UP_DEVICE_KIND_COMPUTER ||
 #endif
 		   kind == UP_DEVICE_KIND_PDA) {
 
diff --git a/src/gpm-manager.c b/src/gpm-manager.c
index 6cc7724..d6b5eef 100644
--- a/src/gpm-manager.c
+++ b/src/gpm-manager.c
@@ -1544,11 +1544,18 @@ gpm_manager_engine_charge_low_cb (GpmEngine *engine, UpDevice *device, GpmManage
 		message = g_strdup_printf (_("Media player is low in power (%.0f%%)"), percentage);
 
 	} else if (kind == UP_DEVICE_KIND_TABLET) {
-		/* TRANSLATORS: tablet, e.g. ipad is getting a little low */
+		/* TRANSLATORS: graphics tablet, e.g. wacom is getting a little low */
 		title = _("Tablet battery low");
 
 		/* TRANSLATORS: tell user more details */
 		message = g_strdup_printf (_("Tablet is low in power (%.0f%%)"), percentage);
+
+	} else if (kind == UP_DEVICE_KIND_COMPUTER) {
+		/* TRANSLATORS: computer, e.g. ipad is getting a little low */
+		title = _("Attached computer battery low");
+
+		/* TRANSLATORS: tell user more details */
+		message = g_strdup_printf (_("Attached computer is low in power (%.0f%%)"), percentage);
 #endif
 	}
 
@@ -1694,7 +1701,16 @@ gpm_manager_engine_charge_critical_cb (GpmEngine *engine, UpDevice *device, GpmM
 
 		/* TRANSLATORS: the device is just going to stop working */
 		message = g_strdup_printf (_("Tablet is very low in power (%.0f%%). "
-					     "This device will soon shutdown if not charged."),
+					     "This device will soon stop functioning if not charged."),
+					   percentage);
+	} else if (kind == UP_DEVICE_KIND_COMPUTER) {
+
+		/* TRANSLATORS: the cell battery is very low */
+		title = _("Attached computer battery low");
+
+		/* TRANSLATORS: the device is just going to stop working */
+		message = g_strdup_printf (_("Attached computer is very low in power (%.0f%%). "
+					     "The device will soon shutdown if not charged."),
 					   percentage);
 #endif
 	}
diff --git a/src/gpm-tray-icon.c b/src/gpm-tray-icon.c
index cdc27b8..e805413 100644
--- a/src/gpm-tray-icon.c
+++ b/src/gpm-tray-icon.c
@@ -324,6 +324,7 @@ gpm_tray_icon_create_menu (GpmTrayIcon *icon)
 #if UP_CHECK_VERSION(0,9,5)
 	dev_cnt += gpm_tray_icon_add_device (icon, menu, array, UP_DEVICE_KIND_MEDIA_PLAYER);
 	dev_cnt += gpm_tray_icon_add_device (icon, menu, array, UP_DEVICE_KIND_TABLET);
+	dev_cnt += gpm_tray_icon_add_device (icon, menu, array, UP_DEVICE_KIND_COMPUTER);
 #endif
 	g_ptr_array_unref (array);
 
diff --git a/src/gpm-upower.c b/src/gpm-upower.c
index fa42052..fba9f88 100644
--- a/src/gpm-upower.c
+++ b/src/gpm-upower.c
@@ -561,6 +561,10 @@ gpm_device_kind_to_localised_string (UpDeviceKind kind, guint number)
 		/* TRANSLATORS: tablet device */
 		text = ngettext ("Tablet", "Tablets", number);
 		break;
+	case UP_DEVICE_KIND_COMPUTER:
+		/* TRANSLATORS: tablet device */
+		text = ngettext ("Computer", "Computers", number);
+		break;
 #endif
 	default:
 		egg_warning ("enum unrecognised: %i", kind);
@@ -606,6 +610,9 @@ gpm_device_kind_to_icon (UpDeviceKind kind)
 		icon = "multimedia-player";
 		break;
 	case UP_DEVICE_KIND_TABLET:
+		icon = "input-tablet";
+		break;
+	case UP_DEVICE_KIND_COMPUTER:
 		icon = "computer-apple-ipad";
 		break;
 #endif



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