[gnome-color-manager] trivial: translate the RGB and CMYK entries. Fixes #609156



commit 69e439eb8a0ffb8a0bbd33b34535101e64cb555e
Author: Richard Hughes <richard hughsie com>
Date:   Thu Feb 18 13:39:05 2010 +0000

    trivial: translate the RGB and CMYK entries. Fixes #609156

 src/gcm-prefs.c |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index d8e03e7..6beae93 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -1994,6 +1994,23 @@ gcm_prefs_startup_phase2_idle_cb (gpointer user_data)
 }
 
 /**
+ * gcm_prefs_colorspace_to_localised_string:
+ **/
+static const gchar *
+gcm_prefs_colorspace_to_localised_string (GcmColorspaceEnum colorspace)
+{
+	if (colorspace == GCM_COLORSPACE_ENUM_RGB) {
+		/* TRANSLATORS: this is the colorspace, e.g. red, green, blue */
+		return _("RGB");
+	}
+	if (colorspace == GCM_COLORSPACE_ENUM_CMYK) {
+		/* TRANSLATORS: this is the colorspace, e.g. cyan, magenta, yellow, black */
+		return _("CMYK");
+	}
+	return NULL;
+}
+
+/**
  * gcm_prefs_setup_space_combobox:
  **/
 static void
@@ -2046,7 +2063,8 @@ gcm_prefs_setup_space_combobox (GtkWidget *widget, GcmColorspaceEnum colorspace,
 		g_ptr_array_unref (profile_array);
 	if (added_count == 0) {
 		/* TRANSLATORS: this is when there are no profiles that can be used; the search term is either "RGB" or "CMYK" */
-		text = g_strdup_printf (_("No %s color spaces available"), search);
+		text = g_strdup_printf (_("No %s color spaces available"),
+					gcm_prefs_colorspace_to_localised_string (colorspace));
 		gtk_combo_box_append_text (GTK_COMBO_BOX(widget), text);
 		gtk_combo_box_set_active (GTK_COMBO_BOX (widget), added_count);
 		gtk_widget_set_sensitive (widget, FALSE);



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