[nautilus-sendto] Bug 579929 – Plugins strings are not displayed translated



commit 0c2d16f7b1c158a6464c1084153c62525265c05b
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Apr 26 12:16:00 2009 +0100

    Bug 579929 â?? Plugins strings are not displayed translated
    
    Call the necessary gettext functions in all the plugins, and
    translate the combo box labels. (Closes: #579929)
---
 src/nautilus-sendto-command.c                     |    2 +-
 src/plugins/bluetooth/bluetooth.c                 |    4 ++++
 src/plugins/empathy/empathy.c                     |    4 ++++
 src/plugins/evolution/evolution.c                 |    4 ++--
 src/plugins/gajim/gajim.c                         |    6 ++++--
 src/plugins/nautilus-burn/nautilus-burn.c         |    4 ++++
 src/plugins/pidgin/pidgin.c                       |    4 ++++
 src/plugins/removable-devices/removable-devices.c |    6 ++++++
 src/plugins/upnp/upnp.c                           |    4 ++++
 9 files changed, 33 insertions(+), 5 deletions(-)

diff --git a/src/nautilus-sendto-command.c b/src/nautilus-sendto-command.c
index 84d8a74..2b396ce 100644
--- a/src/nautilus-sendto-command.c
+++ b/src/nautilus-sendto-command.c
@@ -441,7 +441,7 @@ set_model_for_options_combobox (NS_ui *ui)
 		gtk_tree_store_append (model, &iter, NULL);
 		gtk_tree_store_set (model, &iter,
 					0, pixbuf,
-					1, p->info->description,
+					1, _(p->info->description),
 					-1);
 		if (last_used != NULL && !strcmp(last_used, p->info->id)) {
 			option = i;
diff --git a/src/plugins/bluetooth/bluetooth.c b/src/plugins/bluetooth/bluetooth.c
index 86d1033..be7acba 100644
--- a/src/plugins/bluetooth/bluetooth.c
+++ b/src/plugins/bluetooth/bluetooth.c
@@ -57,6 +57,10 @@ init (NstPlugin *plugin)
 	DBusGProxy *manager;
 	const char *adapter;
 
+	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+        textdomain (GETTEXT_PACKAGE);
+
 	/* Check whether bluetooth-sendto or gnome-obex-send are available */
 	cmd = g_find_program_in_path ("bluetooth-sendto");
 	if (cmd == NULL) {
diff --git a/src/plugins/empathy/empathy.c b/src/plugins/empathy/empathy.c
index d852abc..e3ab631 100644
--- a/src/plugins/empathy/empathy.c
+++ b/src/plugins/empathy/empathy.c
@@ -53,6 +53,10 @@ init (NstPlugin *plugin)
 
   g_print ("Init %s plugin\n", plugin->info->id);
 
+  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+  textdomain (GETTEXT_PACKAGE);
+
   empathy_gtk_init ();
 
   mc = empathy_mission_control_dup_singleton ();
diff --git a/src/plugins/evolution/evolution.c b/src/plugins/evolution/evolution.c
index 5f53211..3718259 100644
--- a/src/plugins/evolution/evolution.c
+++ b/src/plugins/evolution/evolution.c
@@ -85,8 +85,8 @@ init (NstPlugin *plugin)
 	g_print ("Init evolution plugin\n");
 	
 	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
-        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-        textdomain (GETTEXT_PACKAGE);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
 
 	client = gconf_client_get_default ();
 	mail_cmd = gconf_client_get_string (client, DEFAULT_MAILTO, NULL);
diff --git a/src/plugins/gajim/gajim.c b/src/plugins/gajim/gajim.c
index 397f75e..9ab67e1 100644
--- a/src/plugins/gajim/gajim.c
+++ b/src/plugins/gajim/gajim.c
@@ -251,9 +251,11 @@ gboolean _get_contacts() {
 static
 gboolean init (NstPlugin *plugin)
 {
-		
 	g_print ("Init gajim plugin\n");
-	g_type_init();
+
+	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
 	
 	/* connect to gajim dbus service */
 	jid_table = g_hash_table_new (g_str_hash, g_str_equal);
diff --git a/src/plugins/nautilus-burn/nautilus-burn.c b/src/plugins/nautilus-burn/nautilus-burn.c
index 7643e17..6cb2eea 100644
--- a/src/plugins/nautilus-burn/nautilus-burn.c
+++ b/src/plugins/nautilus-burn/nautilus-burn.c
@@ -37,6 +37,10 @@ gboolean init (NstPlugin *plugin)
 {
 	g_print ("Init nautilus burn plugin\n");
 
+	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
+
 	burn = g_file_new_for_uri ("burn:/");
 
 	return TRUE;
diff --git a/src/plugins/pidgin/pidgin.c b/src/plugins/pidgin/pidgin.c
index c3d8860..e5611a0 100644
--- a/src/plugins/pidgin/pidgin.c
+++ b/src/plugins/pidgin/pidgin.c
@@ -41,6 +41,10 @@ init (NstPlugin *plugin)
 {
 	g_print ("Init pidgin plugin\n");
 
+	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
+
 	blist_online = g_build_path ("/", g_get_home_dir(),
 				     ".gnome2/nautilus-sendto/pidgin_buddies_online",
 				     NULL);
diff --git a/src/plugins/removable-devices/removable-devices.c b/src/plugins/removable-devices/removable-devices.c
index 01ef886..6931898 100644
--- a/src/plugins/removable-devices/removable-devices.c
+++ b/src/plugins/removable-devices/removable-devices.c
@@ -127,8 +127,14 @@ static gboolean
 init (NstPlugin *plugin)
 {
 	g_print ("Init removable-devices plugin\n");
+
+	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
+
 	vol_monitor = g_volume_monitor_get ();
 	cb = gtk_combo_box_new ();
+
 	return TRUE;
 }
 
diff --git a/src/plugins/upnp/upnp.c b/src/plugins/upnp/upnp.c
index f4c0f30..25bc3d5 100644
--- a/src/plugins/upnp/upnp.c
+++ b/src/plugins/upnp/upnp.c
@@ -176,6 +176,10 @@ init (NstPlugin *plugin)
 	GError *error;
 	char *upload_cmd;
 
+	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
+
 	upload_cmd = g_find_program_in_path ("gupnp-upload");
 	if (upload_cmd == NULL)
 		return FALSE;



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